本文整理汇总了PHP中genesis_layout_selector函数的典型用法代码示例。如果您正苦于以下问题:PHP genesis_layout_selector函数的具体用法?PHP genesis_layout_selector怎么用?PHP genesis_layout_selector使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了genesis_layout_selector函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: genesis_inpost_layout_box
/**
* Callback for in-post layout meta box.
*
* @since 0.2.2
*
* @uses genesis_get_custom_field() Get custom field value.
* @uses genesis_layout_selector() Layout selector.
*/
function genesis_inpost_layout_box()
{
wp_nonce_field('genesis_inpost_layout_save', 'genesis_inpost_layout_nonce');
$layout = genesis_get_custom_field('_genesis_layout');
?>
<fieldset class="genesis-layout-selector">
<legend class="screen-reader-text"><?php
_e('Layout Settings', 'genesis');
?>
</legend>
<p><input type="radio" name="genesis_layout[_genesis_layout]" class="default-layout" id="default-layout" value="" <?php
checked($layout, '');
?>
/> <label class="default" for="default-layout"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label></p>
<?php
genesis_layout_selector(array('name' => 'genesis_layout[_genesis_layout]', 'selected' => $layout, 'type' => 'site'));
?>
</fieldset>
<br class="clear" />
<p><label for="genesis_custom_body_class"><strong><?php
_e('Custom Body Class', 'genesis');
?>
</strong></label></p>
<p><input class="large-text" type="text" name="genesis_layout[_genesis_custom_body_class]" id="genesis_custom_body_class" value="<?php
echo esc_attr(genesis_get_custom_field('_genesis_custom_body_class'));
?>
" /></p>
<p><label for="genesis_custom_post_class"><strong><?php
_e('Custom Post Class', 'genesis');
?>
</strong></label></p>
<p><input class="large-text" type="text" name="genesis_layout[_genesis_custom_post_class]" id="genesis_custom_post_class" value="<?php
echo esc_attr(genesis_get_custom_field('_genesis_custom_post_class'));
?>
" /></p>
<?php
}
示例2: layout_box
/**
* Callback for Layout Settings meta box.
*
* @since 2.0.0
*
* @uses \Genesis_Admin::get_field_id() Construct full field id.
* @uses \Genesis_Admin::get_field_name() Construct full field name.
* @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field.
* @uses genesis_layout_selector() Display layout selector.
*
* @see \Genesis_Admin_Settings::metaboxes() Register meta boxes.
*/
public function layout_box()
{
$layout = $this->get_field_value('layout');
?>
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row"><?php
_e('Select Layout', 'genesis');
?>
</th>
<td>
<fieldset class="genesis-layout-selector">
<legend class="screen-reader-text"><?php
_e('Layout Settings', 'genesis');
?>
</legend>
<p><input type="radio" class="default-layout" name="<?php
$this->field_name('layout');
?>
" id="default-layout" value="" <?php
checked($layout, '');
?>
/> <label class="default" for="default-layout"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label></p>
<?php
genesis_layout_selector(array('name' => $this->get_field_name('layout'), 'selected' => $layout, 'type' => 'site'));
?>
</fieldset>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="<?php
$this->field_id('body_class');
?>
"><b><?php
_e('Custom Body Class', 'genesis');
?>
</b></label></th>
<td>
<p><input class="large-text" type="text" name="<?php
$this->field_name('body_class');
?>
" id="<?php
$this->field_id('body_class');
?>
" value="<?php
echo esc_attr($this->get_field_value('body_class'));
?>
" /></p>
</td>
</tr>
</tbody>
</table>
<?php
}
示例3: genesis_taxonomy_layout_options
/**
* Echo the layout options on the taxonomy term edit form.
*
* @since 1.4.0
*
* @uses genesis_layout_selector() Layout selector.
*
* @see genesis_add_taxonomy_layout_options() Callback caller.
*
* @param \stdClass $tag Term object.
* @param string $taxonomy Name of the taxonomy.
*/
function genesis_taxonomy_layout_options($tag, $taxonomy)
{
?>
<h3><?php
_e('Layout Settings', 'genesis');
?>
</h3>
<table class="form-table">
<tbody>
<tr>
<th scope="row"><?php
_e('Choose Layout', 'genesis');
?>
</th>
<td>
<fieldset class="genesis-layout-selector">
<legend class="screen-reader-text"><?php
_e('Choose Layout', 'genesis');
?>
</legend>
<p><input type="radio" class="default-layout" name="genesis-meta[layout]" id="default-layout" value="" <?php
checked(get_term_meta($tag->term_id, 'layout', true), '');
?>
/> <label for="default-layout" class="default"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label></p>
<?php
genesis_layout_selector(array('name' => 'genesis-meta[layout]', 'selected' => get_term_meta($tag->term_id, 'layout', true), 'type' => 'site'));
?>
</fieldset>
</td>
</tr>
</tbody>
</table>
<?php
}
示例4: layout_box
/**
* Callback for Theme Settings Default Layout meta box.
*
* A version of a site layout setting has been in Genesis since at least 0.2.0, but it was moved to its own meta box
* in 1.7.0.
*
* @since 1.7.0
*
* @uses genesis_layout_selector() Outputs form elements for layout selector.
* @uses \Genesis_Admin::get_field_name() Construct field name.
* @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field.
*
* @see \Genesis_Admin_Settings::metaboxes() Register meta boxes on the Theme Settings page.
*/
function layout_box()
{
?>
<fieldset class="genesis-layout-selector">
<legend class="screen-reader-text"><?php
_e('Default Layout', 'genesis');
?>
</legend>
<?php
genesis_layout_selector(array('name' => $this->get_field_name('site_layout'), 'selected' => $this->get_field_value('site_layout'), 'type' => 'site'));
?>
</fieldset>
<br class="clear" />
<?php
}
示例5: genesis_user_layout_fields
/**
* Add author archive layout selector to the user edit screen.
*
* @since 1.4.0
*
* @uses genesis_layout_selector() Layout selector.
*
* @param \WP_User $user User object.
*
* @return false Return false if current user can not edit users.
*/
function genesis_user_layout_fields($user)
{
if (!current_user_can('edit_users', $user->ID)) {
return false;
}
$layout = get_the_author_meta('layout', $user->ID);
$layout = $layout ? $layout : '';
?>
<h3><?php
_e('Layout Settings', 'genesis');
?>
</h3>
<p><span class="description"><?php
_e('These settings apply to this author\'s archive pages.', 'genesis');
?>
</span></p>
<table class="form-table">
<tbody>
<tr>
<th scope="row" valign="top"><?php
_e('Choose Layout', 'genesis');
?>
</th>
<td>
<div class="genesis-layout-selector">
<p>
<input type="radio" name="meta[layout]" id="default-layout" value="" <?php
checked($layout, '');
?>
/>
<label class="default" for="default-layout"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label>
</p>
<p><?php
genesis_layout_selector(array('name' => 'meta[layout]', 'selected' => $layout, 'type' => 'site'));
?>
</p>
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
示例6: genesis_taxonomy_layout_options
/**
* Echo the layout options on the taxonomy term edit form.
*
* @since 1.4.0
*
* @uses genesis_layout_selector() Layout selector.
*
* @see genesis_add_taxonomy_layout_options() Callback caller.
*
* @param \stdClass $tag Term object.
* @param string $taxonomy Name of the taxonomy.
*/
function genesis_taxonomy_layout_options($tag, $taxonomy)
{
?>
<h3><?php
_e('Layout Settings', 'genesis');
?>
</h3>
<table class="form-table">
<tbody>
<tr>
<th scope="row" valign="top"><?php
_e('Choose Layout', 'genesis');
?>
</th>
<td>
<div class="genesis-layout-selector">
<p>
<input type="radio" class="default-layout" name="genesis-meta[layout]" id="default-layout" value="" <?php
checked($tag->meta['layout'], '');
?>
/>
<label for="default-layout" class="default"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label>
</p>
<p><?php
genesis_layout_selector(array('name' => 'genesis-meta[layout]', 'selected' => $tag->meta['layout'], 'type' => 'site'));
?>
</p>
</div>
</td>
</tr>
</tbody>
</table>
<?php
}
示例7: genesis_inpost_layout_box
/**
* Callback for in-post layout meta box.
*
* Echoes out HTML.
*
* @category Genesis
* @package Admin
* @subpackage Inpost-Metaboxes
*
* @since 0.2.2
*/
function genesis_inpost_layout_box()
{
wp_nonce_field(plugin_basename(__FILE__), 'genesis_inpost_layout_nonce');
$layout = genesis_get_custom_field('_genesis_layout');
?>
<div class="genesis-layout-selector">
<p><input type="radio" name="_genesis_layout" id="default-layout" value="" <?php
checked($layout, '');
?>
/> <label class="default" for="default-layout"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label></p>
<p><?php
genesis_layout_selector(array('name' => '_genesis_layout', 'selected' => $layout, 'type' => 'site'));
?>
</p>
</div>
<br class="clear" />
<p><label for="genesis_custom_body_class"><b><?php
_e('Custom Body Class', 'genesis');
?>
</b></label></p>
<p><input class="large-text" type="text" name="_genesis_custom_body_class" id="genesis_custom_body_class" value="<?php
echo esc_attr(sanitize_html_class(genesis_get_custom_field('_genesis_custom_body_class')));
?>
" /></p>
<p><label for="genesis_custom_post_class"><b><?php
_e('Custom Post Class', 'genesis');
?>
</b></label></p>
<p><input class="large-text" type="text" name="_genesis_custom_post_class" id="genesis_custom_post_class" value="<?php
echo esc_attr(sanitize_html_class(genesis_get_custom_field('_genesis_custom_post_class')));
?>
" /></p>
<?php
}
示例8: layout_box
/**
* Callback for Theme Settings Default Layout meta box.
*
* A version of a site layout setting has been in Genesis since at least 0.2.0, but it was moved to its own meta box
* in 1.7.0.
*
* @since 1.7.0
*
* @see \Genesis_Admin_Settings::metaboxes() Register meta boxes on the Theme Settings page.
*/
function layout_box()
{
?>
<table class="form-table">
<tbody>
<tr valign="top">
<th scope="row"><?php
_e('Select Default Layout', 'genesis');
?>
</th>
<td>
<fieldset class="genesis-layout-selector">
<legend class="screen-reader-text"><?php
_e('Default Layout', 'genesis');
?>
</legend>
<?php
genesis_layout_selector(array('name' => $this->get_field_name('site_layout'), 'selected' => $this->get_field_value('site_layout'), 'type' => 'site'));
?>
</fieldset>
<br class="clear" />
</td>
</tr>
</tbody>
</table>
<?php
}
示例9: genesis_theme_settings_layout_box
function genesis_theme_settings_layout_box()
{
?>
<p class="genesis-layout-selector">
<?php
genesis_layout_selector(array('name' => GENESIS_SETTINGS_FIELD . '[site_layout]', 'selected' => genesis_get_option('site_layout')));
?>
</p>
<br class="clear" />
<?php
}
示例10: layout_box
/**
* Callback for Theme Settings Default Layout meta box.
*
* A version of a site layout setting has been in Genesis since at least 0.2.0, but it was moved to its own meta box
* in 1.7.0.
*
* @since 1.7.0
*
* @uses genesis_layout_selector() Outputs form elements for layout selector.
* @uses \Genesis_Admin::get_field_name() Construct field name.
* @uses \Genesis_Admin::get_field_value() Retrieve value of key under $this->settings_field.
*
* @see \Genesis_Admin_Settings::metaboxes() Register meta boxes on the Theme Settings page.
*/
function layout_box()
{
?>
<p class="genesis-layout-selector">
<?php
genesis_layout_selector(array('name' => $this->get_field_name('site_layout'), 'selected' => $this->get_field_value('site_layout'), 'type' => 'site'));
?>
</p>
<br class="clear" />
<?php
}
示例11: layout_box
/**
* The layout metabox for the 404 page.
*
* @since 1.5.0
*/
public function layout_box()
{
$layout = esc_attr($this->get_field_value('genesis_layout'));
?>
<div class="genesis-layout-selector">
<p><input type="radio" name="<?php
echo $this->get_field_name('genesis_layout');
?>
" class="default-layout" id="default-layout" value="" <?php
checked($layout, '');
?>
/> <label class="default" for="default-layout"><?php
printf(__('Default Layout set in <a href="%s">Theme Settings</a>', 'genesis'), menu_page_url('genesis', 0));
?>
</label></p>
<p><?php
genesis_layout_selector(array('name' => $this->get_field_name('genesis_layout'), 'selected' => $layout, 'type' => 'site'));
?>
</p>
</div>
<br class="clear" />
<?php
}