Make WordPress Core

Changeset 22653


Ignore:
Timestamp:
11/19/2012 01:28:32 AM (11 years ago)
Author:
nacin
Message:

Revert page on front changes. Reverts [22127] [22129] [22135] [22136]. see #16379.

Location:
trunk
Files:
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin-rtl.css

    r22641 r22653  
    972972}
    973973
    974 #front-static-pages .sub-option,
     974#front-page-warning,
     975#front-static-pages ul,
    975976ul.export-filters,
    976977.inline-editor ul.cat-checklist ul,
  • trunk/wp-admin/css/wp-admin.css

    r22647 r22653  
    717717}
    718718
     719select[disabled] {
     720    color: #7f7f7f;
     721}
     722
    719723select:focus {
    720724    border-color: #aaa;
     
    30213025}
    30223026
    3023 #front-static-pages #edit-slug-box {
    3024     padding: 0;
    3025 }
    3026 
    30273027#editable-post-name-full {
    30283028    display: none;
     
    35113511}
    35123512
    3513 #front-static-pages .sub-option,
     3513#front-page-warning,
     3514#front-static-pages ul,
    35143515ul.export-filters,
    35153516.inline-editor ul.cat-checklist ul,
     
    50675068}
    50685069
    5069 .js.options-reading-php .if-page-on-front,
    5070 .js.options-reading-php .if-page-for-posts,
    5071 .options-reading-php .if-new-front-page {
    5072     display: none;
    5073 }
    5074 .options-reading-php .page-on-front .if-page-on-front,
    5075 .options-reading-php .page-for-posts .if-page-for-posts {
    5076     display: block;
    5077 }
    5078 .options-reading-php .new-front-page .if-new-front-page {
    5079     display: inline;
    5080 }
    5081 
    50825070/*------------------------------------------------------------------------------
    50835071  21.0 - Admin Footer
  • trunk/wp-admin/includes/ajax-actions.php

    r22541 r22653  
    12991299    $title = isset($_POST['new_title'])? $_POST['new_title'] : '';
    13001300    $slug = isset($_POST['new_slug'])? $_POST['new_slug'] : null;
    1301     $screen = isset( $_POST['screen'] ) ? $_POST['screen'] : 'post';
    1302     wp_die( get_sample_permalink_html( $post_id, $title, $slug, $screen ) );
     1301    wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
    13031302}
    13041303
  • trunk/wp-admin/includes/post.php

    r22532 r22653  
    10561056 * @param string $new_title Optional. New title.
    10571057 * @param string $new_slug Optional. New slug.
    1058  * @param string|WP_Screen $screen Optional. Screen where the editor is being shown.
    10591058 * @return string The HTML of the sample permalink slug editor.
    10601059 */
    1061 function get_sample_permalink_html( $id, $new_title = null, $new_slug = null, $screen = null ) {
     1060function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
    10621061    global $wpdb;
    10631062    $post = get_post($id);
    10641063
    10651064    list($permalink, $post_name) = get_sample_permalink($post->ID, $new_title, $new_slug);
    1066 
    1067     if ( isset( $screen ) )
    1068         $screen = convert_to_screen( $screen );
    1069     else
    1070         $screen = get_current_screen();
    10711065
    10721066    if ( 'publish' == get_post_status( $post ) ) {
     
    10791073
    10801074    if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) {
    1081         if ( 'options-reading' == $screen->id )
    1082             return '';
    10831075        $return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink" tabindex="-1">' . $permalink . "</span>\n";
    10841076        if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) )
    10851077            $return .= '<span id="change-permalinks"><a href="options-permalink.php" class="button button-small" target="_blank">' . __('Change Permalinks') . "</a></span>\n";
    1086         if ( isset($view_post) )
     1078        if ( isset( $view_post ) )
    10871079            $return .= "<span id='view-post-btn'><a href='$permalink' class='button button-small'>$view_post</a></span>\n";
    10881080
     
    11091101    $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
    11101102    $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
    1111     $return  = ( 'options-reading' == $screen->id ) ? __( 'Located at' ) . "\n" : '<strong>' . __( 'Permalink:' ) . "</strong>\n";
     1103    $return =  '<strong>' . __('Permalink:') . "</strong>\n";
    11121104    $return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";
    11131105    $return .= '&lrm;'; // Fix bi-directional text display defect in RTL languages.
    11141106    $return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button button-small hide-if-no-js" onclick="editPermalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
    11151107    $return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
    1116     if ( isset( $view_post ) && 'options-reading' != $screen->id )
     1108    if ( isset($view_post) )
    11171109        $return .= "<span id='view-post-btn'><a href='$view_link' class='button button-small'>$view_post</a></span>\n";
    11181110
     
    13301322    return $url;
    13311323}
    1332 
    1333 /**
    1334  * Creates new pages to be set as a front page or a page for posts in Reading Settings.
    1335  *
    1336  * @todo Make sure we are doing adequate sanitization on success, and cleanup/reset on failure.
    1337  *
    1338  * @since 3.5.0
    1339  * @access private
    1340  */
    1341 function _show_on_front_reading_settings( $show_on_front_value ) {
    1342     // If we're not saving the Reading Settings screen, don't intercept.
    1343     if ( ! $_POST || ! strpos( wp_get_referer(), 'options-reading.php' ) )
    1344         return $show_on_front_value;
    1345 
    1346     if ( 'posts' == $show_on_front_value ) {
    1347         update_option( 'page_on_front', 0 );
    1348         update_option( 'page_for_posts', 0 );
    1349         return $show_on_front_value;
    1350     }
    1351 
    1352     // If a new front page was meant to be created, go forth and create it.
    1353     if ( 'new' == $_POST['page_on_front'] ) {
    1354 
    1355         // If the user can't create pages, revert.
    1356         if ( ! current_user_can( 'create_posts', 'page' ) ) {
    1357             // If an existing page is set, keep things as is, rather than reverting to showing posts.
    1358             if ( get_option( 'page_on_front' ) ) {
    1359                 $show_on_front_value = 'page';
    1360             } else {
    1361                 $show_on_front_value = 'posts';
    1362                 update_option( 'page_on_front', 0 );
    1363                 update_option( 'page_for_posts', 0 );
    1364             }
    1365             add_settings_error( 'page_on_front', 'create_pages', __( 'You are not allowed to create pages on this site.' ) );
    1366             return $show_on_front_value;
    1367         }
    1368 
    1369         $existing_page = get_page_by_title( stripslashes( $_POST['page_on_front_title'] ) );
    1370 
    1371         // If page already exists and it's public, there's no need to create a new page.
    1372         if ( $existing_page && 'publish' == $existing_page->post_status ) {
    1373             $page_id = $existing_page->ID;
    1374         } else {
    1375             $page_id = wp_insert_post( array(
    1376                 'post_title' => $_POST['page_on_front_title'],
    1377                 'post_type' => 'page',
    1378                 'post_status' => 'publish',
    1379                 'comment_status' => 'closed',
    1380                 'ping_status' => 'closed',
    1381                 // @todo Create some sort of a 'context' in postmeta so we know we created a page through these means.
    1382                 //       Consider then showing that context in the list table as a good-first-step.
    1383             ) );
    1384         }
    1385 
    1386         if ( $page_id ) {
    1387             update_option( 'page_on_front', $page_id );
    1388         // If we can't save it, revert.
    1389         } elseif ( get_option( 'page_on_front' ) ) {
    1390             // If an existing page is set, keep things as is, rather than reverting to showing posts.
    1391             $show_on_front_value = 'page';
    1392         } else {
    1393             $show_on_front_value = 'posts';
    1394             update_option( 'page_on_front', 0 );
    1395             update_option( 'page_for_posts', 0 );
    1396             return $show_on_front_value;
    1397         }
    1398     } elseif ( $_POST['page_on_front'] ) {
    1399         update_option( 'page_on_front', $_POST['page_on_front'] );
    1400     } else {
    1401         // They didn't select a page at all. Sad face.
    1402         $show_on_front_value = 'posts';
    1403         update_option( 'page_on_front', 0 );
    1404         update_option( 'page_for_posts', 0 );
    1405         add_settings_error( 'page_on_front', 'no_page_selected', __( 'You must select a page to set a static front page.' ) );
    1406         return $show_on_front_value;
    1407     }
    1408 
    1409     // If a page for posts was meant to be specified, update/create it.
    1410     if ( ! isset( $_POST['page_for_posts'] ) ) {
    1411         update_option( 'page_for_posts', 0 );
    1412         return $show_on_front_value;
    1413     }
    1414 
    1415     $page_for_posts = (int) $_POST['page_for_posts'];
    1416 
    1417     if ( ! $page_for_posts || ! $page = get_post( $page_for_posts, ARRAY_A ) ) {
    1418         update_option( 'page_for_posts', 0 );
    1419         return $show_on_front_value;
    1420     }
    1421 
    1422     if ( 'page' != $page['post_type'] || ! current_user_can( 'edit_post', $page_for_posts ) ) {
    1423         update_option( 'page_for_posts', 0 );
    1424         return $show_on_front_value;
    1425     }
    1426 
    1427     if ( 'publish' != $page['post_status'] && ! current_user_can( 'publish_post', $page_for_posts ) ) {
    1428         update_option( 'page_for_posts', 0 );
    1429         return $show_on_front_value;
    1430     }
    1431 
    1432     $args = add_magic_quotes( $page );
    1433     $args['post_title']  = $_POST['page_for_posts_title'];
    1434     $args['post_name']   = $_POST['post_name'];
    1435     $args['post_status'] = 'publish';
    1436     if ( 'auto-draft' == $page['post_status'] ) {
    1437         $args['comment_status'] = 'closed';
    1438         $args['ping_status'] = 'closed';
    1439     }
    1440 
    1441     $page_id = wp_insert_post( $args );
    1442     update_option( 'page_for_posts', $page_id );
    1443 
    1444     return $show_on_front_value;
    1445 }
    1446 add_filter( 'sanitize_option_show_on_front', '_show_on_front_reading_settings' );
  • trunk/wp-admin/js/post.js

    r22606 r22653  
    573573    } // end submitdiv
    574574
     575    // permalink
     576    if ( $('#edit-slug-box').length ) {
     577        editPermalink = function(post_id) {
     578            var i, c = 0, e = $('#editable-post-name'), revert_e = e.html(), real_slug = $('#post_name'), revert_slug = real_slug.val(), b = $('#edit-slug-buttons'), revert_b = b.html(), full = $('#editable-post-name-full').html();
     579
     580            $('#view-post-btn').hide();
     581            b.html('<a href="#" class="save button button-small">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+'</a>');
     582            b.children('.save').click(function() {
     583                var new_slug = e.children('input').val();
     584                if ( new_slug == $('#editable-post-name-full').text() ) {
     585                    return $('.cancel', '#edit-slug-buttons').click();
     586                }
     587                $.post(ajaxurl, {
     588                    action: 'sample-permalink',
     589                    post_id: post_id,
     590                    new_slug: new_slug,
     591                    new_title: $('#title').val(),
     592                    samplepermalinknonce: $('#samplepermalinknonce').val()
     593                }, function(data) {
     594                    $('#edit-slug-box').html(data);
     595                    b.html(revert_b);
     596                    real_slug.val(new_slug);
     597                    makeSlugeditClickable();
     598                    $('#view-post-btn').show();
     599                });
     600                return false;
     601            });
     602
     603            $('.cancel', '#edit-slug-buttons').click(function() {
     604                $('#view-post-btn').show();
     605                e.html(revert_e);
     606                b.html(revert_b);
     607                real_slug.val(revert_slug);
     608                return false;
     609            });
     610
     611            for ( i = 0; i < full.length; ++i ) {
     612                if ( '%' == full.charAt(i) )
     613                    c++;
     614            }
     615
     616            slug_value = ( c > full.length / 4 ) ? '' : full;
     617            e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children('input').keypress(function(e){
     618                var key = e.keyCode || 0;
     619                // on enter, just save the new slug, don't save the post
     620                if ( 13 == key ) {
     621                    b.children('.save').click();
     622                    return false;
     623                }
     624                if ( 27 == key ) {
     625                    b.children('.cancel').click();
     626                    return false;
     627                }
     628                real_slug.val(this.value);
     629            }).focus();
     630        }
     631
     632        makeSlugeditClickable = function() {
     633            $('#editable-post-name').click(function() {
     634                $('#edit-slug-buttons').children('.edit-slug').click();
     635            });
     636        }
     637        makeSlugeditClickable();
     638    }
     639
    575640    // word count
    576641    if ( typeof(wpWordCount) != 'undefined' ) {
  • trunk/wp-admin/options-reading.php

    r22473 r22653  
    1616$parent_file = 'options-general.php';
    1717
    18 wp_enqueue_script( 'sample-permalink' );
    19 
    2018/**
    2119 * Display JavaScript on the page.
     
    2523function options_reading_add_js() {
    2624?>
    27 <script>
    28 jQuery(document).ready( function($) {
    29     var section = $('#front-static-pages');
    30     $('#show_on_front').change( function() {
    31         var checked = $(this).prop('checked');
    32         section.toggleClass('page-on-front', checked);
    33         if ( checked )
    34             $('#page_for_posts').prop('checked', true).change();
    35         else
    36             section.removeClass('page-for-posts');
     25<script type="text/javascript">
     26//<![CDATA[
     27    jQuery(document).ready(function($){
     28        var section = $('#front-static-pages'),
     29            staticPage = section.find('input:radio[value="page"]'),
     30            selects = section.find('select'),
     31            check_disabled = function(){
     32                selects.prop( 'disabled', ! staticPage.prop('checked') );
     33            };
     34        check_disabled();
     35        section.find('input:radio').change(check_disabled);
    3736    });
    38     $('#page_for_posts').change( function() {
    39         section.toggleClass('page-for-posts', $(this).prop('checked'));
    40     });
    41     $('#page_on_front').change( function() {
    42         section.toggleClass('new-front-page', 'new' === $(this).val());
    43     });
    44 });
     37//]]>
    4538</script>
    4639<?php
    4740}
    48 add_action( 'admin_head', 'options_reading_add_js' );
     41add_action('admin_head', 'options_reading_add_js');
    4942
    5043/**
     
    9083<?php
    9184settings_fields( 'reading' );
    92 wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
     85
     86if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
     87    add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
     88?>
     89
     90<?php if ( ! get_pages() ) : ?>
     91<input name="show_on_front" type="hidden" value="posts" />
     92<table class="form-table">
     93<?php
     94    if ( 'posts' != get_option( 'show_on_front' ) ) :
     95        update_option( 'show_on_front', 'posts' );
     96    endif;
     97
     98else :
     99    if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
     100        update_option( 'show_on_front', 'posts' );
    93101?>
    94102<table class="form-table">
    95 <?php
    96 if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
    97     add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
    98 
    99 $classes = '';
    100 if ( 'page' == get_option( 'show_on_front' ) ) {
    101     if ( ! get_pages() || ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) {
    102         update_option( 'show_on_front', 'posts' );
    103     } else {
    104         $classes = 'page-on-front';
    105         if ( get_option( 'page_for_posts' ) )
    106             $classes .= ' page-for-posts';
    107     }
    108 }
    109 
    110 $all_pages = get_pages();
    111 $new_front_page_only = ! get_option( 'page_on_front' ) && ( ! $all_pages || ( 1 == count( $all_pages ) && __( 'sample-page' ) == $all_pages[0]->post_name ) );
    112 
    113 if ( current_user_can( 'create_posts', 'page' ) && ! ( get_option( 'page_for_posts' ) && $page_for_posts = get_post( get_option( 'page_for_posts' ) ) ) ) {
    114     $title = _x( 'Blog', 'default page for posts title' );
    115     // @todo What if the found page is post_type = attachment or post_status != publish?
    116     //       We could go ahead and create a new one, but we would not be able to take over
    117     //       the slug from another page. (We could for an attachment.)
    118     //       We must also check that the user can edit this page and publish a page.
    119     //       Otherwise, we must assume they cannot create pages (throughout), and thus
    120     //       should fall back to the dropdown.
    121     $page_for_posts = get_page_by_path( sanitize_title( $title ) );
    122     if ( ! $page_for_posts || $page_for_posts->ID == get_option( 'page_on_front' ) ) {
    123         $page_for_posts = get_default_post_to_edit( 'page', true );
    124         $page_for_posts->post_title = $title;
    125         $page_for_posts->post_name = sanitize_title( $title );
    126     }
    127 }
    128 
    129 if ( ! $new_front_page_only || current_user_can( 'create_posts', 'page' ) ) : ?>
    130103<tr valign="top">
    131 <th scope="row"><?php _e( 'Enable a static front page' ); ?></th>
    132 <td id="front-static-pages" class="<?php echo $classes; ?>">
    133     <fieldset><legend class="screen-reader-text"><span><?php _e( 'Enable a static front page' ); ?></span></legend>
    134     <p><label for="show_on_front">
    135         <input id="show_on_front" name="show_on_front" type="checkbox" value="page" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
    136         <?php printf( __( 'Show a <a href="%s">page</a> instead of your latest posts' ), 'edit.php?post_type=page' ); ?>
    137     </label></p>
    138     <p class="if-page-on-front sub-option">
    139     <?php if ( $new_front_page_only ) : // If no pages, or only sample page, only allow a new page to be added ?>
    140         <label for="page_on_front_title"><?php _e( 'Add new page titled:' ); ?>
    141     <?php else : ?>
    142         <label for="page_on_front">
    143             <select name="page_on_front" id="page_on_front">
    144                 <option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
    145                 <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?>
    146                 <option value="new" id="new-page"><?php _e( '&mdash; Add new page &mdash;' ); ?></option>
    147                 <?php endif; ?>
    148                 <?php echo walk_page_dropdown_tree( $all_pages, 0, array( 'selected' => get_option( 'page_on_front' ) ) ); ?>
    149             </select>
    150         </label>
    151         <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?>
    152         <label for="page_on_front_title" class="if-new-front-page"><?php _e( 'titled:' ); ?>
    153         <?php endif; ?>
    154     <?php endif; ?>
    155     <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?>
    156             <input name="page_on_front_title" type="text" id="page_on_front_title" value="<?php echo esc_attr_x( 'Home', 'default page on front title' ); ?>" />
    157         </label>
    158     <?php endif; ?>
     104<th scope="row"><?php _e( 'Front page displays' ); ?></th>
     105<td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
     106    <p><label>
     107        <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
     108        <?php _e( 'Your latest posts' ); ?>
     109    </label>
    159110    </p>
    160     <p class="if-page-on-front"><label for="page_for_posts">
    161         <input id="page_for_posts" name="page_for_posts" type="checkbox" value="<?php echo $page_for_posts->ID; ?>" <?php checked( (bool) get_option( 'page_for_posts' ) ); ?> />
    162         <?php _e( 'Show latest posts on a separate page' ); ?>
    163     </label></p>
    164     <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?>
    165     <p class="if-page-for-posts sub-option"><label for="page_for_posts_title"><?php _e( 'Page title:' ); ?>
    166         <input name="page_for_posts_title" type="text" id="page_for_posts_title" value="<?php echo esc_attr( htmlspecialchars( $page_for_posts->post_title ) ); ?>" />
    167     </label></p>
    168     <p class="if-page-for-posts sub-option" id="edit-slug-box">
    169         <?php echo get_sample_permalink_html( $page_for_posts->ID, $page_for_posts->post_title, $page_for_posts->post_name ); ?>
     111    <p><label>
     112        <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
     113        <?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
     114    </label>
    170115    </p>
    171     <input name="post_name" type="hidden" id="post_name" value="<?php echo esc_attr( apply_filters( 'editable_slug', $page_for_posts->post_name ) ); ?>" />
    172     <?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
    173     <div class="error inline"><p><strong><?php _e( 'ERROR:' ); ?></strong> <?php _e( 'These pages should not be the same!' ); ?></p></div>
    174     <?php endif; ?>
    175     </fieldset>
    176     <?php else : // cannot create pages, so fall back to a selector of existing pages ?>
    177     <p class="if-page-for-posts sub-option"><label for="page_for_posts">
    178         <?php wp_dropdown_pages( array(
    179             'name' => 'page_for_posts', 'show_option_none' => __( '&mdash; Select &mdash;' ),
    180             'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' )
    181         ) ); ?>
    182     <?php endif; // create pages ?>
    183 </td>
     116<ul>
     117    <li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
     118    <li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
     119</ul>
     120<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
     121<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
     122<?php endif; ?>
     123</fieldset></td>
    184124</tr>
    185 <?php endif; // if no pages to choose from and can't create pages ?>
    186 
     125<?php endif; ?>
    187126<tr valign="top">
    188127<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
  • trunk/wp-admin/options.php

    r22136 r22653  
    6363    'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ),
    6464    'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type' ),
    65     'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'blog_public' ),
     65    'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ),
    6666    'writing' => array( 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format' )
    6767);
  • trunk/wp-includes/formatting.php

    r22435 r22653  
    27872787            break;
    27882788
    2789         case 'show_on_front' :
    2790             if ( ! $value )
    2791                 $value = 'posts';
    2792             break;
    2793 
    27942789        case 'posts_per_page':
    27952790        case 'posts_per_rss':
  • trunk/wp-includes/script-loader.php

    r22604 r22653  
    358358        $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 );
    359359
    360         $scripts->add( 'sample-permalink', "/wp-admin/js/sample-permalink$suffix.js", array(), false, 1 );
    361         did_action( 'init' ) && $scripts->localize( 'sample-permalink', 'samplePermalinkL10n', array(
     360        $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), false, 1 );
     361        did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
    362362            'ok' => __('OK'),
    363363            'cancel' => __('Cancel'),
    364         ) );
    365 
    366         $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'sample-permalink' ), false, 1 );
    367         did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
    368364            'publishOn' => __('Publish on:'),
    369365            'publishOnFuture' =>  __('Schedule for:'),
Note: See TracChangeset for help on using the changeset viewer.