diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php
old mode 100644
new mode 100755
index f9e4701..4b23432
a
|
b
|
function post_comment_status_meta_box( $post ) { |
757 | 757 | <input name="advanced_view" type="hidden" value="1" /> |
758 | 758 | <p class="meta-options"> |
759 | 759 | <label for="comment_status" class="selectit"><input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked( $post->comment_status, 'open' ); ?> /> <?php _e( 'Allow comments' ); ?></label><br /> |
760 | | <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> |
| 760 | <label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked( $post->ping_status, 'open' ); ?> /> |
761 | 761 | <?php |
762 | 762 | printf( |
763 | 763 | /* translators: %s: Codex URL */ |
… |
… |
$default_title = apply_filters( 'default_page_template_title', __( 'Default Temp |
963 | 963 | <?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?> |
964 | 964 | <p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p> |
965 | 965 | <input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" /> |
| 966 | <p> |
| 967 | <label for="homepage"> |
| 968 | <?php $checked = ( $post->ID == get_option( 'page_on_front' ) ? 'checked' : 0 ); ?> |
| 969 | <input name="homepage" id="homepage" value="0" type="checkbox" <?php echo $checked; ?>> |
| 970 | <?php _e( 'Set as a hompage' ); ?> |
| 971 | </label> |
| 972 | </p> |
966 | 973 | <?php |
967 | 974 | /** |
968 | 975 | * Fires before the help hint text in the 'Page Attributes' meta box. |
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
old mode 100644
new mode 100755
index cb5025f..440aa4c
a
|
b
|
function wp_insert_post( $postarr, $wp_error = false ) { |
3721 | 3721 | } |
3722 | 3722 | } |
3723 | 3723 | |
| 3724 | // Set page as a homepage |
| 3725 | if ( get_post_type( $post_ID ) == 'page' ) |
| 3726 | if ( isset( $_POST[ 'homepage' ] ) ) |
| 3727 | { |
| 3728 | update_option( 'page_on_front', $post_ID ); |
| 3729 | update_option( 'show_on_front', 'page' ); |
| 3730 | } |
| 3731 | else if ( get_option( 'page_on_front' ) == $post_ID ) |
| 3732 | { |
| 3733 | update_option( 'page_on_front', '0' ); |
| 3734 | update_option( 'show_on_front', 'posts' ); |
| 3735 | } |
| 3736 | |
3724 | 3737 | clean_post_cache( $post_ID ); |
3725 | 3738 | |
3726 | 3739 | $post = get_post( $post_ID ); |