• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP page_template_dropdown函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: page_attributes_callback

    public function page_attributes_callback($post_id)
    {
        global $post;
        $template = get_post_meta($post_id, "_wp_page_template");
        ?>
		<p><strong><?php 
        _e('Template');
        ?>
</strong><?php 
        do_action('page_attributes_meta_box_template', $template, $post);
        ?>
</p>
		<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?>
</label><select name="_wp_page_template" id="page_template">
		<?php 
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
		<option value="default"><?php 
        echo esc_html($default_title);
        ?>
</option>
		<?php 
        page_template_dropdown($template);
        ?>
		</select>
		<?php 
    }
开发者ID:devgeniem,项目名称:acf-flexible-templates,代码行数:29,代码来源:plugin.php


示例2: body

    function body()
    {
        global $post;
        if (0 != count(get_page_templates())) {
            //$template = !empty($post->page_template) ? $post->page_template : false;
            $template = get_post_meta($post->ID, '_wp_page_template', true);
            $template = '' == trim($template) ? false : $template;
            ?>
<p><strong><?php 
            _e('Template', 'rhc');
            ?>
</strong></p>
<label class="screen-reader-text" for="page_template"><?php 
            _e('Page Template', 'rhc');
            ?>
</label><select name="_wp_page_template" id="_wp_page_template">
<option value='default'><?php 
            _e('Default Template', 'rhc');
            ?>
</option>
<?php 
            page_template_dropdown($template);
            ?>
</select>
<?php 
        }
    }
开发者ID:kaydwithers,项目名称:crossfittanjongpagar,代码行数:27,代码来源:class.rhc_event_template_metabox.php


示例3: custom_post_type_page_template_meta_box

    function custom_post_type_page_template_meta_box($post)
    {
        $template = get_post_meta($post->ID, '_wp_page_template', true);
        ?>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template', 'custom-post-type-page-template');
        ?>
</label><select name="page_template" id="page_template">
<option value='default'><?php 
        _e('Default Template', 'custom-post-type-page-template');
        ?>
</option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
开发者ID:catlrlsn,项目名称:CATLR,代码行数:18,代码来源:custom-post-type-page-template.php


示例4: page_attributes_meta_box

/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    ?>
<h5><?php 
    _e('Parent');
    ?>
</h5>
<label class="screen-reader-text" for="parent_id"><?php 
    _e('Page Parent');
    ?>
</label>
<?php 
    wp_dropdown_pages(array('exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column' => 'menu_order, post_title'));
    ?>
<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 
    if (0 != count(get_page_templates())) {
        ?>
<h5><?php 
        _e('Template');
        ?>
</h5>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?>
</label><select name="page_template" id="page_template">
<option value='default'><?php 
        _e('Default Template');
        ?>
</option>
<?php 
        page_template_dropdown($post->page_template);
        ?>
</select>
<p><?php 
        _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them above.');
        ?>
</p>
<?php 
    }
    ?>
<h5><?php 
    _e('Order');
    ?>
</h5>
<p><label class="screen-reader-text" for="menu_order"><?php 
    _e('Page Order');
    ?>
</label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
    echo esc_attr($post->menu_order);
    ?>
" /></p>
<p><?php 
    _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)');
    ?>
</p>
<?php 
}
开发者ID:papayalabs,项目名称:htdocs,代码行数:68,代码来源:edit-page-form.php


