wordpress/wp-content/plugins/kt-tinymce-color-grid/index.php
/**
         * Add help to settings page
         * @since 1.7
         */
Add help to settings page
@since 1.7
Add help to settings page @since 1 . 7
protected function add_help() {
            $screen = get_current_screen();
            $link = '<a href="%1$s" target="_blank" title="%3$s">%2$s</a>';
            $rgb_url = vsprintf($link, array(
                _x('https://en.wikipedia.org/wiki/RGB_color_model', 'URL to wiki page about RGB', 'kt-tinymce-color-grid'),
                __('RGB cube', 'kt-tinymce-color-grid'),
                __('Wikipedia article about RGB color space', 'kt-tinymce-color-grid'),
            ));
            $hsl_link = vsprintf($link, array(
                _x('https://en.wikipedia.org/wiki/HSL_and_HSV', 'URL to wiki page about HSL', 'kt-tinymce-color-grid'),
                __('HSL space', 'kt-tinymce-color-grid'),
                __('Wikipedia article about HSL color space', 'kt-tinymce-color-grid'),
            ));
            $screen->add_help_tab(array(
                'id' => 'palette',
                'title' => __('Color Palette', 'kt-tinymce-color-grid'),
                'content' => '
<p>' . __('You can create a color palette and include it to the Visual Editor and/or the Theme Customizer.', 'kt-tinymce-color-grid') . '</p>
<p>' . __("<strong>Add to Theme Customizer</strong> makes the palette available to the color picker of the Theme Customizer. This works by altering WordPress' color picker so every plugin using it receives the palette as well.", 'kt-tinymce-color-grid') . '</p>
<p>' . __('<strong>Add to block editor</strong> adds the palette to the color picker of the new block editor.', 'kt-tinymce-color-grid') . '</p>
<p>' . __('<strong>Add to classic editor</strong> adds the palette to the color picker of the classic editor. This only works if you choose a color grid other than <strong>Default</strong>.', 'kt-tinymce-color-grid') . '</p>'
            ));
            $screen->add_help_tab(array(
                'id' => 'grid',
                'title' => __('Classic Editor', 'kt-tinymce-color-grid'),
                'content' => '
<p>' . __("<strong>Default</strong> leaves TinyMCE's color picker untouched.", 'kt-tinymce-color-grid') . '</p>
<p>' . __("<strong>Palette</strong> only takes the colors defined by the Central Palette.") . '</p>
<p>' . sprintf(__("<strong>Rainbow</strong> takes hue and lightness components from the %s and thus creates a rainbow. The <strong>Luma</strong> option controls how the lightness for each hue is spread.", 'kt-tinymce-color-grid'), $hsl_link) . '</p>
<p>' . sprintf(__("<strong>Blocks</strong> takes planes from the %s and places them next to one another. <strong>Block Count</strong> controls how many planes are taken, and <strong>Block Size</strong> determines their size.", 'kt-tinymce-color-grid'), $rgb_url) . '</p>'
            ));
            $screen->add_help_tab(array(
                'id' => 'backup',
                'title' => __('Backup', 'kt-tinymce-color-grid'),
                'content' => '
<p>' . __('If you want to <strong>export</strong> all settings and your palette to a file you can do so by simply clicking <strong>Download Backup</strong> at the bottom of the editor and you will be prompted with a download.', 'kt-tinymce-color-grid') . '</p>
<p>' . __('Likewise you can <strong>import</strong> such a file into this or another install of WordPress by clicking <strong>Choose Backup</strong>. All current settings and your palette will be overwritten, so make sure you made a backup.', 'kt-tinymce-color-grid') . '</p>'
            ));
            $screen->add_help_tab(array(
                'id' => 'aria',
                'title' => __('Accessibility', 'kt-tinymce-color-grid'),
                'content' => '
<p>' . __('The palette editor consists of a toolbar and a list of entries. Every entry has a color picker, two text fields &mdash; one holding a hexadecimal representation of the color, and one for the name of the entry &mdash; and lastly a button to remove the entry.', 'kt-tinymce-color-grid') . '</p>
<p>' . __('You can reorder an entry by pressing the <strong>page</strong> keys. To delete an entry press the <strong>delete</strong> or <strong>backspace</strong> key. If a color picker has focus use the <strong>arrow</strong> keys, and <strong>plus</strong> and <strong>minus</strong> to change the color.', 'kt-tinymce-color-grid') . '</p>'
            ));
            $plugin_url = esc_url(_x('https://wordpress.org/plugins/kt-tinymce-color-grid', 'URL to plugin site', 'kt-tinymce-color-grid'));
            $support_url = esc_url(_x('https://wordpress.org/support/plugin/kt-tinymce-color-grid', 'URL to support forums', 'kt-tinymce-color-grid'));
            $documentation_url = esc_url('https://kungtiger.github.io/central-color-palette');
            $screen->set_help_sidebar('
<p><strong>' . esc_html__('For more information:', 'kt-tinymce-color-grid') . '</strong></p>
<p><a href="' . $plugin_url . '" target="_blank">' . esc_html__('Visit plugin site', 'kt-tinymce-color-grid') . '</a></p>
<p><a href="' . $support_url . '" target="_blank">' . esc_html__('Support Forums', 'kt-tinymce-color-grid') . '</a></p>
<p><a href="' . $documentation_url . '" target="_blank">' . esc_html__('API Documentation', 'kt-tinymce-color-grid') . '</a></p>');
        }
protected function add_help ( ) { $ screen = get_current_screen ( ) ; $ link = '<a href="%1$s" target="_blank" title="%3$s">%2$s</a>' ; $ rgb_url = vsprintf ( $ link , array ( _x ( 'https://en.wikipedia.org/wiki/RGB_color_model' , 'URL to wiki page about RGB' , 'kt-tinymce-color-grid' ) , __ ( 'RGB cube' , 'kt-tinymce-color-grid' ) , __ ( 'Wikipedia article about RGB color space' , 'kt-tinymce-color-grid' ) , ) ) ; $ hsl_link = vsprintf ( $ link , array ( _x ( 'https://en.wikipedia.org/wiki/HSL_and_HSV' , 'URL to wiki page about HSL' , 'kt-tinymce-color-grid' ) , __ ( 'HSL space' , 'kt-tinymce-color-grid' ) , __ ( 'Wikipedia article about HSL color space' , 'kt-tinymce-color-grid' ) , ) ) ; $ screen -> add_help_tab ( array ( 'id' => 'palette' , 'title' => __ ( 'Color Palette' , 'kt-tinymce-color-grid' ) , 'content' => '
<p>' . __ ( 'You can create a color palette and include it to the Visual Editor and/or the Theme Customizer.' , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( " <strong>Add to Theme Customizer</strong> makes the palette available to the color picker of the Theme Customizer. This works by altering WordPress' color picker so every plugin using it receives the palette as well. " , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( '<strong>Add to block editor</strong> adds the palette to the color picker of the new block editor.' , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( '<strong>Add to classic editor</strong> adds the palette to the color picker of the classic editor. This only works if you choose a color grid other than <strong>Default</strong>.' , 'kt-tinymce-color-grid' ) . '</p>' ) ) ; $ screen -> add_help_tab ( array ( 'id' => 'grid' , 'title' => __ ( 'Classic Editor' , 'kt-tinymce-color-grid' ) , 'content' => '
<p>' . __ ( " <strong>Default</strong> leaves TinyMCE's color picker untouched. " , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( " <strong>Palette</strong> only takes the colors defined by the Central Palette. " ) . '</p>
<p>' . sprintf ( __ ( " <strong>Rainbow</strong> takes hue and lightness components from the %s and thus creates a rainbow. The <strong>Luma</strong> option controls how the lightness for each hue is spread. " , 'kt-tinymce-color-grid' ) , $ hsl_link ) . '</p>
<p>' . sprintf ( __ ( " <strong>Blocks</strong> takes planes from the %s and places them next to one another. <strong>Block Count</strong> controls how many planes are taken, and <strong>Block Size</strong> determines their size. " , 'kt-tinymce-color-grid' ) , $ rgb_url ) . '</p>' ) ) ; $ screen -> add_help_tab ( array ( 'id' => 'backup' , 'title' => __ ( 'Backup' , 'kt-tinymce-color-grid' ) , 'content' => '
<p>' . __ ( 'If you want to <strong>export</strong> all settings and your palette to a file you can do so by simply clicking <strong>Download Backup</strong> at the bottom of the editor and you will be prompted with a download.' , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( 'Likewise you can <strong>import</strong> such a file into this or another install of WordPress by clicking <strong>Choose Backup</strong>. All current settings and your palette will be overwritten, so make sure you made a backup.' , 'kt-tinymce-color-grid' ) . '</p>' ) ) ; $ screen -> add_help_tab ( array ( 'id' => 'aria' , 'title' => __ ( 'Accessibility' , 'kt-tinymce-color-grid' ) , 'content' => '
<p>' . __ ( 'The palette editor consists of a toolbar and a list of entries. Every entry has a color picker, two text fields &mdash; one holding a hexadecimal representation of the color, and one for the name of the entry &mdash; and lastly a button to remove the entry.' , 'kt-tinymce-color-grid' ) . '</p>
<p>' . __ ( 'You can reorder an entry by pressing the <strong>page</strong> keys. To delete an entry press the <strong>delete</strong> or <strong>backspace</strong> key. If a color picker has focus use the <strong>arrow</strong> keys, and <strong>plus</strong> and <strong>minus</strong> to change the color.' , 'kt-tinymce-color-grid' ) . '</p>' ) ) ; $ plugin_url = esc_url ( _x ( 'https://wordpress.org/plugins/kt-tinymce-color-grid' , 'URL to plugin site' , 'kt-tinymce-color-grid' ) ) ; $ support_url = esc_url ( _x ( 'https://wordpress.org/support/plugin/kt-tinymce-color-grid' , 'URL to support forums' , 'kt-tinymce-color-grid' ) ) ; $ documentation_url = esc_url ( 'https://kungtiger.github.io/central-color-palette' ) ; $ screen -> set_help_sidebar ( '
<p><strong>' . esc_html__ ( 'For more information:' , 'kt-tinymce-color-grid' ) . '</strong></p>
<p><a href="' . $ plugin_url . '" target="_blank">' . esc_html__ ( 'Visit plugin site' , 'kt-tinymce-color-grid' ) . '</a></p>
<p><a href="' . $ support_url . '" target="_blank">' . esc_html__ ( 'Support Forums' , 'kt-tinymce-color-grid' ) . '</a></p>
<p><a href="' . $ documentation_url . '" target="_blank">' . esc_html__ ( 'API Documentation' , 'kt-tinymce-color-grid' ) . '</a></p>' ) ; }
Add help to settings page
 @since 1.7
Add help to settings page @since 1 . 7