public static function init() { if (!is_admin()) { self::check_for_marketing_link(); } $args = array('labels' => array('name' => __('MDTF Marketing', 'meta-data-filter'), 'singular_name' => __('Marketing Links', 'meta-data-filter'), 'add_new' => __('Add New Link', 'meta-data-filter'), 'add_new_item' => __('Add New Link', 'meta-data-filter'), 'edit_item' => __('Edit Link', 'meta-data-filter'), 'new_item' => __('New Link', 'meta-data-filter'), 'view_item' => __('View Link', 'meta-data-filter'), 'search_items' => __('Search Links', 'meta-data-filter'), 'not_found' => __('No Links found', 'meta-data-filter'), 'not_found_in_trash' => __('No Links found in Trash', 'meta-data-filter'), 'parent_item_colon' => ''), 'public' => false, 'archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => true, 'menu_position' => null, 'supports' => array('title', 'excerpt'), 'rewrite' => array('slug' => self::$slug_links), 'show_in_admin_bar' => false, 'menu_icon' => '', 'taxonomies' => array(self::$slug_links_cat)); register_taxonomy(self::$slug_links_cat, array(self::$slug_links), array("labels" => array('name' => __('Links Types', 'meta-data-filter'), 'singular_name' => __('MDTF Marketing Links Types', 'meta-data-filter'), 'add_new' => __('Add New', 'meta-data-filter'), 'add_new_item' => __('Add New Marketing Type', 'meta-data-filter'), 'edit_item' => __('Edit Marketing Types', 'meta-data-filter'), 'new_item' => __('New Marketing Type', 'meta-data-filter'), 'view_item' => __('View Marketing Type', 'meta-data-filter'), 'search_items' => __('Search Marketing Types', 'meta-data-filter'), 'not_found' => __('No Marketing Types found', 'meta-data-filter'), 'not_found_in_trash' => __('No Marketing Types found in Trash', 'meta-data-filter'), 'parent_item_colon' => ''), "singular_label" => __("Marketing Types", 'meta-data-filter'), 'show_in_nav_menus' => true, 'capabilities' => array('manage_terms'), 'show_ui' => true, 'term_group' => true, 'hierarchical' => true, 'query_var' => true, 'rewrite' => array('slug' => self::$slug_links), 'orderby' => 'name')); register_post_type(self::$slug_links, $args); self::$settings = get_option('mdf_marketing_settings'); add_action('admin_init', array(__CLASS__, 'admin_init'), 1); add_action('admin_menu', array(__CLASS__, 'admin_menu'), 1); add_action('save_post', array(__CLASS__, 'save_post'), 1); add_action("manage_" . self::$slug_links . "_posts_custom_column", array(__CLASS__, "show_edit_columns_content")); add_filter("manage_" . self::$slug_links . "_posts_columns", array(__CLASS__, "show_edit_columns")); add_filter('parse_query', array(__CLASS__, "parse_query")); add_action('restrict_manage_posts', array(__CLASS__, "restrict_manage_posts")); //+++ if (!is_admin()) { //add_action('pre_get_posts', array(__CLASS__, 'pre_get_posts')); } }
echo $mdf_link_seo_suffix; ?> </fieldset> </td> </tr> <tr valign="top"> <th scope="row"><?php _e("Link SEO prefix", 'meta-data-filter'); ?> <br></th> <td> <fieldset> <select name="mdf_link_seo_prefix"> <?php foreach (MDF_Marketing::get_link_prefixes() as $prefix) { ?> <option <?php echo selected($mdf_link_seo_prefix, $prefix); ?> value="<?php echo $prefix; ?> "><?php echo $prefix; ?> </option> <?php } ?> </select>