示例5: EditOptions

    static function EditOptions()
    {
        $options = get_option(DSIDXPRESS_OPTION_NAME);
        $apiHttpResponse = dsSearchAgent_ApiRequest::FetchData("AccountOptions", array(), false, 0);
        if (!empty($apiHttpResponse["errors"]) || $apiHttpResponse["response"]["code"] != "200") {
            wp_die("We're sorry, but we ran into a temporary problem while trying to load the account data. Please check back soon.", "Account data load error");
        } else {
            $account_options = json_decode($apiHttpResponse["body"]);
        }
        $urlBase = get_home_url();
        if (substr($urlBase, strlen($urlBase), 1) != "/") {
            $urlBase .= "/";
        }
        $urlBase .= dsSearchAgent_Rewrite::GetUrlSlug();
        ?>
	<div class="wrap metabox-holder">
		<h1>General Options</h1>
		<?php 
        if (isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'] == 'true') {
            ?>
		<div class="updated"><p><strong><?php 
            _e('Options saved');
            ?>
</strong></p></div>
		<?php 
        }
        ?>
		<form method="post" action="options.php" onsubmit="return dsIDXpressOptions.FilterViews();">
		<?php 
        settings_fields("dsidxpress_options");
        ?>
		<h2>Display Settings</h2>
			<table class="form-table">
				<?php 
        if (!defined('ZPRESS_API') || ZPRESS_API == '') {
            ?>
				<tr>
					<th>
						<label for="dsidxpress-DetailsTemplate">Template for details pages:</label>
					</th>
					<td>
						<select id="dsidxpress-DetailsTemplate" name="<?php 
            echo DSIDXPRESS_OPTION_NAME;
            ?>
[DetailsTemplate]">
							<option value="">- Default -</option>
							<?php 
            $details_template = isset($options["DetailsTemplate"]) ? $options["DetailsTemplate"] : '';
            page_template_dropdown($details_template);
            ?>
						</select><br />
						<span class="description">Some themes have custom templates that can change how a particular page is displayed. If your theme does have multiple templates, you'll be able to select which one you want to use in the drop-down above.</span>
					</td>
				</tr>
				<tr>
					<th>
						<label for="dsidxpress-ResultsTemplate">Template for results pages:</label>
					</th>
					<td>
						<select id="dsidxpress-ResultsTemplate" name="<?php 
            echo DSIDXPRESS_OPTION_NAME;
            ?>
[ResultsTemplate]">
							<option value="">- Default -</option>
							<?php 
            $results_template = isset($options["ResultsTemplate"]) ? $options["ResultsTemplate"] : '';
            page_template_dropdown($results_template);
            ?>
						</select><br />
						<span class="description">See above.</span>
					</td>
				</tr>
				<tr>
					<th>
						<label for="dsidxpress-AdvancedTemplate">Template for dsSearchAgent:</label>
					</th>
					<td>
						<select id="dsidxpress-AdvancedTemplate" name="<?php 
            echo DSIDXPRESS_OPTION_NAME;
            ?>
[AdvancedTemplate]">
							<option value="">- Default -</option>
							<?php 
            $advanced_template = isset($options["AdvancedTemplate"]) ? $options["AdvancedTemplate"] : '';
            page_template_dropdown($advanced_template);
            ?>
						</select><br />
						<span class="description">See above.</span>
					</td>
				</tr>
				<tr>
					<th>
						<label for="dsidxpress-IDXTemplate">Template for IDX pages:</label>
					</th>
					<td>
						<select id="dsidxpress-IDXTemplate" name="<?php 
            echo DSIDXPRESS_OPTION_NAME;
            ?>
[IDXTemplate]">
							<option value="">- Default -</option>
//.........这里部分代码省略.........
开发者ID:kabrewer07,项目名称:mrw,代码行数:101,代码来源:admin.php


示例6: html_import_options_page


//.........这里部分代码省略.........
>
				<th><?php 
    _e("Import pages as children of: ", 'import-html-pages');
    ?>
</th>
				<td>
			        <?php 
    $pages = wp_dropdown_pages(array('echo' => 0, 'selected' => $options['root_parent'], 'name' => 'html_import[root_parent]', 'show_option_none' => __('None ( top level )', 'import-html-pages'), 'sort_column' => 'menu_order, post_title'));
    if (empty($pages)) {
        $pages = "<select name=\"root_parent\"><option value=\"0\">" . __('None ( top level )', 'import-html-pages') . "</option></select>";
    }
    echo $pages;
    ?>
				</td>
				</tr>

				<tr id="page-template" <?php 
    if (!is_post_type_hierarchical($options['type'])) {
        echo "style=display:none;";
    }
    ?>
>
				<th><?php 
    _e("Template for imported pages: ", 'import-html-pages');
    ?>
</th>
				<td>
			        <select name="html_import[page_template]" id="page_template">
					<option value='0'><?php 
    _e('Default Template');
    ?>
</option>
					<?php 
    page_template_dropdown($options['page_template']);
    ?>
					</select>
				</td>
				</tr>
		</table>
		</div>
		

		<!-- CUSTOM FIELDS -->
		<div id="tabs-4">
		<h3><?php 
    _e("Custom Fields", 'import-html-pages');
    ?>
</h3>				
		<table class="form-table ui-tabs-panel striped" id="customfields">
			<tbody>
			<tr valign="top" id="customdatefield">
		        <th scope="row"><?php 
    _e("Select date by", 'import-html-pages');
    ?>
</th>
		        <td colspan="2"><p><label>
					<input type="radio" name="html_import[import_date]"
						value="tag" <?php 
    checked($options['import_date'], 'tag');
    ?>
 class="showrow" title="date" />
					<?php 
    _e('HTML tag', 'import-html-pages');
    ?>
</label> 
					&nbsp;&nbsp;
开发者ID:kevinotsuka,项目名称:datapop,代码行数:67,代码来源:html-import-options.php


示例7: wpc_client_hubpage_template_meta

function wpc_client_hubpage_template_meta()
{
    global $post, $wpc_client;
    if ('hubpage' == $post->post_type && 0 != count(get_page_templates())) {
        $template = get_post_meta($post->ID, '_wp_page_template', true);
        ?>
            <p><strong><?php 
        _e('Template', WPC_CLIENT_TEXT_DOMAIN);
        ?>
</strong></p>
            <label class="screen-reader-text" for="hubpage_template"><?php 
        _e('HUB Page Template', WPC_CLIENT_TEXT_DOMAIN);
        ?>
</label>
            <select name="hubpage_template" id="hubpage_template">
                <option value='default'><?php 
        _e('Default Template', WPC_CLIENT_TEXT_DOMAIN);
        ?>
</option>
                <?php 
        page_template_dropdown($template);
        ?>
            </select>
            <?php 
    }
}
开发者ID:joffcrabtree,项目名称:wp-client-client-portals-file-upload-invoices-billing,代码行数:26,代码来源:wp-client-lite.php


示例8: insertPages_wp_tinymce_dialog

        /**
         * Modified from /wp-admin/includes/internal-linking.php, function wp_link_dialog()
         * Dialog for internal linking.
         *
         * @since 3.1.0
         */
        function insertPages_wp_tinymce_dialog()
        {
            // If wp_editor() is being called outside of an admin context,
            // required dependencies for Insert Pages will be missing (e.g.,
            // wp-admin/includes/template.php will not be loaded, admin_head
            // action will not be fired). If that's the case, just skip loading
            // the Insert Pages tinymce button.
            if (!is_admin() || !function_exists('page_template_dropdown')) {
                return;
            }
            $options_panel_visible = '1' == get_user_setting('wpinsertpage', '0') ? ' options-panel-visible' : '';
            // Get ID of post currently being edited.
            $post_id = array_key_exists('post', $_REQUEST) && intval($_REQUEST['post']) > 0 ? intval($_REQUEST['post']) : '';
            // display: none is required here, see #WP27605
            ?>
<div id="wp-insertpage-backdrop" style="display: none"></div>
			<div id="wp-insertpage-wrap" class="wp-core-ui<?php 
            echo $options_panel_visible;
            ?>
" style="display: none">
			<form id="wp-insertpage" tabindex="-1">
			<?php 
            wp_nonce_field('internal-inserting', '_ajax_inserting_nonce', false);
            ?>
			<input type="hidden" id="insertpage-parent-pageID" value="<?php 
            echo $post_id;
            ?>
" />
			<div id="insertpage-modal-title">
				<?php 
            _e('Insert page');
            ?>
				<div id="wp-insertpage-close" tabindex="0"></div>
			</div>
			<div id="insertpage-selector">
				<div id="insertpage-search-panel">
					<div class="insertpage-search-wrapper">
						<label>
							<span class="search-label"><?php 
            _e('Search');
            ?>
</span>
							<input type="search" id="insertpage-search-field" class="insertpage-search-field" autocomplete="off" />
							<span class="spinner"></span>
						</label>
					</div>
					<div id="insertpage-search-results" class="query-results">
						<ul></ul>
						<div class="river-waiting">
							<span class="spinner"></span>
						</div>
					</div>
					<div id="insertpage-most-recent-results" class="query-results">
						<div class="query-notice"><em><?php 
            _e('No search term specified. Showing recent items.');
            ?>
</em></div>
						<ul></ul>
						<div class="river-waiting">
							<span class="spinner"></span>
						</div>
					</div>
				</div>
				<p class="howto" id="insertpage-options-toggle"><?php 
            _e('Options');
            ?>
</p>
				<div id="insertpage-options-panel">
					<div class="insertpage-options-wrapper">
						<label for="insertpage-slug-field">
							<span><?php 
            _e('Slug or ID');
            ?>
</span>
							<input id="insertpage-slug-field" type="text" autocomplete="off" />
							<input id="insertpage-pageID" type="hidden" />
						</label>
					</div>
					<div class="insertpage-format">
						<label for="insertpage-format-select">
							<?php 
            _e('Display');
            ?>
							<select name="insertpage-format-select" id="insertpage-format-select">
								<option value='title'>Title</option>
								<option value='link'>Link</option>
								<option value='excerpt'>Excerpt with title</option>
								<option value='excerpt-only'>Excerpt only (no title)</option>
								<option value='content'>Content</option>
								<option value='all'>All (includes custom fields)</option>
								<option value='template'>Use a custom template &raquo;</option>
							</select>
							<select name="insertpage-template-select" id="insertpage-template-select" disabled="true">
								<option value='all'><?php 
//.........这里部分代码省略.........
开发者ID:StudentLifeMarketingAndDesign,项目名称:krui-wp,代码行数:101,代码来源:insert-pages.php


示例9: cf_attribute_box_cb

function cf_attribute_box_cb($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        /**
         * Filter the arguments used to generate a Pages drop-down element.
         *
         * @since 3.3.0
         *
         * @see wp_dropdown_pages()
         *
         * @param array   $dropdown_args Array of arguments used to generate the pages drop-down.
         * @param WP_Post $post          The current WP_Post object.
         */
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?>
</strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?>
</label>
<?php 
            echo $pages;
        }
        // end empty pages check
    }
    // end hierarchical check.
    if ('page' == $post->post_type && 0 != count(get_page_templates($post)) && get_option('page_for_posts') != $post->ID) {
        $template = !empty($post->page_template) ? $post->page_template : false;
        ?>
<p><strong><?php 
        _e('Template');
        ?>
</strong></p>
<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?>
</label><select name="page_template" id="page_template">
<?php 
        /**
         * Filter the title of the default page template displayed in the drop-down.
         *
         * @since 4.1.0
         *
         * @param string $label   The display value for the default page template title.
         * @param string $context Where the option label is displayed. Possible values
         *                        include 'meta-box' or 'quick-edit'.
         */
        $default_title = apply_filters('default_page_template_title', __('Default Template'), 'meta-box');
        ?>
<option value="default"><?php 
        echo esc_html($default_title);
        ?>
</option>
<?php 
        page_template_dropdown($template);
        ?>
</select>
<?php 
    }
    /** * Add custom page attribute options. * **/
    $values = get_post_custom($post->ID);
    $background = isset($values['page_background']) ? esc_attr($values['page_background'][0]) : '';
    $title = isset($values['show_title']) ? esc_attr($values['show_title'][0]) : '';
    wp_nonce_field('cf_meta_box_nonce', 'meta_box_nonce');
    ?>
<span id="page-options" class="hidden">
	<p><strong>Background Color</strong></p>
	<p><label class="screen-reader-text" for="page_background">Background Color</label><input name="page_background" type="text" id="page_background" value="<?php 
    echo $background;
    ?>
" class="wp-color-picker" data-default-color="#bada55" /></p>
	<p><strong>Layout Options</strong></p>
	<p><input type="checkbox" id="show_title" name="show_title" <?php 
    checked($title, 'on');
    ?>
 />
	<label for="show_title"> Show Title</label></p>
</span>
<span id="page-order" <?php 
    if ($dropdown_args['selected'] == 0) {
        echo 'class="hidden"';
    }
    ?>
>
	<p><strong><?php 
    _e('Order');
    ?>
</strong></p>
	<p><label class="screen-reader-text" for="menu_order"><?php 
    _e('Order');
    ?>
</label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php 
    echo esc_attr($post->menu_order);
//.........这里部分代码省略.........
开发者ID:searsandrew,项目名称:centreforge,代码行数:101,代码来源:extended-page-attributes.php


示例10: _e

    echo 'yes' == $post['is_multiple_page_template'] ? 'checked="checked"' : '';
    ?>
 class="switcher" style="margin-left:0;"/>
								<label for="is_multiple_page_template_yes"><?php 
    _e('Select a template', 'wp_all_import_plugin');
    ?>
</label>
								<div class="switcher-target-is_multiple_page_template_yes">
									<div class="input">
										<select name="page_template" id="page_template">
											<option value='default'><?php 
    _e('Default', 'wp_all_import_plugin');
    ?>
</option>
											<?php 
    page_template_dropdown($post['page_template']);
    ?>
										</select>
									</div>
								</div>
							</div>
							<div class="input fleft" style="position:relative;width:220px; margin-top: 5px;">
								<input type="radio" id="is_multiple_page_template_no" class="switcher" name="is_multiple_page_template" value="no" <?php 
    echo 'no' == $post['is_multiple_page_template'] ? 'checked="checked"' : '';
    ?>
 style="margin-left:0;"/>
								<label for="is_multiple_page_template_no"><?php 
    _e('Set with XPath', 'wp_all_import_plugin');
    ?>
</label> <br>
								<div class="switcher-target-is_multiple_page_template_no">
开发者ID:estrategasdigitales,项目名称:rufiatta,代码行数:31,代码来源:_other_template.php


示例11: page_template_meta_box

    /**
     * Callback for the page_templates metabox selector.
     *
     * @since %VER%
     *
     * @return string html
     */
    public function page_template_meta_box()
    {
        global $post;
        $template = '';
        if (count(get_page_templates($post)) != 0) {
            $page_template = get_post_meta($post->ID, '_wp_page_template', TRUE);
            $template = !empty($page_template) ? $page_template : '';
        }
        ?>
		<p><strong><?php 
        _e('Template');
        ?>
</strong></p>
		<label class="screen-reader-text" for="page_template"><?php 
        _e('Page Template');
        ?>
</label><select name="page_template" id="page_template">
		<option value='default'><?php 
        _e('Default Template');
        ?>
</option>
		<?php 
        page_template_dropdown($template);
        ?>
		</select>
		<?php 
    }
开发者ID:kaffiemetsuker,项目名称:event-espresso-core,代码行数:34,代码来源:EE_Admin_Page_CPT.core.php


示例12: _e

<h5><?php 
_e('Template', 'bu-navigation');
?>
</h5>
<label class="screen-reader-text" for="page_template"><?php 
printf(__('%s Template', 'bu-navigation'), $post_type->labels->singular_name);
?>
</label>
<select name="page_template" id="page_template">
	<option value='default'><?php 
_e('Default Template', 'bu-navigation');
?>
</option>
	<?php 
page_template_dropdown($current_template);
?>
</select>
<p><?php 
printf(__('Some themes have custom templates you can use for certain %s that might have additional features or custom layouts.', 'bu-navigation'), strtolower($post_type->labels->name));
?>
</p>
开发者ID:iamapioneer,项目名称:sdas,代码行数:21,代码来源:metabox-custom-template.php


示例13: mf_metabox_template

    function mf_metabox_template()
    {
        global $post;
        if (0 != count(get_page_templates())) {
            $template = get_post_meta($post->ID, '_wp_mf_page_template', TRUE);
            $template = $template != '' ? $template : false;
            ?>
      <label class="screen-reader-text" for="page_template"><?php 
            _e('Page Template');
            ?>
</label><select name="page_template" id="page_template">
      <option value='default'><?php 
            _e('Default Template');
            ?>
</option>
      <?php 
            page_template_dropdown($template);
            ?>
      </select>
    <?php 
        }
    }
开发者ID:GafaMX,项目名称:dev_funciones_basicas,代码行数:22,代码来源:mf_post.php


示例14: pageAttributes

 public function pageAttributes()
 {
     global $post;
     //
     // Parent
     //
     $post_type_object = get_post_type_object($post->post_type);
     if ($post_type_object->hierarchical) {
         $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)', csl18n()), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
         $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
         $pages = wp_dropdown_pages($dropdown_args);
         if (!empty($pages)) {
             $this->addControl('post_parent', 'wpselect', __('Parent Page', csl18n()), null, "{$post->post_parent}", array('markup' => wp_dropdown_pages($dropdown_args), 'notLive' => 'settings-wp-changed'));
         }
     }
     //
     // Page Templates
     //
     if ('page' == $post->post_type && 0 != count(get_page_templates($post))) {
         $template = !empty($post->page_template) ? $post->page_template : false;
         $default_title = apply_filters('default_page_template_title', __('Default Template'), csl18n());
         ob_start();
         page_template_dropdown($template);
         $options = ob_get_clean();
         $markup = '<select name="page_template" id="page_template">' . '<option value="default">' . esc_html($default_title) . '</option>' . $options . '</select>';
         $this->addControl('page_template', 'wpselect', __('Page Template', csl18n()), null, $template ? $template : 'default', array('markup' => $markup, 'notLive' => 'settings-wp-changed'));
     }
 }
开发者ID:datracka,项目名称:datalook.io,代码行数:28,代码来源:general.php


示例15: page_template_meta_box

	function page_template_meta_box($post){
?>
<label class="hidden" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
<option value='default'><?php _e('Default Template'); ?></option>
<?php page_template_dropdown($post->page_template); ?>
</select>
<p><?php _e('Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you&#8217;ll see them above.'); ?></p>
<?php
	}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:9,代码来源:edit-page-form.php


示例16: category_template_meta_box

        /**
         * category_template_meta_box add extra fields to category edit form callback function
         * 
         *  @since 0.1
         *  @author Ohad Raz <[email protected]>
         *  @access public
         *  
         *  @param  (object) $tag  
         *  
         *  @return void
         * 
         */
        public function category_template_meta_box($tag)
        {
            $t_id = $tag->term_id;
            $cat_meta = get_option("category_templates");
            $template = isset($cat_meta[$t_id]) ? $cat_meta[$t_id] : false;
            ?>
			<tr class="form-field">
				<th scope="row" valign="top"><label for="cat_Image_url"><?php 
            _e('Category Template');
            ?>
</label></th>
				<td>
					<select name="cat_template" id="cat_template">
						<option value='default'><?php 
            _e('Default Template');
            ?>
</option>
						<?php 
            page_template_dropdown($template);
            ?>
					</select>
					<br />
			            <span class="description"><?php 
            _e('Select a specific template for this category');
            ?>
</span>
			    </td>
			</tr>
			<?php 
            do_action('Custom_Category_Template_ADD_FIELDS', $tag);
        }
开发者ID:sawan34,项目名称:tanzi,代码行数:43,代码来源:category_template.php


示例17: _e

<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 } ?>

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

