当前位置: 首页>>代码示例>>PHP>>正文


PHP parent_dropdown函数代码示例

本文整理汇总了PHP中parent_dropdown函数的典型用法代码示例。如果您正苦于以下问题:PHP parent_dropdown函数的具体用法?PHP parent_dropdown怎么用?PHP parent_dropdown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了parent_dropdown函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _e

echo $post_password;
?>
" /></div>
    </fieldset>
    <fieldset id="pageparent">
      <legend><?php 
_e('Page Parent');
?>
</legend> 
	  <div><select name="parent_id">
	  <option value='0'><?php 
_e('Main Page (no parent)');
?>
</option>
			<?php 
parent_dropdown($post_parent);
?>
        </select>
	  </div>
    </fieldset>
<fieldset id="postdiv">
    <legend><?php 
_e('Page Content');
?>
</legend>
<?php 
the_quicktags();
$rows = get_settings('default_post_edit_rows');
if ($rows < 3 || $rows > 100) {
    $rows = 10;
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit-page-form.php

示例2: page_settings_dropdown

 /**
  * generates a dropdown of all parent pages - copied from WP core
  *
  * @param unknown_type $default
  * @param unknown_type $parent
  * @param unknown_type $level
  * @return unknown
  */
 public static function page_settings_dropdown($default = 0, $parent = 0, $level = 0)
 {
     global $wpdb;
     $items = $wpdb->get_results($wpdb->prepare("SELECT ID, post_parent, post_title FROM {$wpdb->posts} WHERE post_parent = %d AND post_type = 'page' AND post_status != 'trash' ORDER BY menu_order", $parent));
     if ($items) {
         foreach ($items as $item) {
             $pad = str_repeat('&nbsp;', $level * 3);
             if ($item->ID == $default) {
                 $current = ' selected="selected"';
             } else {
                 $current = '';
             }
             echo "\n\t<option class='level-{$level}' value='{$item->ID}'{$current}>{$pad} " . esc_html($item->post_title) . "</option>";
             parent_dropdown($default, $item->ID, $level + 1);
         }
     } else {
         return false;
     }
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:27,代码来源:General_Settings_Admin_Page.core.php

示例3: organization_config_mnu


//.........这里部分代码省略.........
        echo '<p><strong>' . __('Attention!', 'event_espresso') . '</strong><br />' . __('The Secure Payment System has been removed.', 'event_espresso') . '</p>';
        echo '<p>' . __('If your site uses SSL to handle secure transactions. Please install the <a href="http://ee-updates.s3.amazonaws.com/espresso-https.1.0.zip" title="Download Now">Event Espresso SSL/HTTPS</a> plugin now.', 'event_espresso') . ' ' . __('<a href="http://eventespresso.com/forums/2011/09/use-wordpress-https-for-ssl-encryption-on-your-event-espresso-site/" target="_blank">More information here</a>.', 'event_espresso') . '</p>';
        $ssl_values = array(array('id' => 'N', 'text' => __('Yes', 'event_espresso')), array('id' => 'Y', 'text' => __('No', 'event_espresso')));
        ?>
											<label for="event_ssl_active">
												<?php 
        _e('Turn off this message?', 'event_espresso');
        ?>
											</label>
											<br />
											<?php 
        echo select_input('event_ssl_active', $ssl_values, $org_options['event_ssl_active']);
        echo '</div>';
    }
    ?>
										<p>
											<?php 
    _e('The following shortcodes and page settings are required for Event Espresso to function properly. These shortcodes should not be replaced with any other shortcodes. Please view <a href="admin.php?page=support#shortcodes">this page</a> for a list of optional shortcodes.', 'event_espresso');
    ?>
										</p>
										<p>
											<label for="event_page_id">
												<?php 
    _e('Main registration page:', 'event_espresso');
    ?>
											</label>
											<select name="event_page_id">
												<option value="0">
													<?php 
    _e('Main page', 'event_espresso');
    ?>
												</option>
												<?php 
    parent_dropdown($default = $org_options['event_page_id']);
    ?>
											</select>
											<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=registration_page_info"><img src="<?php 
    echo EVENT_ESPRESSO_PLUGINFULLURL;
    ?>
/images/question-frame.png" width="16" height="16" /></a><br />
											<span class="messages"><?php 
    echo sprintf(__("This page should contain the %s shortcode. <br />This page can be hidden from navigation if desired, <br />but should always contain the %s shortcode.", 'event_espresso'), '<span class="highlight">[ESPRESSO_EVENTS]</span>', '[ESPRESSO_EVENTS]');
    ?>
)</span></p>
										<?php 
    ###### Popup help box #######
    ?>
										<div id="registration_page_info" class="pop-help" style="display:none">
											<h2>
												<?php 
    _e('Main Events Page', 'event_espresso');
    ?>
											</h2>
											<p><?php 
    echo sprintf(__('This is the page that displays your events and doubles as your registration page. It is very important that this page always contains the %s shortcode.', 'event_espresso'), '<strong>[ESPRESSO_EVENTS]</strong>');
    ?>
