Changeset 1444844
- Timestamp:
- 06/28/2016 09:48:07 AM (10 years ago)
- File:
-
- 1 edited
-
author-filters/trunk/author-filters.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
author-filters/trunk/author-filters.php
r1428263 r1444844 15 15 function author_filters_install() { 16 16 17 // Clear the permalinks after the post type has been registered17 // Clear/Flush the rewrite rules after the post type has been registered 18 18 flush_rewrite_rules(); 19 19 } … … 23 23 function author_filters_deactivation() { 24 24 25 // Clear the permalinks to remove our post type's rules25 // Clear/Flush the permalinks to remove our post type's rules 26 26 flush_rewrite_rules(); 27 27 } … … 41 41 $post_types_arrays = get_post_types($args, $output, $operator); 42 42 43 $ types_array = array();43 $return_types_array = array(); 44 44 45 $exclude_post_types = array( 'attachment', 'revision', 'nav_menu_item');45 $exclude_post_types = array("revision", "attachment", "nav_menu_item"); 46 46 47 47 foreach ($post_types_arrays as $post_types_aray) { 48 48 if (!in_array($post_types_aray->name, $exclude_post_types)) { 49 array_push($ types_array, $post_types_aray->name);49 array_push($return_types_array, $post_types_aray->name); 50 50 } 51 51 } 52 52 53 return $ types_array;53 return $return_types_array; 54 54 } 55 55 … … 94 94 95 95 global $post_type, $pagenow; 96 96 97 $types_array = author_filters_post_types(); 97 98 98 99 //if we are currently on the edit screen of the post or page type listings 99 // if('edit.php' == $pagenow && ('post' == $post_type || 'page' == $post_type)){100 100 101 if ('edit.php' == $pagenow && (in_array($post_type, $types_array))) { 101 102
Note: See TracChangeset
for help on using the changeset viewer.