If you wish to remove all plugin information from your database be sure to run this uninstall utility first.

This is a great way to "reset" the plugin, in case you experience problems with the editor.

This option is NOT reversible. Ultimate Tinymce plugin settings will need to be re-configured if deleted.

','jwl-ultimate-tinymce'); ?>
','jwl-ultimate-tinymce'); ?>
ID; /* Check that the user hasn't already clicked to ignore the message */ if ( ! get_user_meta($user_id, 'jwl_ignore_notice') ) { echo '

'; printf(__('Thank you for choosing Ultimate Tinymce.
Please visit the Ultimate Tinymce Settings Page to begin customization of your editor.
If you are upgrading from a previous version, you will need to reconfigure your button row settings.Hide Notice'), '?jwl_nag_ignore=0'); echo "

"; } } add_action('admin_init', 'jwl_nag_ignore'); function jwl_nag_ignore() { global $current_user; $user_id = $current_user->ID; /* If user clicks to ignore the notice, add that to their user meta */ if ( isset($_GET['jwl_nag_ignore']) && '0' == $_GET['jwl_nag_ignore'] ) { add_user_meta($user_id, 'jwl_ignore_notice', 'true', true); } } // Change our default Tinymce configuration values function jwl_change_mce_options($initArray) { $initArray['popup_css'] = plugin_dir_url( __FILE__ ) . 'css/popup.css'; $initArray['theme_advanced_font_sizes'] = '6px=6px,8px=8px,10px=10px,12px=12px,14px=14px,16px=16px,18px=18px,20px=20px,22px=22px,24px=24px,28px=28px,32px=32px,36px=36px,40px=40px,44px=44px,48px=48px,52px=52px,62px=62px,72px=72px'; $initArray['plugin_insertdate_dateFormat'] = '%B %d, %Y'; // added for inserttimedate proper format $initArray['plugin_insertdate_timeFormat'] = '%I:%M:%S %p'; // added for inserttimedate proper format return $initArray; } add_filter('tiny_mce_before_init', 'jwl_change_mce_options'); // Set our language localization folder (used for adding translations) function jwl_ultimate_tinymce() { load_plugin_textdomain('jwl-ultimate-tinymce', false, basename( dirname( __FILE__ ) ) . '/languages' ); } add_action( 'init', 'jwl_ultimate_tinymce' ); // set field names for using custom fields in edit posts/pages admin panel. function jwl_field_func($atts) { global $post; $name = $atts['name']; if (empty($name)) return; return get_post_meta($post->ID, $name, true); } add_shortcode('field', 'jwl_field_func'); // Add settings link to plugins page menu // This can be duplicated to add multiple links function add_ultimatetinymce_settings_link($links, $file) { static $this_plugin; if (!$this_plugin) $this_plugin = plugin_basename(__FILE__); if ($file == $this_plugin){ $settings_link = ''.__("Settings",'jwl-ultimate-tinymce').''; $settings_link2 = ''.__("Support Forum",'jwl-ultimate-tinymce').''; array_unshift($links, $settings_link, $settings_link2); } return $links; } add_filter('plugin_action_links', 'add_ultimatetinymce_settings_link', 10, 2 ); // Donate link on manage plugin page function jwl_execphp_donate_link($links, $file) { if ($file == plugin_basename(__FILE__)) { $donate_link = 'Donate'; $links[] = $donate_link; } return $links; } add_filter('plugin_row_meta', 'jwl_execphp_donate_link', 10, 2); // Add ALL our settings function jwl_settings_api_init() { // This creates each settings option group. These are used as headers in our admin panel settings page. add_settings_section('jwl_setting_section1', '', 'jwl_setting_section_callback_function1', 'ultimate-tinymce1'); add_settings_section('jwl_setting_section2', '', 'jwl_setting_section_callback_function2', 'ultimate-tinymce2'); add_settings_section('jwl_setting_section3', '', 'jwl_setting_section_callback_function3', 'ultimate-tinymce3'); add_settings_section('jwl_setting_section4', '', 'jwl_setting_section_callback_function4', 'ultimate-tinymce4'); // This adds our individual settings to each option group defined above. // These are the settings for Row 3 add_settings_field('jwl_fontselect_field_id', __('Font Select Box','jwl-ultimate-tinymce'), 'jwl_fontselect_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_fontsizeselect_field_id', __('Font Size Box','jwl-ultimate-tinymce'), 'jwl_fontsizeselect_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_cut_field_id', __('Cut Box','jwl-ultimate-tinymce'), 'jwl_cut_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_copy_field_id', __('Copy Box','jwl-ultimate-tinymce'), 'jwl_copy_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_paste_field_id', __('Paste Box','jwl-ultimate-tinymce'), 'jwl_paste_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_backcolorpicker_field_id', __('Background Color Picker Box','jwl-ultimate-tinymce'), 'jwl_backcolorpicker_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_forecolorpicker_field_id', __('Foreground Color Picker Box','jwl-ultimate-tinymce'), 'jwl_forecolorpicker_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_advhr_field_id', __('Horizontal Rule Box','jwl-ultimate-tinymce'), 'jwl_advhr_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_visualaid_field_id', __('Visual Aid Box','jwl-ultimate-tinymce'), 'jwl_visualaid_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_anchor_field_id', __('Anchor Box','jwl-ultimate-tinymce'), 'jwl_anchor_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_sub_field_id', __('Subscript Box','jwl-ultimate-tinymce'), 'jwl_sub_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_sup_field_id', __('Superscript Box','jwl-ultimate-tinymce'), 'jwl_sup_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_search_field_id', __('Search Box','jwl-ultimate-tinymce'), 'jwl_search_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_replace_field_id', __('Replace Box','jwl-ultimate-tinymce'), 'jwl_replace_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); add_settings_field('jwl_datetime_field_id', __('Insert Date/Time Box','jwl-ultimate-tinymce'), 'jwl_datetime_callback_function', 'ultimate-tinymce1', 'jwl_setting_section1'); // These are the settings for Row 4 add_settings_field('jwl_styleselect_field_id', __('Style Select Box','jwl-ultimate-tinymce'), 'jwl_styleselect_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_tableDropdown_field_id', __('Table Controls Dropdown Box','jwl-ultimate-tinymce'), 'jwl_tableDropdown_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_emotions_field_id', __('Emotions Box','jwl-ultimate-tinymce'), 'jwl_emotions_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_image_field_id', __('Advanced Image Box','jwl-ultimate-tinymce'), 'jwl_image_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_preview_field_id', __('Preview Box','jwl-ultimate-tinymce'), 'jwl_preview_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_cite_field_id', __('Citations Box','jwl-ultimate-tinymce'), 'jwl_cite_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_abbr_field_id', __('Abbreviations Box','jwl-ultimate-tinymce'), 'jwl_abbr_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_acronym_field_id', __('Acronym Box','jwl-ultimate-tinymce'), 'jwl_acronym_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_del_field_id', __('Delete Box','jwl-ultimate-tinymce'), 'jwl_del_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_ins_field_id', __('Insert Box','jwl-ultimate-tinymce'), 'jwl_ins_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_attribs_field_id', __('Attributes Box','jwl-ultimate-tinymce'), 'jwl_attribs_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_styleprops_field_id', __('Styleprops Box','jwl-ultimate-tinymce'), 'jwl_styleprops_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_code_field_id', __('HTML Code Box','jwl-ultimate-tinymce'), 'jwl_code_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_codemagic_field_id', __('HTML Code Magic Box','jwl-ultimate-tinymce'), 'jwl_codemagic_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_media_field_id', __('Insert Media Box','jwl-ultimate-tinymce'), 'jwl_media_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_youtube_field_id', __('Insert YouTube Video Box','jwl-ultimate-tinymce'), 'jwl_youtube_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_imgmap_field_id', __('Image Map Editor Box','jwl-ultimate-tinymce'), 'jwl_imgmap_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_visualchars_field_id', __('Toggle Visual Characters Box','jwl-ultimate-tinymce'), 'jwl_visualchars_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_print_field_id', __('Print Box','jwl-ultimate-tinymce'), 'jwl_print_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); add_settings_field('jwl_shortcodes_field_id', __('Shortcodes Select Box','jwl-ultimate-tinymce'), 'jwl_shortcodes_callback_function', 'ultimate-tinymce2', 'jwl_setting_section2'); // Settings for miscellaneous options and features add_settings_field('jwl_tinycolor_css_field_id', __('Change the color of the Editor.','jwl-ultimate-tinymce'), 'jwl_tinycolor_css_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_tinymce_nextpage_field_id', __('Enable NextPage (PageBreak) Feature.','jwl-ultimate-tinymce'), 'jwl_tinymce_nextpage_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_tinymce_excerpt_field_id', __('Add tinymce editor to excerpt area.','jwl-ultimate-tinymce'), 'jwl_tinymce_excerpt_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_postid_field_id', __('Add ID Column to page/post admin list.','jwl-ultimate-tinymce'), 'jwl_postid_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_shortcode_field_id', __('Allow shortcode usage in widget text areas.','jwl-ultimate-tinymce'), 'jwl_shortcode_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_php_widget_field_id', __('Use PHP Text Widget','jwl-ultimate-tinymce'), 'jwl_php_widget_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_linebreak_field_id', __('Enable Line Break Shortcode','jwl-ultimate-tinymce'), 'jwl_linebreak_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_columns_field_id', __('Enable Columns Shortcodes','jwl-ultimate-tinymce'), 'jwl_columns_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); add_settings_field('jwl_signoff_field_id', __('Add a Signoff Shortcode','jwl-ultimate-tinymce'), 'jwl_signoff_callback_function', 'ultimate-tinymce3', 'jwl_setting_section3'); // Settings for Advanced TinyMCE Features add_settings_field('jwl_defaults_field_id', __('Enable Advanced Insert/Edit Link','jwl-ultimate-tinymce'), 'jwl_defaults_callback_function', 'ultimate-tinymce4', 'jwl_setting_section4'); add_settings_field('jwl_custom_styles_field_id', __('Enable Advanced Custom Styles','jwl-ultimate-tinymce'), 'jwl_custom_styles_callback_function', 'ultimate-tinymce4', 'jwl_setting_section4'); add_settings_field('jwl_div_field_id', __('Enable "Div Clear" Ability','jwl-ultimate-tinymce'), 'jwl_div_callback_function', 'ultimate-tinymce4', 'jwl_setting_section4'); add_settings_field('jwl_autop_field_id', __('Remove p and br tags','jwl-ultimate-tinymce'), 'jwl_autop_callback_function', 'ultimate-tinymce4', 'jwl_setting_section4'); // Register our settings so that $_POST handling is done for us and our callback function just has to echo the . // Register settings for Row 3 register_setting('jwl_options_group','jwl_fontselect_field_id'); register_setting('jwl_options_group','jwl_fontselect_dropdown'); register_setting('jwl_options_group','jwl_fontsizeselect_field_id'); register_setting('jwl_options_group','jwl_fontsizeselect_dropdown'); register_setting('jwl_options_group','jwl_cut_field_id'); register_setting('jwl_options_group','jwl_cut_dropdown'); register_setting('jwl_options_group','jwl_copy_field_id'); register_setting('jwl_options_group','jwl_copy_dropdown'); register_setting('jwl_options_group','jwl_paste_field_id'); register_setting('jwl_options_group','jwl_paste_dropdown'); register_setting('jwl_options_group','jwl_backcolorpicker_field_id'); register_setting('jwl_options_group','jwl_backcolorpicker_dropdown'); register_setting('jwl_options_group','jwl_forecolorpicker_field_id'); register_setting('jwl_options_group','jwl_forecolorpicker_dropdown'); register_setting('jwl_options_group','jwl_advhr_field_id'); register_setting('jwl_options_group','jwl_advhr_dropdown'); register_setting('jwl_options_group','jwl_visualaid_field_id'); register_setting('jwl_options_group','jwl_visualaid_dropdown'); register_setting('jwl_options_group','jwl_anchor_field_id'); register_setting('jwl_options_group','jwl_anchor_dropdown'); register_setting('jwl_options_group','jwl_sub_field_id'); register_setting('jwl_options_group','jwl_sub_dropdown'); register_setting('jwl_options_group','jwl_sup_field_id'); register_setting('jwl_options_group','jwl_sup_dropdown'); register_setting('jwl_options_group','jwl_search_field_id'); register_setting('jwl_options_group','jwl_search_dropdown'); register_setting('jwl_options_group','jwl_replace_field_id'); register_setting('jwl_options_group','jwl_replace_dropdown'); register_setting('jwl_options_group','jwl_datetime_field_id'); register_setting('jwl_options_group','jwl_datetime_dropdown'); // Register settings for Row 4 register_setting('jwl_options_group','jwl_styleselect_field_id'); register_setting('jwl_options_group','jwl_styleselect_dropdown'); register_setting('jwl_options_group','jwl_tableDropdown_field_id'); register_setting('jwl_options_group','jwl_tableDropdown_dropdown'); register_setting('jwl_options_group','jwl_emotions_field_id'); register_setting('jwl_options_group','jwl_emotions_dropdown'); register_setting('jwl_options_group','jwl_image_field_id'); register_setting('jwl_options_group','jwl_image_dropdown'); register_setting('jwl_options_group','jwl_preview_field_id'); register_setting('jwl_options_group','jwl_preview_dropdown'); register_setting('jwl_options_group','jwl_cite_field_id'); register_setting('jwl_options_group','jwl_cite_dropdown'); register_setting('jwl_options_group','jwl_abbr_field_id'); register_setting('jwl_options_group','jwl_abbr_dropdown'); register_setting('jwl_options_group','jwl_acronym_field_id'); register_setting('jwl_options_group','jwl_acronym_dropdown'); register_setting('jwl_options_group','jwl_del_field_id'); register_setting('jwl_options_group','jwl_del_dropdown'); register_setting('jwl_options_group','jwl_ins_field_id'); register_setting('jwl_options_group','jwl_ins_dropdown'); register_setting('jwl_options_group','jwl_attribs_field_id'); register_setting('jwl_options_group','jwl_attribs_dropdown'); register_setting('jwl_options_group','jwl_styleprops_field_id'); register_setting('jwl_options_group','jwl_styleprops_dropdown'); register_setting('jwl_options_group','jwl_code_field_id'); register_setting('jwl_options_group','jwl_code_dropdown'); register_setting('jwl_options_group','jwl_codemagic_field_id'); register_setting('jwl_options_group','jwl_codemagic_dropdown'); register_setting('jwl_options_group','jwl_media_field_id'); register_setting('jwl_options_group','jwl_media_dropdown'); register_setting('jwl_options_group','jwl_youtube_field_id'); register_setting('jwl_options_group','jwl_youtube_dropdown'); register_setting('jwl_options_group','jwl_imgmap_field_id'); register_setting('jwl_options_group','jwl_imgmap_dropdown'); register_setting('jwl_options_group','jwl_visualchars_field_id'); register_setting('jwl_options_group','jwl_visualchars_dropdown'); register_setting('jwl_options_group','jwl_print_field_id'); register_setting('jwl_options_group','jwl_print_dropdown'); register_setting('jwl_options_group','jwl_shortcodes_field_id'); register_setting('jwl_options_group','jwl_shortcodes_dropdown'); // Register Settings for miscellaneous options and features register_setting('jwl_options_group','jwl_tinycolor_css_field_id'); register_setting('jwl_options_group','jwl_tinymce_nextpage_field_id'); register_setting('jwl_options_group','jwl_tinymce_excerpt_field_id'); register_setting('jwl_options_group','jwl_postid_field_id'); register_setting('jwl_options_group','jwl_shortcode_field_id'); register_setting('jwl_options_group','jwl_php_widget_field_id'); register_setting('jwl_options_group','jwl_linebreak_field_id'); register_setting('jwl_options_group','jwl_columns_field_id'); register_setting('jwl_options_group','jwl_signoff_field_id'); // Register Settings for Advanced TinyMCE Features register_setting('jwl_options_group','jwl_defaults_field_id'); register_setting('jwl_options_group','jwl_custom_styles_field_id'); register_setting('jwl_options_group','jwl_div_field_id'); register_setting('jwl_options_group','jwl_autop_field_id'); } add_action('admin_init', 'jwl_settings_api_init'); // Set default values for dropdown buttons (if not already selected and saved). // Button defaults for Row 3 //$jwl_update_fontselect = get_option('jwl_fontselect_dropdown'); //if( !get_option('jwl_fontselect_dropdown' ) ) { update_option('jwl_fontselect_dropdown', '"Row 3"'); } // These are our callback functions for each settings option GROUP described above. function jwl_setting_section_callback_function1() { _e('

    DescriptionEnableImageHelpRow Selection

','jwl-ultimate-tinymce'); } function jwl_setting_section_callback_function2() { _e('

    DescriptionEnableImageHelpRow Selection

','jwl-ultimate-tinymce'); } function jwl_setting_section_callback_function3() { _e('

    These are added bonuses and features I have included.

','jwl-ultimate-tinymce'); } function jwl_setting_section_callback_function4() { _e('

    Here you can enable advanced features of the TinyMCE Editor.

    NOTE:

    Checking the box "enables" the selected advanced feature.
    De-selecting the box will restore original Wordpress default functionality for that setting.

','jwl-ultimate-tinymce'); } // Begin callback functions function jwl_fontselect_callback_function() { echo ' '; ?>"; foreach($items_fontselect as $item_fontselect) { $selected_fontselect = ($options_fontselect['row']==$item_fontselect) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_fontsizeselect_callback_function() { echo ' '; ?>"; foreach($items_fontsizeselect as $item_fontsizeselect) { $selected_fontsizeselect = ($options_fontsizeselect['row']==$item_fontsizeselect) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_cut_callback_function() { echo ' '; ?>"; foreach($items_cut as $item_cut) { $selected_cut = ($options_cut['row']==$item_cut) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_copy_callback_function() { echo ' '; ?>"; foreach($items_copy as $item_copy) { $selected_copy = ($options_copy['row']==$item_copy) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_paste_callback_function() { echo ' '; ?>"; foreach($items_paste as $item_paste) { $selected_paste = ($options_paste['row']==$item_paste) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_backcolorpicker_callback_function() { echo ' '; ?>"; foreach($items_backcolorpicker as $item_backcolorpicker) { $selected_backcolorpicker = ($options_backcolorpicker['row']==$item_backcolorpicker) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_forecolorpicker_callback_function() { echo ' '; ?>"; foreach($items_forecolorpicker as $item_forecolorpicker) { $selected_forecolorpicker = ($options_forecolorpicker['row']==$item_forecolorpicker) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_advhr_callback_function() { echo ' '; ?>"; foreach($items_advhr as $item_advhr) { $selected_advhr = ($options_advhr['row']==$item_advhr) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_visualaid_callback_function() { echo ' '; ?>"; foreach($items_visualaid as $item_visualaid) { $selected_visualaid = ($options_visualaid['row']==$item_visualaid) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_anchor_callback_function() { echo ' '; ?>"; foreach($items_anchor as $item_anchor) { $selected_anchor = ($options_anchor['row']==$item_anchor) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_sub_callback_function() { echo ' '; ?>"; foreach($items_sub as $item_sub) { $selected_sub = ($options_sub['row']==$item_sub) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_sup_callback_function() { echo ' '; ?>"; foreach($items_sup as $item_sup) { $selected_sup = ($options_sup['row']==$item_sup) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_search_callback_function() { echo ' '; ?>"; foreach($items_search as $item_search) { $selected_search = ($options_search['row']==$item_search) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_replace_callback_function() { echo ' '; ?>"; foreach($items_replace as $item_replace) { $selected_replace = ($options_replace['row']==$item_replace) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_datetime_callback_function() { echo ' '; ?>"; foreach($items_datetime as $item_datetime) { $selected_datetime = ($options_datetime['row']==$item_datetime) ? 'selected="selected"' : ''; echo ""; } echo ""; } // Begin Callback functions for each individual setting registered in code above. // Callback Functions for Row 4 Buttons function jwl_styleselect_callback_function() { echo ' '; ?>"; foreach($items_styleselect as $item_styleselect) { $selected_styleselect = ($options_styleselect['row']==$item_styleselect) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_tableDropdown_callback_function() { echo ' '; ?>"; foreach($items_tableDropdown as $item_tableDropdown) { $selected_tableDropdown = ($options_tableDropdown['row']==$item_tableDropdown) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_emotions_callback_function() { echo ' '; ?>"; foreach($items_emotions as $item_emotions) { $selected_emotions = ($options_emotions['row']==$item_emotions) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_image_callback_function() { echo ' '; ?>"; foreach($items_image as $item_image) { $selected_image = ($options_image['row']==$item_image) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_preview_callback_function() { echo ' '; ?>"; foreach($items_preview as $item_preview) { $selected_preview = ($options_preview['row']==$item_preview) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_cite_callback_function() { echo ' '; ?>"; foreach($items_cite as $item_cite) { $selected_cite = ($options_cite['row']==$item_cite) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_abbr_callback_function() { echo ' '; ?>"; foreach($items_abbr as $item_abbr) { $selected_abbr = ($options_abbr['row']==$item_abbr) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_acronym_callback_function() { echo ' '; ?>"; foreach($items_acronym as $item_acronym) { $selected_acronym = ($options_acronym['row']==$item_acronym) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_del_callback_function() { echo ' '; ?>"; foreach($items_del as $item_del) { $selected_del = ($options_del['row']==$item_del) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_ins_callback_function() { echo ' '; ?>"; foreach($items_ins as $item_ins) { $selected_ins = ($options_ins['row']==$item_ins) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_attribs_callback_function() { echo ' '; ?>"; foreach($items_attribs as $item_attribs) { $selected_attribs = ($options_attribs['row']==$item_attribs) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_styleprops_callback_function() { echo ' '; ?>"; foreach($items_styleprops as $item_styleprops) { $selected_styleprops = ($options_styleprops['row']==$item_styleprops) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_code_callback_function() { echo ' '; ?>"; foreach($items_code as $item_code) { $selected_code = ($options_code['row']==$item_code) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_codemagic_callback_function() { echo ' '; ?>"; foreach($items_codemagic as $item_codemagic) { $selected_codemagic = ($options_codemagic['row']==$item_codemagic) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_media_callback_function() { echo ' '; ?>"; foreach($items_media as $item_media) { $selected_media = ($options_media['row']==$item_media) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_youtube_callback_function() { echo ' '; ?>"; foreach($items_youtube as $item_youtube) { $selected_youtube = ($options_youtube['row']==$item_youtube) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_imgmap_callback_function() { echo ' '; ?>"; foreach($items_imgmap as $item_imgmap) { $selected_imgmap = ($options_imgmap['row']==$item_imgmap) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_visualchars_callback_function() { echo ' '; ?>"; foreach($items_visualchars as $item_visualchars) { $selected_visualchars = ($options_visualchars['row']==$item_visualchars) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_print_callback_function() { echo ' '; ?>"; foreach($items_print as $item_print) { $selected_print = ($options_print['row']==$item_print) ? 'selected="selected"' : ''; echo ""; } echo ""; } function jwl_shortcodes_callback_function() { echo ' '; ?>"; foreach($items_shortcodes as $item_shortcodes) { $selected_shortcodes = ($options_shortcodes['row']==$item_shortcodes) ? 'selected="selected"' : ''; echo ""; } echo ""; } // Callback functions for miscellaneous options and features // Function and Settings for Tinymce editor color changes function jwl_tinycolor_css_callback_function() { $options = get_option('jwl_tinycolor_css_field_id'); $items = array("Default", "Pink", "Green", "Dark&Green", "Dark&Pink", "Rainbow", "Steel"); echo ""; ?> '; ?> '; ?> '; ?> '; ?> '; ?> '; ?>[break] shortcode'); } function jwl_columns_callback_function() { echo ' '; ?>[one_half]This is the left column.[/one_half] [one_half_last]This is the right column.[/one_half_last]'); } function jwl_signoff_callback_function() { echo ''; ?>Insert the above code using the [signoff] shortcode within your post.'); } // Callback functions for Advanced TinyMCE Features function jwl_defaults_callback_function() { echo ' '; ?> '; ?> '; ?> '; ?>Read the help file first.'); ?> __('Bold Red Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#FF0000', 'fontWeight' => 'bold' )), array( 'title' => __('Bold Green Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#00FF00', 'fontWeight' => 'bold' )), array( 'title' => __('Bold Blue Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#0000FF', 'fontWeight' => 'bold' )), array( 'title' => __('Italic Red Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#FF0000', 'font-style' => 'italic' )), array( 'title' => __('Italic Green Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#00FF00', 'font-style' => 'italic' )), array( 'title' => __('Italic Blue Text','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'color' => '#0000FF', 'font-style' => 'italic' )), array( 'title' => __('Borders','jwl-ultimate-tinymce')), array( 'title' => __('Border Black','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'border' => '1px solid #000000', 'padding' => '2px' )), array( 'title' => __('Border Red','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'border' => '1px solid #FF0000', 'padding' => '2px' )), array( 'title' => __('Border Green','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'border' => '1px solid #00FF00', 'padding' => '2px' )), array( 'title' => __('Border Blue','jwl-ultimate-tinymce'), 'inline' => 'span', 'styles' => array( 'border' => '1px solid #0000FF', 'padding' => '2px' )), array( 'title' => __('Float','jwl-ultimate-tinymce')), array( 'title' => __('Float Left','jwl-ultimate-tinymce'), 'block' => 'span', 'styles' => array( 'float' => 'left' )), array( 'title' => __('Float Right','jwl-ultimate-tinymce'), 'block' => 'span', 'styles' => array( 'float' => 'right' )), array( 'title' => __('Alerts','jwl-ultimate-tinymce')), array( 'title' => __('Normal Alert','jwl-ultimate-tinymce'), 'block' => 'div', 'styles' => array( 'border' => 'solid 1px #DEDEDE', 'background' => '#EFEFEF url('.plugin_dir_url( __FILE__ ).'img/normal.png) 8px 4px no-repeat', 'background-repeat' => 'no-repeat', 'color' => '#222222' , 'padding' => '4px 4px 4px 30px' , 'text-align' => 'left' )), array( 'title' => __('Green Alert','jwl-ultimate-tinymce'), 'block' => 'div', 'styles' => array( 'border' => 'solid 1px #1EDB0D', 'background' => '#A9FCA2 url('.plugin_dir_url( __FILE__ ).'img/green.png) 8px 4px no-repeat', 'background-repeat' => 'no-repeat', 'color' => '#222222' , 'padding' => '4px 4px 4px 30px' , 'text-align' => 'left' )), array( 'title' => __('Yellow Alert','jwl-ultimate-tinymce'), 'block' => 'div', 'styles' => array( 'border' => 'solid 1px #F5F531', 'background' => '#FAFAB9 url('.plugin_dir_url( __FILE__ ).'img/yellow.png) 8px 4px no-repeat', 'background-repeat' => 'no-repeat', 'color' => '#222222' , 'padding' => '4px 4px 4px 30px' , 'text-align' => 'left' )), array( 'title' => __('Red Alert','jwl-ultimate-tinymce'), 'block' => 'div', 'styles' => array( 'border' => 'solid 1px #ED220C', 'background' => '#FABDB6 url('.plugin_dir_url( __FILE__ ).'img/red.png) 8px 4px no-repeat', 'background-repeat' => 'no-repeat', 'color' => '#222222' , 'padding' => '4px 4px 4px 30px' , 'text-align' => 'left' )) ); $settings['style_formats'] = json_encode( $style_formats ); return $settings; } add_filter( 'tiny_mce_before_init', 'josh_mce_before_init' ); } // User option for adding the clear div buttons in the visual editor function tinymce_add_button_div($buttons) { $jwl_div = get_option('jwl_div_field_id'); if ($jwl_div == "1") array_push($buttons, "separator", "clearleft","clearright","clearboth"); return $buttons; } add_filter('mce_buttons', 'tinymce_add_button_div'); // Function to remove wpautop $jwl_autop = get_option('jwl_autop_field_id'); if ($jwl_autop == "1"){ remove_filter ('the_content', 'wpautop'); } // Functions for miscellaneous options and features // Function for NextPage Feature $jwl_tinymce_nextpage = get_option('jwl_tinymce_nextpage_field_id'); if ($jwl_tinymce_nextpage == "1"){ add_filter('mce_buttons','jwl_nextpage_button'); function jwl_nextpage_button($mce_buttons) { $pos = array_search('wp_more',$mce_buttons,true); if ($pos !== false) { $tmp_buttons = array_slice($mce_buttons, 0, $pos+1); $tmp_buttons[] = 'wp_page'; $mce_buttons = array_merge($tmp_buttons, array_slice($mce_buttons, $pos+1)); } return $mce_buttons; } } // Function for excerpt editor $jwl_tinymce_excerpt = get_option('jwl_tinymce_excerpt_field_id'); if ($jwl_tinymce_excerpt == "1"){ function jwl_tinymce_excerpt_js(){ ?> 'widget_execphp', 'description' => __('Arbitrary text, HTML, or PHP Code')); $control_ops = array('width' => 400, 'height' => 350); $this->WP_Widget('execphp', __('PHP Code'), $widget_ops, $control_ops); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance ); $text = apply_filters( 'widget_execphp', $instance['text'], $instance ); echo $before_widget; if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } ob_start(); eval('?>'.$text); $text = ob_get_contents(); ob_end_clean(); ?>
'', 'text' => '' ) ); $title = strip_tags($instance['title']); $text = format_to_edit($instance['text']); ?>