<?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?>
<fieldset id="authordiv" class="dbx-box">
<h3 class="dbx-handle"><?php _e('Post author'); ?>:</h3>
<div class="dbx-content">
<select name="post_author_override" id="post_author_override">
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:30,代码来源:edit-page-form.php


示例18: _e

<table width="100%" cellspacing="2" cellpadding="5" class="editform">
<?php 
if (0 != count(get_page_templates())) {
    ?>
	<tr valign="top">
		<th scope="row" width="30%"><?php 
    _e('Page Template:');
    ?>
</th>
		<td><div><select name="page_template">
		<option value='default'><?php 
    _e('Default Template');
    ?>
</option>
		<?php 
    page_template_dropdown($page_template);
    ?>
		</select>
		
		</div>
		</td>
	</tr>
<?php 
}
?>
	<tr valign="top">
		<th scope="row" width="30%"><?php 
_e('Page slug');
?>
:</th>
		<td><input name="post_name" type="text" size="25" id="post_name" value="<?php 
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit-page-form.php


示例19: form


//.........这里部分代码省略.........
				<option value='link' <?php 
        selected($instance['display'], 'link');
        ?>
><?php 
        _e('Link', 'insert-pages');
        ?>
</option>
				<option value='excerpt' <?php 
        selected($instance['display'], 'excerpt');
        ?>
