WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/06/2004 05:11:11 AM (17 years ago)
Author:
rboren
Message:

Page templates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/post.php

    r1752 r1753  
    201201    if ($post_status = 'static') {
    202202        generate_page_rewrite_rules();
     203
     204        add_post_meta($post_ID, '_wp_page_template',  $_POST['page_template'], true);
    203205    }
    204206
     
    234236
    235237        if ($post_status == 'static') {
     238            $page_template = get_post_meta($post_ID, '_wp_page_template', true);
     239
    236240            include('edit-page-form.php');
    237241        } else {
     
    439443    if ($post_status = 'static') {
    440444        generate_page_rewrite_rules();
     445
     446        if ( ! update_post_meta($post_ID, '_wp_page_template',  $_POST['page_template'])) {
     447            add_post_meta($post_ID, '_wp_page_template',  $_POST['page_template'], true);
     448        }
    441449    }
    442450
Note: See TracChangeset for help on using the changeset viewer.