Changeset 5474
- Timestamp:
- 05/04/2017 04:02:34 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/cli.php
r5469 r5474 11 11 add_action( 'init', array( __CLASS__, 'action_init_register_cron_jobs' ) ); 12 12 add_action( 'init', array( __CLASS__, 'action_init_register_post_types' ) ); 13 add_action( 'pre_get_posts', array( __CLASS__, 'action_pre_get_posts' ) ); 13 14 add_action( 'devhub_cli_manifest_import', array( __CLASS__, 'action_devhub_cli_manifest_import' ) ); 14 15 add_action( 'devhub_cli_markdown_import', array( __CLASS__, 'action_devhub_cli_markdown_import' ) ); … … 62 63 } 63 64 65 public static function action_pre_get_posts( $query ) { 66 if ( $query->is_main_query() && $query->is_post_type_archive( 'command' ) ) { 67 $query->set( 'post_parent', 0 ); 68 $query->set( 'orderby', 'title' ); 69 $query->set( 'order', 'ASC' ); 70 $query->set( 'posts_per_page', 250 ); 71 } 72 } 73 64 74 public static function action_devhub_cli_manifest_import() { 65 75 $response = wp_remote_get( self::$commands_manifest );
Note: See TracChangeset
for help on using the changeset viewer.