</p>
											<p><?php 
    echo sprintf(__("This page should ALWAYS contain the %s shortcode.", 'event_espresso'), '<strong>[ESPRESSO_EVENTS]</strong>');
    ?>
</p>
										</div>
										<?php 
    ###### close popup help box ######
    ?>
										<p>
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:organization_config.php

示例4: parent_dropdown

/**
 * {@internal Missing Short Description}}
 *
 * @since 1.5.0
 *
 * @param unknown_type $default
 * @param unknown_type $parent
 * @param unknown_type $level
 * @return unknown
 */
function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
	global $wpdb, $post_ID;
	$items = $wpdb->get_results( $wpdb->prepare("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent) );

	if ( $items ) {
		foreach ( $items as $item ) {
			// A page cannot be its own parent.
			if (!empty ( $post_ID ) ) {
				if ( $item->ID == $post_ID ) {
					continue;
				}
			}
			$pad = str_repeat( '&nbsp;', $level * 3 );
			if ( $item->ID == $default)
				$current = ' selected="selected"';
			else
				$current = '';

			echo "\n\t<option class='level-$level' value='$item->ID'$current>$pad " . esc_html($item->post_title) . "</option>";
			parent_dropdown( $default, $item->ID, $level +1 );
		}
	} else {
		return false;
	}
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:35,代码来源:template.php

示例5: nggallery_picturelist


//.........这里部分代码省略.........
            ?>
<small> (<?php 
            _e('Click here for more settings', 'nggallery');
            ?>
)</small></h3>
		<div class="inside">
			<table class="form-table" >
				<tr>
					<th align="left"><?php 
            _e('Title');
            ?>
:</th>
					<th align="left"><input <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery title');
            ?>
 type="text" size="50" name="title" value="<?php 
            echo $gallery->title;
            ?>
"  /></th>
					<th align="right"><?php 
            _e('Page Link to', 'nggallery');
            ?>
:</th>
					<th align="left">
					<select <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery page id');
            ?>
  name="pageid" style="width:95%">
						<option value="0" ><?php 
            _e('Not linked', 'nggallery');
            ?>
</option>
						<?php 
            parent_dropdown($gallery->pageid);
            ?>
					</select>
					</th>
				</tr>
				<tr>
					<th align="left"><?php 
            _e('Description');
            ?>
:</th> 
					<th align="left"><textarea  <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery description');
            ?>
 name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php 
            echo $gallery->galdesc;
            ?>
</textarea></th>
					<th align="right"><?php 
            _e('Preview image', 'nggallery');
            ?>
:</th>
					<th align="left">
						<select <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery preview pic');
            ?>
 name="previewpic" style="width:95%" >
							<option value="0" ><?php 
            _e('No Picture', 'nggallery');
            ?>
</option>
							<?php 
            if (is_array($picturelist)) {
                foreach ($picturelist as $picture) {
开发者ID:jhersonn20,项目名称:myportal,代码行数:67,代码来源:manage-images.php

示例6: output


//.........这里部分代码省略.........
" />
	<table width="100%" border="0" cellspacing="3" cellpadding="3" >
	  	<tr>
	    	<th>
	    		<?php 
            esc_html_e('Album name:', 'nggallery');
            ?>
<br />
				<input class="search-input" id="album_name" name="album_name" type="text" value="<?php 
            echo esc_attr($album->name);
            ?>
" style="width:95%" />
	    	</th>
	  	</tr>
	  	<tr>
	    	<th>
	    		<?php 
            esc_html_e('Album description:', 'nggallery');
            ?>
<br />
	    		<textarea class="search-input" id="album_desc" name="album_desc" cols="50" rows="2" style="width:95%" ><?php 
            echo esc_attr($album->albumdesc);
            ?>
</textarea>
	    	</th>
	  	</tr>
	  	<tr>
	    	<th>
	    		<?php 
            esc_html_e('Select a preview image:', 'nggallery');
            ?>
<br />
					<select id="previewpic" name="previewpic" style="width:95%" >
                        <?php 
            if ($album->previewpic == 0) {
            }
            ?>
		                <option value="0"><?php 
            esc_html_e('No picture', 'nggallery');
            ?>
</option>
						<?php 
            if ($album->previewpic == 0) {
                echo '<option value="0" selected="selected">' . __('No picture', 'nggallery') . '</option>';
            } else {
                $picture = nggdb::find_image($album->previewpic);
                echo '<option value="' . $picture->pid . '" selected="selected" >' . $picture->pid . ' - ' . (empty($picture->alltext) ? esc_attr($picture->filename) : esc_attr($picture->alltext)) . ' </option>' . "\n";
            }
            ?>
					</select>
	    	</th>
	  	</tr>
        <tr>
            <th>
                <?php 
            esc_html_e('Page Link to', 'nggallery');
            ?>
<br />
                    <select name="pageid" style="width:95%">
                        <option value="0" ><?php 
            esc_html_e('Not linked', 'nggallery');
            ?>
</option>
                        <?php 
            if (!isset($album->pageid)) {
                $album->pageid = 0;
            }
            parent_dropdown($album->pageid);
            ?>
                    </select>
            </th>
        </tr>
        
        <?php 
            do_action('ngg_edit_album_settings', $this->currentID);
            ?>
        
	  	<tr align="right">
	    	<td class="submit">
	    		<input type="submit" class="button-primary" name="update_album" value="<?php 
            esc_attr_e('OK', 'nggallery');
            ?>
" />
	    		&nbsp;
	    		<input class="button-secondary dialog-cancel" type="reset" value="<?php 
            esc_attr_e('Cancel', 'nggallery');
            ?>
"/>
	    	</td>
		</tr>
	</table>
	</form>
</div>
<!-- /#editalbum -->
<?php 
        }
        ?>

<?php 
    }
开发者ID:Ashleyotero,项目名称:oldest-old,代码行数:101,代码来源:album.php

示例7: _e

;">
					<table class="form-table">
						<tbody>
							<tr>
								<th><label for="wpfaqGroup.pp_parent"><?php 
_e('Page Parent', $this->plugin_name);
?>
</label></th>
								<td>						
									<select id="wpfaqGroup.pp_parent" name="wpfaqGroup[pp_parent]">
										<option value="0">- <?php 
_e('Main (no parent)', $this->plugin_name);
?>
 -</option>
										<?php 
parent_dropdown($wpfaqHtml->field_value('wpfaqGroup.pp_parent'));
?>
									</select>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		
		<p class="submit">
			<input type="submit" name="save" value="<?php 
_e('Save Group', $this->plugin_name);
?>
" class="button-primary" />
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:31,代码来源:save.php

示例8: nggallery_picturelist


//.........这里部分代码省略.........
	<div id="gallerydiv" class="postbox <?php 
    echo postbox_classes('gallerydiv', 'ngg-manage-gallery');
    ?>
" >
		<h3><?php 
    _e('Gallery settings', 'nggallery');
    ?>
<small> (<?php 
    _e('Click here for more settings', 'nggallery');
    ?>
)</small></h3>
		<div class="inside">
			<table class="form-table" >
				<tr>
					<th align="left"><?php 
    _e('Title');
    ?>
:</th>
					<th align="left"><input type="text" size="50" name="title" value="<?php 
    echo $gallery->title;
    ?>
"  /></th>
					<th align="right"><?php 
    _e('Page Link to', 'nggallery');
    ?>
:</th>
					<th align="left">
					<select name="pageid" style="width:95%">
						<option value="0" ><?php 
    _e('Not linked', 'nggallery');
    ?>
</option>
						<?php 
    parent_dropdown($gallery->pageid);
    ?>
					</select>
					</th>
				</tr>
				<tr>
					<th align="left"><?php 
    _e('Description');
    ?>
:</th> 
					<th align="left"><textarea name="gallerydesc" cols="30" rows="3" style="width: 95%" ><?php 
    echo $gallery->galdesc;
    ?>
</textarea></th>
					<th align="right"><?php 
    _e('Preview image', 'nggallery');
    ?>
:</th>
					<th align="left">
						<select name="previewpic" style="width:95%" >
							<option value="0" ><?php 
    _e('No Picture', 'nggallery');
    ?>
</option>
							<?php 
    if (is_array($picturelist)) {
        foreach ($picturelist as $picture) {
            $selected = $picture->pid == $gallery->previewpic ? 'selected="selected" ' : '';
            echo '<option value="' . $picture->pid . '" ' . $selected . '>' . $picture->pid . ' - ' . $picture->filename . '</option>' . "\n";
        }
    }
    ?>
						</select>
开发者ID:pravinhirmukhe,项目名称:flow1,代码行数:67,代码来源:manage-images.php

示例9: _e

						<th scope="row">
							<?php 
_e('Community Page:', $this->ID);
?>
						</th>
						<td>
						<?php 
if ($this->allowAdmin('page_id')) {
    ?>
							<select name="settings[page_id]">
								<option value="0">-- <?php 
    _e('Not set', $this->ID);
    ?>
 --</option>
								<?php 
    parent_dropdown($settings['page_id']);
    ?>
							</select><br />
							<span class="setting-description"><?php 
    _e('The page where to show all community outputs. <strong>You have to create this page first.</strong>', $this->ID);
    ?>
</span>
						<?php 
}
?>
						</td>
					</tr>
				</table>
			</dd>
		</dl>
开发者ID:JerryXie96,项目名称:PBSMUNC2013WebSite,代码行数:30,代码来源:admin.php

示例10: page_parent_meta_box

function page_parent_meta_box($post){
?>
<label class="hidden" for="parent_id"><?php _e('Page Parent') ?></label>
<select name="parent_id" id="parent_id">
<option value='0'><?php _e('Main Page (no parent)'); ?></option>
<?php parent_dropdown($post->post_parent); ?>
</select>
<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>
<?php
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:10,代码来源:edit-page-form.php

示例11: _e

echo $wpfaqHtml->field_value('wpfaqQuestion.pp') == "page" ? 'block' : 'none';
?>
;">
        <!-- Page Parent -->
        <p>
        	<label style="font-weight:bold;" for="wpfaqQuestion.pp_parent"><?php 
_e('Page Parent', $this->plugin_name);
?>
</label><br/>
            <select id="wpfaqQuestion.pp_parent" name="wpfaqQuestion[pp_parent]">
                <option value="0">- <?php 
_e('Main (no parent)', $this->plugin_name);
?>
 -</option>
                <?php 
parent_dropdown($wpfaqHtml->field_value('wpfaqQuestion.pp_parent'));
?>
            </select>
        </p>
    </div>
    
    <!-- Post/Page Title -->
    <p>
    	<label style="font-weight:bold;" for="wpfaqQuestion.pp_title"><?php 
_e('Post/Page Title', $this->plugin_name);
?>
</label><br/>
        <?php 
/*<input type="text" name="wpfaqQuestion[pp_title]" value="<?php echo esc_attr(stripslashes($wpfaqHtml -> field_value('wpfaqQuestion.pp_title'))); ?>" id="wpfaqQuestion.pp_title" />*/
?>
        <?php 
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:31,代码来源:question-pp.php

示例12: nggallery_picturelist


//.........这里部分代码省略.........
            ?>
)</small></h3>
		<div class="inside">
			<table class="form-table" id="gallery-properties">
				<tr>
					<td align="left"><label for="title"><?php 
            _e('Title');
            ?>
:</label></td>
					<td align="left"><input <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery title');
            ?>
 type="text" size="50" id="title" name="title" value="<?php 
            echo $gallery->title;
            ?>
"  /></td>
					<td align="right"><label for="pageid"><?php 
            _e('Page Link to', 'nggallery');
            ?>
:</label></td>
					<td align="left">
						<select <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery page id');
            ?>
  id="pageid" name="pageid" style="width:95%">
							<option value="0" ><?php 
            _e('Not linked', 'nggallery');
            ?>
</option>
							<?php 
            $err = error_reporting(0);
            ?>
							<?php 
            parent_dropdown(intval($gallery->pageid));
            ?>
							<?php 
            error_reporting($err);
            ?>
						</select>
					</td>
				</tr>
				<tr>
					<td align="left"><label for="gallerydesc"><?php 
            _e('Description');
            ?>
:</label></td>
					<td align="left"><textarea  <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery description');
            ?>
 name="gallerydesc" id="gallerydesc" cols="50" rows="3" style="width: 95%" ><?php 
            echo $gallery->galdesc;
            ?>
</textarea></td>
					<td align="right"><label for="previewpic"><?php 
            _e('Preview image', 'nggallery');
            ?>
:</label></td>
					<td align="left">
						<select <?php 
            nggGallery::current_user_can_form('NextGEN Edit gallery preview pic');
            ?>
 name="previewpic" id="previewpic" style="width:95%" >
							<option value="0" ><?php 
            _e('No Picture', 'nggallery');
            ?>
</option>
开发者ID:valerol,项目名称:korpus,代码行数:67,代码来源:manage-images.php

示例13: output


//.........这里部分代码省略.........
	</div><!-- /#container -->
</div><!-- /#wrap -->

<!-- #editalbum -->
<div id="editalbum" style="display: none;" >
	<form id="form-edit-album" method="POST" accept-charset="utf-8">
	<?php 
        wp_nonce_field('ngg_thickbox_form');
        ?>
	<input type="hidden" id="current_album" name="act_album" value="<?php 
        echo $this->currentID;
        ?>
" />
	<table width="100%" border="0" cellspacing="3" cellpadding="3" >
	  	<tr>
	    	<th>
	    		<?php 
        _e('Album name:', 'nggallery');
        ?>
<br />
				<input class="search-input" id="album_name" name="album_name" type="text" value="<?php 
        echo esc_attr($album->name);
        ?>
" style="width:95%" />
	    	</th>
	  	</tr>
	  	<tr>
	    	<th>
	    		<?php 
        _e('Album description:', 'nggallery');
        ?>
<br />
	    		<textarea class="search-input" id="album_desc" name="album_desc" cols="50" rows="2" style="width:95%" ><?php 
        echo esc_attr($album->albumdesc);
        ?>
</textarea>
	    	</th>
	  	</tr>
	  	<tr>
	    	<th>
	    		<?php 
        _e('Select a preview image:', 'nggallery');
        ?>
<br />
					<select name="previewpic" style="width:95%" >
		                <option value="0"><?php 
        _e('No picture', 'nggallery');
        ?>
</option>
						<?php 
        $picturelist = $wpdb->get_results("SELECT t.*, tt.* FROM {$wpdb->nggallery} AS t INNER JOIN {$wpdb->nggpictures} AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 GROUP BY tt.galleryid ORDER by tt.galleryid");
        if (is_array($picturelist)) {
            foreach ($picturelist as $picture) {
                echo '<option value="' . $picture->pid . '"' . ($picture->pid == $album->previewpic ? ' selected="selected"' : '') . ' >' . $picture->pid . ' - ' . $picture->filename . '</option>' . "\n";
            }
        }
        ?>
					</select>
	    	</th>
	  	</tr>
        <tr>
            <th>
                <?php 
        _e('Page Link to', 'nggallery');
        ?>
<br />
                    <select name="pageid" style="width:95%">
                        <option value="0" ><?php 
        _e('Not linked', 'nggallery');
        ?>
</option>
                        <?php 
        if (!isset($album->pageid)) {
            $album->pageid = 0;
        }
        parent_dropdown($album->pageid);
        ?>
                    </select>
            </th>
        </tr>
	  	<tr align="right">
	    	<td class="submit">
	    		<input type="submit" class="button-primary" name="update_album" value="<?php 
        _e("OK", 'nggallery');
        ?>
" />
	    		&nbsp;
	    		<input class="button-secondary" type="reset" value="<?php 
        _e("Cancel", 'nggallery');
        ?>
" onclick="tb_remove()"/>
	    	</td>
		</tr>
	</table>
	</form>
</div>
<!-- /#editalbum -->

<?php 
    }
开发者ID:alx,项目名称:SimplePress,代码行数:101,代码来源:album.php

示例14: parent_dropdown

/**
 * Print out option HTML elements for the page parents drop-down.
 *
 * @since 1.5.0
 * @since 4.4.0 `$post` argument was added.
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param int         $default Optional. The default page ID to be pre-selected. Default 0.
 * @param int         $parent  Optional. The parent page ID. Default 0.
 * @param int         $level   Optional. Page depth level. Default 0.
 * @param int|WP_Post $post    Post ID or WP_Post object.
 *
 * @return null|false Boolean False if page has no children, otherwise print out html elements
 */
function parent_dropdown($default = 0, $parent = 0, $level = 0, $post = null)
{
    global $wpdb;
    $post = get_post($post);
    $items = $wpdb->get_results($wpdb->prepare("SELECT ID, post_parent, post_title FROM {$wpdb->posts} WHERE post_parent = %d AND post_type = 'page' ORDER BY menu_order", $parent));
    if ($items) {
        foreach ($items as $item) {
            // A page cannot be its own parent.
            if ($post && $post->ID && $item->ID == $post->ID) {
                continue;
            }
            $pad = str_repeat('&nbsp;', $level * 3);
            $selected = selected($default, $item->ID, false);
            echo "\n\t<option class='level-{$level}' value='{$item->ID}' {$selected}>{$pad} " . esc_html($item->post_title) . "</option>";
            parent_dropdown($default, $item->ID, $level + 1);
        }
    } else {
        return false;
    }
}
开发者ID:robbenz,项目名称:plugs,代码行数:35,代码来源:template.php

示例15: checked

<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
<?php _e('Allow Comments') ?></label> 
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>
</div>
</fieldset>

<fieldset id="passworddiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Password-Protect Post') ?></h3> 
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo $post->post_password ?>" /></div>
</fieldset>

<fieldset id="pageparent" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Parent') ?></h3> 
<div class="dbx-content"><p><select name="parent_id">
<option value='0'><?php _e('Main Page (no parent)'); ?></option>
<?php parent_dropdown($post->post_parent); ?>
</select></p>
</div>
</fieldset>

<?php if ( 0 != count( get_page_templates() ) ) { ?>
<fieldset id="pageparent" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Page Template:') ?></h3> 
<div class="dbx-content"><p><select name="page_template">
		<option value='default'><?php _e('Default Template'); ?></option>
		<?php page_template_dropdown($post->page_template); ?>
		</select></p>
</div>
</fieldset>
<?php } ?>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:edit-page-form.php


注:本文中的parent_dropdown函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。