'read', 2 => 'separator-anthologize', 4 => 'wp-menu-separator' ); $plugin_pages = array(); // Adds the top-level Anthologize Dashboard menu button $this->add_admin_menu_page( array( 'menu_title' => __( 'Anthologize', 'anthologize' ), 'page_title' => __( 'Anthologize', 'anthologize' ), 'access_level' => 'manage_options', 'file' => 'anthologize', 'function' => array( $this, 'display'), 'position' => 56 ) ); // Creates the submenu items $plugin_pages[] = add_submenu_page( 'anthologize', __('My Projects','anthologize'), __('My Projects','anthologize'), 'manage_options', 'anthologize', array ( $this, 'display' ) ); $plugin_pages[] = add_submenu_page( 'anthologize', __('New Project','anthologize'), __('New Project','anthologize'), 'manage_options', dirname( __FILE__ ) . '/class-new-project.php'); $plugin_pages[] = add_submenu_page( 'anthologize', __( 'Export Project', 'anthologize' ), __( 'Export Project', 'anthologize' ), 'manage_options', dirname( __FILE__ ) . '/class-export-panel.php' ); $plugin_pages[] = add_submenu_page( 'anthologize', __( 'Import Content', 'anthologize' ), __( 'Import Content', 'anthologize' ), 'manage_options', dirname( __FILE__ ) . '/class-import-feeds.php' ); foreach ( $plugin_pages as $plugin_page ) { add_action( "admin_print_styles", array( $this, 'load_styles' ) ); add_action( "admin_print_scripts", array( $this, 'load_scripts' ) ); } } // Borrowed, with much love, from BuddyPress. Allows us to put Anthologize way up top. function add_admin_menu_page( $args = '' ) { global $menu, $admin_page_hooks, $_registered_pages; $defaults = array( 'page_title' => '', 'menu_title' => '', 'access_level' => 2, 'file' => false, 'function' => false, 'icon_url' => false, 'position' => 100 ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); $file = plugin_basename( $file ); $admin_page_hooks[$file] = sanitize_title( $menu_title ); $hookname = get_plugin_page_hookname( $file, '' ); if (!empty ( $function ) && !empty ( $hookname )) add_action( $hookname, $function ); if ( empty($icon_url) ) $icon_url = 'images/generic.png'; elseif ( is_ssl() && 0 === strpos($icon_url, 'http://') ) $icon_url = 'https://' . substr($icon_url, 7); do { $position++; } while ( !empty( $menu[$position] ) ); $menu[$position] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); unset( $menu[$position][5] ); $_registered_pages[$hookname] = true; return $hookname; } function load_scripts() { wp_enqueue_script( 'anthologize-js', WP_PLUGIN_URL . '/anthologize/js/project-organizer.js' ); wp_enqueue_script( 'jquery'); wp_enqueue_script( 'jquery-ui-core'); wp_enqueue_script( 'jquery-ui-sortable'); wp_enqueue_script( 'jquery-ui-draggable'); wp_enqueue_script( 'jquery-ui-datepicker', WP_PLUGIN_URL . '/anthologize/js/jquery-ui-datepicker.js'); wp_enqueue_script( 'jquery-cookie', WP_PLUGIN_URL . '/anthologize/js/jquery-cookie.js' ); wp_enqueue_script( 'blockUI-js', WP_PLUGIN_URL . '/anthologize/js/jquery.blockUI.js' ); wp_enqueue_script( 'anthologize_admin-js', WP_PLUGIN_URL . '/anthologize/js/anthologize_admin.js' ); wp_enqueue_script( 'anthologize-sortlist-js', WP_PLUGIN_URL . '/anthologize/js/anthologize-sortlist.js' ); } function load_styles() { wp_enqueue_style( 'anthologize-css', WP_PLUGIN_URL . '/anthologize/css/project-organizer.css' ); wp_enqueue_style( 'jquery-ui-datepicker-css', WP_PLUGIN_URL . '/anthologize/css/jquery-ui-1.7.3.custom.css'); } function load_project_organizer( $project_id ) { require_once( dirname( __FILE__ ) . '/class-project-organizer.php' ); $project_organizer = new Anthologize_Project_Organizer( $project_id ); $project_organizer->display(); } function display_no_project_id_message() { ?>

|
' . __('Project Details', 'anthologize') . ''; $controlActions[] = ''.__('Manage Parts', 'anthologize') . ''; $controlActions[] = ''.__('Delete Project', 'anthologize') . ''; ?> |
get_project_parts(); echo count($parts); ?> | get_project_items(); echo count($items); ?> | post_date ) ) ?> |
|---|
Anthologize will not work with your version of WordPress. You are currently running version WordPress v%s, and Anthologize requires version 3.0 or greater. Please upgrade WordPress if you'd like to use Anthologize. ", 'buddypress' ), $wp_version ) ?>