><?php 
        _e('Excerpt', 'insert-pages');
        ?>
</option>
				<option value='excerpt-only' <?php 
        selected($instance['display'], 'excerpt-only');
        ?>
><?php 
        _e('Excerpt only (no title)', 'insert-pages');
        ?>
</option>
				<option value='content' <?php 
        selected($instance['display'], 'content');
        ?>
><?php 
        _e('Content', 'insert-pages');
        ?>
</option>
				<option value='all' <?php 
        selected($instance['display'], 'all');
        ?>
><?php 
        _e('All (includes custom fields)', 'insert-pages');
        ?>
</option>
				<option value='template' <?php 
        selected($instance['display'], 'template');
        ?>
><?php 
        _e('Use a custom template', 'insert-pages');
        ?>
 &raquo;</option>
			</select>
			<select class="insertpage-template-select" name="<?php 
        echo $this->get_field_name('template');
        ?>
" id="<?php 
        echo $this->get_field_id('template');
        ?>
" disabled="disabled">
				<option value='all'><?php 
        _e('Default Template', 'insert-pages');
        ?>
</option>
				<?php 
        if (function_exists('page_template_dropdown')) {
            page_template_dropdown($instance['template']);
        }
        ?>
			</select>
		</p>
		<p>
			<label for="<?php 
        echo $this->get_field_id('class');
        ?>