/> 

'; } add_shortcode( 'break', 'jwl_insert_linebreak' ); } // User option for adding a signoff shortcode for tinymce visual editor (Goes with custom message box below) function jwl_sign_off_text() { $jwl_signoff = get_option('jwl_signoff_field_id'); return $jwl_signoff; } add_shortcode('signoff', 'jwl_sign_off_text'); // Add column shortcodes for tinymce editor $jwl_columns = get_option('jwl_columns_field_id'); if ($jwl_columns == "1"){ function jwl_one_third( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_third', 'jwl_one_third'); function jwl_one_third_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_third_last', 'jwl_one_third_last'); function jwl_two_third( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('two_third', 'jwl_two_third'); function jwl_two_third_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('two_third_last', 'jwl_two_third_last'); function jwl_one_half( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_half', 'jwl_one_half'); function jwl_one_half_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_half_last', 'jwl_one_half_last'); function jwl_one_fourth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_fourth', 'jwl_one_fourth'); function jwl_one_fourth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_fourth_last', 'jwl_one_fourth_last'); function jwl_three_fourth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('three_fourth', 'jwl_three_fourth'); function jwl_three_fourth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('three_fourth_last', 'jwl_three_fourth_last'); function jwl_one_fifth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_fifth', 'jwl_one_fifth'); function jwl_one_fifth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_fifth_last', 'jwl_one_fifth_last'); function jwl_two_fifth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('two_fifth', 'jwl_two_fifth'); function jwl_two_fifth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('two_fifth_last', 'jwl_two_fifth_last'); function jwl_three_fifth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('three_fifth', 'jwl_three_fifth'); function jwl_three_fifth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('three_fifth_last', 'jwl_three_fifth_last'); function jwl_four_fifth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('four_fifth', 'jwl_four_fifth'); function jwl_four_fifth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('four_fifth_last', 'jwl_four_fifth_last'); function jwl_one_sixth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_sixth', 'jwl_one_sixth'); function jwl_one_sixth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('one_sixth_last', 'jwl_one_sixth_last'); function jwl_five_sixth( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('five_sixth', 'jwl_five_sixth'); function jwl_five_sixth_last( $atts, $content = null ) { return '
' . do_shortcode($content) . '
'; } add_shortcode('five_sixth_last', 'jwl_five_sixth_last'); function jwl_column_stylesheet() { $my_style_url = WP_PLUGIN_URL . '/ultimate-tinymce/css/column-style.css'; $my_style_file = WP_PLUGIN_DIR . '/ultimate-tinymce/css/column-style.css'; if ( file_exists($my_style_file) ) { wp_register_style('column-styles', $my_style_url); wp_enqueue_style('column-styles'); } } add_action('wp_print_styles', 'jwl_column_stylesheet'); } // Functions for shortcodes dropdown in editor $jwl_shortcodes = get_option('jwl_shortcodes_field_id'); if ($jwl_shortcodes == "1") { if(!class_exists('ShortcodesEditorSelector')): class ShortcodesEditorSelector{ var $buttonName = 'ShortcodeSelector'; function addSelector(){ // Don't bother doing this stuff if the current user lacks permissions if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) return; // Add only in Rich Editor mode if ( get_user_option('rich_editing') == 'true') { add_filter('mce_external_plugins', array($this, 'registerTmcePlugin')); $jwl_shortcodes_dropdown = get_option('jwl_shortcodes_dropdown'); $jwl_shortcodes_dropdown2 = $jwl_shortcodes_dropdown['row']; if ($jwl_shortcodes_dropdown2 == 'Row 1') { add_filter("mce_buttons", array($this, 'registerButton')); } if ($jwl_shortcodes_dropdown2 == 'Row 2') { add_filter("mce_buttons_2", array($this, 'registerButton')); } if ($jwl_shortcodes_dropdown2 == 'Row 3') { add_filter("mce_buttons_3", array($this, 'registerButton')); } if ($jwl_shortcodes_dropdown2 == 'Row 4') { add_filter("mce_buttons_4", array($this, 'registerButton')); } } } function registerButton($buttons){ array_push($buttons, $this->buttonName); return $buttons; } function registerTmcePlugin($plugin_array_shortcodes){ $plugin_array_shortcodes[$this->buttonName] = plugin_dir_url( __FILE__ ) . 'shortcodes-editor-selector/editor_plugin.js.php'; if ( get_user_option('rich_editing') == 'true') return $plugin_array_shortcodes; } } endif; if(!isset($shortcodesES)){ $shortcodesES = new ShortcodesEditorSelector(); add_action('admin_head', array($shortcodesES, 'addSelector')); } } /* * Here we are generating the admin options page. * This will allow us to include all scripts and code to mimic the main dashboard admin page. */ // Avoid direct calls to this file where wp core files not present if (!function_exists ('add_action')) { header('Status: 403 Forbidden'); header('HTTP/1.1 403 Forbidden'); exit(); } define('JWL_ADMIN_PAGE_NAME', 'ultimate-tinymce'); //class that reperesents the plugins complete admin options page. class jwl_metabox_admin { //constructor of class, PHP4 compatible construction for backward compatibility function jwl_metabox_admin() { //add filter for WordPress 2.8 changed backend box system ! add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2); //register callback for admin menu setup add_action('admin_menu', array(&$this, 'on_admin_menu')); //register the callback been used if options of page been submitted and needs to be processed add_action('admin_post_save_ultimate-tinymce-general', array(&$this, 'on_save_changes')); } //for WordPress 2.8 we have to tell, that we support 2 columns ! function on_screen_layout_columns($columns, $screen) { if ($screen == $this->pagehook) { $columns[$this->pagehook] = 2; } return $columns; } //extend the admin menu function on_admin_menu() { //add our own option page, you can also add it to different sections or use your own one $this->pagehook = add_options_page('Ultimate TinyMCE Plugin Page', __('Ultimate TinyMCE','jwl-ultimate-tinymce'), 'manage_options', JWL_ADMIN_PAGE_NAME, array(&$this, 'jwl_options_page')); //register callback gets call prior your own page gets rendered add_action('load-'.$this->pagehook, array(&$this, 'jwl_on_load_page')); add_action('admin_print_styles-'.$this->pagehook, array(&$this, 'jwl_admin_register_head_styles')); add_action('admin_print_scripts-'.$this->pagehook, array(&$this, 'jwl_admin_register_head_scripts')); } function jwl_admin_register_head_styles() { /** Register */ wp_register_style('admin-panel-css', plugins_url('css/admin_panel.css', __FILE__), array(), '1.0.0', 'all'); /** Enqueue */ wp_enqueue_style('admin-panel-css'); } function jwl_admin_register_head_scripts() { $url2 = plugin_dir_url( __FILE__ ) . 'js/pop-up.js'; // Added for popup help javascript echo "\n"; // Added for popup help javascript } //will be executed if wordpress core detects this page has to be rendered function jwl_on_load_page() { //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes wp_enqueue_script('common'); wp_enqueue_script('wp-lists'); wp_enqueue_script('postbox'); //add metaboxes now, all metaboxes registered during load page can be switched off/on at "Screen Options" automatically, nothing special to do therefore // Can use 'normal', 'side', or 'additional' when defining metabox positions add_meta_box('postbox_resources', 'Additional Resources', array(&$this, 'postbox_resources'), $this->pagehook, 'side', 'core'); add_meta_box('postbox_firefox', 'TinyMCE + Firefox = Best Experience', array(&$this, 'postbox_firefox'), $this->pagehook, 'side', 'core'); add_meta_box('postbox_vote', 'Please VOTE and click WORKS.', array(&$this, 'postbox_vote'), $this->pagehook, 'side', 'core'); add_meta_box('postbox_blog', 'Bloggers!!', array(&$this, 'postbox_blog'), $this->pagehook, 'side', 'core'); add_meta_box('postbox_feedback', 'Feedback', array(&$this, 'postbox_feedback'), $this->pagehook, 'side', 'core'); add_meta_box('postbox_poll', 'Plugin Poll', array(&$this, 'postbox_poll'), $this->pagehook, 'side', 'core'); add_meta_box('jwl_metabox1', __('Buttons Group 1'), array(&$this, 'buttons_group_1'), $this->pagehook, 'normal', 'core'); add_meta_box('jwl_metabox2', __('Buttons Group 2'), array(&$this, 'buttons_group_2'), $this->pagehook, 'normal', 'core'); add_meta_box('jwl_metabox3', __('Enable Advanced Features'), array(&$this, 'buttons_group_3'), $this->pagehook, 'normal', 'core'); add_meta_box('jwl_metabox4', __('Miscellaneous Features'), array(&$this, 'buttons_group_4'), $this->pagehook, 'normal', 'core'); } //executed to show the plugins complete admin page function jwl_options_page() { //we need the global screen column value to beable to have a sidebar in WordPress 2.8 global $screen_layout_columns; //add a 3rd content box now for demonstration purpose, boxes added at start of page rendering can't be switched on/off, //may be needed to ensure that a special box is always available //add_meta_box('postbox_addons', 'Plugin Addons', array(&$this, 'postbox_addons'), $this->pagehook, 'side', 'core'); //define some data can be given to each metabox during rendering $data = array('My Data 1', 'My Data 2', 'Available Data 1'); ?>

Ultimate Tinymce Admin Settings Page

Plugin Addons:


Ultimate Moods Addon'; ?> (Toggle)
Ultimate Google Webfonts'; ?> (Toggle)
Ultimate Custom Styles'; ?> (Toggle)
Pre-Defined Styles'; ?> (Toggle)
Donations:

pagehook, 'side', $data); ?>
pagehook, 'normal', $data); ?> pagehook, 'additional', $data); ?>





















