Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #19958, comment 3


Ignore:
Timestamp:
09/30/2013 10:00:50 PM (11 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19958, comment 3

    initial v1  
    11What about instead putting a filter on the arguments for the wp_dropdown_pages call that produces the list of pages to choose from (line 96 in wp-admin/options-reading.php)? A developer could then use :
    2 
    3 
    4 ----
     2{{{
    53function filter_my_cpt($args) {
    64  $args[post_type] = 'cpt-slug';[[BR]]
    75
    86  //to also maintain pages: $args[post_type] = 'pages, cpt-slug'
    9 }[[BR]]
    10 add_filter('options-front-page' , filter_my_cpt');[[BR]]
     7}
     8add_filter('options-front-page' , filter_my_cpt');
    119add_filter('options-posts-page' , filter_my_cpt');
    12 ----
     10}}}