Changeset 1331 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php
- Timestamp:
- 02/25/2015 11:26:57 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php
r1321 r1331 69 69 } 70 70 71 if ( ! post_type_exists( 'theme_shop' ) ) { 72 register_post_type( 'theme_shop', array( 73 'labels' => array( 74 'name' => __( 'Theme Shops', 'wporg-themes' ), 75 'singular_name' => __( 'Theme Shop', 'wporg-themes' ), 76 'add_new' => __( 'Add New', 'wporg-themes' ), 77 'add_new_item' => __( 'Add New Theme Shop', 'wporg-themes' ), 78 'edit_item' => __( 'Edit Theme Shop', 'wporg-themes' ), 79 'new_item' => __( 'New Theme Shop', 'wporg-themes' ), 80 'view_item' => __( 'View Theme Shop', 'wporg-themes' ), 81 'search_items' => __( 'Search Theme Shops', 'wporg-themes' ), 82 'not_found' => __( 'No Theme Shops found', 'wporg-themes' ), 83 'not_found_in_trash' => __( 'No Theme Shops found in Trash', 'wporg-themes' ), 84 'parent_item_colon' => __( 'Parent Theme Shop:', 'wporg-themes' ), 85 'menu_name' => __( 'Theme Shops', 'wporg-themes' ), 86 ), 87 'supports' => array( 'title', 'editor', 'author', 'custom-fields' ), 88 'public' => true, 89 'show_in_nav_menus' => false, 90 'exclude_from_search' => true, 91 'menu_icon' => 'dashicons-businessman', 92 ) ); 93 } 94 71 95 // Add the browse/* views 72 96 add_rewrite_tag( '%browse%', '(featured|popular|new)' ); … … 83 107 */ 84 108 function wporg_themes_set_up_query( $wp_query ) { 85 if ( is_admin() || in_array( $wp_query->get( 'pagename' ), array( 'upload', 'commercial', 'getting-started' ) ) || 'nav_menu_item' == $wp_query->get( 'post_type') ) {109 if ( is_admin() || in_array( $wp_query->get( 'pagename' ), array( 'upload', 'commercial', 'getting-started' ) ) || in_array( $wp_query->get( 'post_type' ), array( 'nav_menu_item', 'theme_shop' ) ) ) { 86 110 return $wp_query; 87 111 }
Note: See TracChangeset
for help on using the changeset viewer.