. */ define('AJ_NEXTPAGE_vNum','1.0.0'); // Check for location modifications in wp-config // Then define accordingly if ( !defined('WP_CONTENT_URL') ) { define('AJ_NP_PLUGPATH',get_option('siteurl').'/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/'); define('AJ_NP_PLUGDIR', ABSPATH.'/wp-content/plugins/'.plugin_basename(dirname(__FILE__)).'/'); } else { define('AJ_NP_PLUGPATH',WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'); define('AJ_NP_PLUGDIR',WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__)).'/'); } // Create Text Domain For Translations load_plugin_textdomain('AJ', false, basename(dirname(__FILE__)) . '/languages/'); // visual editor: display the nextpage shortcode button add_filter('mce_buttons','wysiwyg_editor'); // optional css dashboard modifications add_action( 'admin_head', 'load_aj_nextpage_style' ); // html editor: display the nextpage shortcode button add_action('admin_print_footer_scripts', '_add_my_quicktags'); // function to unhide the EXISTING nextpage button function wysiwyg_editor($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 load_aj_nextpage_style() { // custom css to spruce up the way the nextpage icon looks since // it doesn't really convey "next page" wp_enqueue_style('aj-nextpage-style', AJ_NP_PLUGPATH.'aj-nextpage.css', false, 'all'); } // Add buttons to html editor, Wordpress 3.3+ method only if( !function_exists('_add_my_quicktags') ){ function _add_my_quicktags() { ?>