', apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-addons', 'wprss_addons_page_display' ); add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Help & Support', WPRSS_TEXT_DOMAIN ), __( 'Help & Support', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-help', 'wprss_help_page_display' ); } add_filter('admin_body_class', 'wprss_base_admin_body_class'); /** * Set body class for admin screens * http://www.kevinleary.net/customizing-wordpress-admin-css-javascript/ * @since 2.0 */ function wprss_base_admin_body_class( $classes ) { // Current action if ( is_admin() && isset($_GET['action']) ) { $classes .= 'action-'.$_GET['action']; } // Current post ID if ( is_admin() && isset($_GET['post']) ) { $classes .= ' '; $classes .= 'post-'.$_GET['post']; } // New post type & listing page if ( isset($_GET['post_type']) ) $post_type = $_GET['post_type']; if ( isset($post_type) ) { $classes .= ' '; $classes .= 'post-type-'.$post_type; } // Editting a post type if ( isset( $_GET['post'] ) ) { $post_query = $_GET['post']; } if ( isset($post_query) ) { $current_post_edit = get_post($post_query); $current_post_type = $current_post_edit->post_type; if ( !empty($current_post_type) ) { $classes .= ' '; $classes .= 'post-type-'.$current_post_type; } } // Return the $classes array return $classes; } /** * Change title on wprss_feed post type screen * * @since 2.0 * @return void */ function wprss_change_title_text() { return __( 'Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN ); } add_filter( 'plugin_action_links', 'wprss_plugin_action_links', 10, 2 ); /** * Add Settings action link in plugin listing * * @since 3.0 * @param array $action_links * @param string $plugin_file * @return array */ function wprss_plugin_action_links( $action_links, $plugin_file ) { // check to make sure we are on the correct plugin if ( $plugin_file == 'wp-rss-aggregator/wp-rss-aggregator.php' ) { // the anchor tag and href to the URLs we want. $settings_link = '' . __( 'Settings', WPRSS_TEXT_DOMAIN ) . ''; $docs_link = '' . __( 'Documentation', WPRSS_TEXT_DOMAIN ) . ''; // add the links to the beginning of the list array_unshift( $action_links, $settings_link, $docs_link ); } return $action_links; }