"><?php 
        _e('Extra Classes', 'insert-pages');
        ?>
:</label>
			<input type="text" class="widefat" autocomplete="off" name="<?php 
        echo $this->get_field_name('class');
        ?>
" id="<?php 
        echo $this->get_field_id('class');
        ?>
" value="<?php 
        echo esc_attr($instance['class']);
        ?>
" />
		</p>
		<p>
			<input class="checkbox" type="checkbox" name="<?php 
        echo $this->get_field_name('inline');
        ?>
" id="<?php 
        echo $this->get_field_id('inline');
        ?>
" value="1" <?php 
        checked($instance['inline'], '1');
        ?>
 />
			<label for="<?php 
        echo $this->get_field_id('inline');
        ?>
"><?php 
        _e('Inline?', 'insert-pages');
        ?>
</label>
		</p><?php 
    }
开发者ID:uhm-coe,项目名称:insert-pages,代码行数:101,代码来源:widget.php


示例20: page_attributes_meta_box

/**
 * Display page attributes form fields.
 *
 * @since 2.7.0
 *
 * @param object $post
 */
function page_attributes_meta_box($post)
{
    $post_type_object = get_post_type_object($post->post_type);
    if ($post_type_object->hierarchical) {
        $dropdown_args = array('post_type' => $post->post_type, 'exclude_tree' => $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('(no parent)'), 'sort_column' => 'menu_order, post_title', 'echo' => 0);
        $dropdown_args = apply_filters('page_attributes_dropdown_pages_args', $dropdown_args, $post);
        $pages = wp_dropdown_pages($dropdown_args);
        if (!empty($pages)) {
            ?>
<p><strong><?php 
            _e('Parent');
            ?>
</strong></p>
<label class="screen-reader-text" for="parent_id"><?php 
            _e('Parent');
            ?>
</label&g 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP page_title函数代码示例发布时间:2022-05-15
下一篇:
PHP page_tail函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap