Make WordPress Core


Ignore:
Timestamp:
12/08/2008 07:29:42 PM (18 years ago)
Author:
ryan
Message:

Check for circular post parent dependencies. Exclude the current post and its children from the parent dropdown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-page-form.php

    r10094 r10129  
    271271<h5><?php _e('Parent') ?></h5>
    272272<label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
    273 <?php wp_dropdown_pages(array('selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'))); ?>
     273<?php wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'))); ?>
    274274<p><?php _e('You can arrange your pages in hierarchies, for example you could have an &#8220;About&#8221; page that has &#8220;Life Story&#8221; and &#8220;My Dog&#8221; pages under it. There are no limits to how deeply nested you can make pages.'); ?></p>
    275275<?php
Note: See TracChangeset for help on using the changeset viewer.