.


Download: Fast, Fun, Awesome



Clicking "Works" on the Wordpress plugin download page shows others that Ultimate TinyMCE is stable, and encourages their download.','jwl-ultimate-tinymce'); ?>

HERE, and I will add your website link here.','jwl-ultimate-tinymce'); _e('

Special Thanks to these bloggers:
', 'jwl-ultimate-tinymce'); } function postbox_feedback($data) { sort($data); _e('Please take a moment to complete the short feedback form below. Your input is greatly appreciated. All input fields are optional.','jwl-ultimate-tinymce'); ?>

Name: (Optional)
Email Address: (Optional)
Would you recommend this plugin to a friend?
How would you rate this plugin?
Do you find the new "Help" popups useful?
Have you rated this plugin and clicked "Works" on the wordpress plugin download page?
Have you looked at any of these? (Check all that apply)
Support Forum
Microsoft Word Help Document
"Help" Popups
Please feel free to leave any additional feedback here...

Put a website form like this on your site.

Please click the "Continue" text on the next page after submission to return to this page.



In the meantime, I\'d like to take a poll of which features you consider to be of a higher priority. Please vote on your favorite requested feature. You can vote once per day.

','jwl-ultimate-tinymce'); ?>
Which feature would you like to see?
Better Tables Control and Usage
Better Cross-Browser Compatibility
More examples in the Help Popups
A Shortcodes Manager
A Custom Styles Manager
  
Free polls from Pollhost.com