本文整理汇总了PHP中wp_list_widget_controls函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_list_widget_controls函数的具体用法?PHP wp_list_widget_controls怎么用?PHP wp_list_widget_controls使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_list_widget_controls函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: esc_attr
}
if ($i > 0) {
$wrap_class .= ' closed';
}
if ($split && $i == $split) {
?>
</div><div class="sidebars-column-2">
<?php
}
?>
<div class="<?php
echo esc_attr($wrap_class);
?>
">
<?php
wp_list_widget_controls($sidebar, $registered_sidebar['name']);
// Show the control forms for each of the widgets in this sidebar
?>
</div>
<?php
$i++;
}
?>
</div>
</div>
</div>
<form action="" method="post">
<?php
wp_nonce_field('save-sidebar-widgets', '_wpnonce_widgets', false);
?>
</form>
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:31,代码来源:widgets.php
示例2: bizz_grid_tree
function bizz_grid_tree($grid_array = array(), $tree = false)
{
global $wp_registered_sidebars;
// print_r($grid_array);
$grid_count = count($grid_array);
if ($grid_count == 2) {
$grid_class = 'span6';
} elseif ($grid_count == 3) {
$grid_class = 'span4';
} elseif ($grid_count == 4) {
$grid_class = 'span3';
} elseif ($grid_count == 5) {
$grid_class = 'span2_';
} elseif ($grid_count == 6) {
$grid_class = 'span2';
} else {
$grid_class = 'span12';
}
#one equal column
// new row
echo $tree ? '<div class="row-fluid">' : '';
// loop through all grids
foreach ($grid_array as $grid => $registered_grid) {
$grid_class = isset($registered_grid['columns']) ? 'span' . $registered_grid['columns'] : $grid_class;
#columns defined?
$grid_class = isset($registered_grid['show']) && $registered_grid['show'] == 'true' && $grid_class == 'span12' ? 'row-fluid' : $grid_class;
#show nested grid?
$grid_class = $grid_class == 'span12' ? 'row-fluid' : $grid_class;
#show nested grid?
?>
<div class="<?php
echo $grid_class;
?>
">
<?php
// loop through all sidebars
$i = 0;
foreach ($wp_registered_sidebars as $sidebar => $registered_sidebar) {
if ('bizz_inactive_widgets' == $sidebar) {
continue;
}
$closed = ' closed';
if ($grid == $registered_sidebar['grid']) {
?>
<div class="grid-area">
<div class="grid-name">
<h3>
<?php
echo esc_html($registered_sidebar['name']);
?>
<span class="spinner"></span>
</h3>
</div>
<?php
wp_list_widget_controls($sidebar);
?>
</div><!-- /.widgets-holder-wrap -->
<?php
}
$i++;
}
// nested sidebars
if (is_array($registered_grid['tree'])) {
bizz_grid_tree($registered_grid['tree'], true);
}
?>
</div><!-- /.grid class -->
<?php
}
// new row
echo $tree ? '</div>' : '';
}
开发者ID:loevendahl,项目名称:flexbil,代码行数:77,代码来源:frame_layout.php
示例3: _e
echo $sidebar_info_text;
?>
</p>
<p><?php
_e('Add more from the Available Widgets section.');
?>
</p>
</div>
</div>
<div id="current-widgets" class="widget-liquid-right">
<div id="current-sidebar">
<?php
wp_list_widget_controls($sidebar);
// Show the control forms for each of the widgets in this sidebar
?>
</div>
<p class="submit">
<input type="hidden" id='sidebar' name='sidebar' value="<?php
echo $sidebar;
?>
" />
<input type="hidden" id="generated-time" name="generated-time" value="<?php
echo time() - 1199145600;
// Jan 1, 2008
?>
" />
开发者ID:SymbiSoft,项目名称:litprojects,代码行数:31,代码来源:widgets.php
示例4: get_active_widgets
/**
*
* Get Active Widgets, renders widget list
*
* @method get_active_widgets
* @param type $sidebar
*
* @return void
*
*/
public static function get_active_widgets($sidebar)
{
wp_list_widget_controls($sidebar);
}
开发者ID:voceconnect,项目名称:voce-post-meta-widgets,代码行数:14,代码来源:voce-post-meta-widgets.php
示例5: _e
<form id="widget-controls" action="" method="post">
<div id="current-widgets-head" class="widget-liquid-right">
<div id="sidebar-info">
<p><?php echo $sidebar_info_text; ?></p>
<p><?php _e( 'Add more from the Available Widgets section.' ); ?></p>
</div>
</div>
<div id="current-widgets" class="widget-liquid-right">
<div id="current-sidebar">
<?php wp_list_widget_controls( $sidebar ); // Show the control forms for each of the widgets in this sidebar ?>
</div>
<p class="submit">
<input type="hidden" id='sidebar' name='sidebar' value="<?php echo $sidebar; ?>" />
<input type="hidden" id="generated-time" name="generated-time" value="<?php echo time() - 1199145600; // Jan 1, 2008 ?>" />
<input type="submit" name="save-widgets" value="<?php _e( 'Save Changes' ); ?>" />
<?php
wp_nonce_field( 'edit-sidebar_' . $sidebar );
?>
</p>
</div>
</form>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:29,代码来源:widgets.php
示例6: renderRightRegisteredSidebars
function renderRightRegisteredSidebars()
{
$i = 0;
global $wp_registered_sidebars;
foreach ($wp_registered_sidebars as $sidebar => $registered_sidebar) {
if (false !== strpos($registered_sidebar['class'], 'inactive-sidebar') || 'orphaned_widgets' == substr($sidebar, 0, 16)) {
continue;
}
$wrap_class = 'widgets-holder-wrap';
if (!empty($registered_sidebar['class'])) {
$wrap_class .= ' sidebar-' . $registered_sidebar['class'];
}
if ($i) {
$wrap_class .= ' closed';
}
?>
<div class="<?php
echo esc_attr($wrap_class);
?>
">
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br /></div>
<h3><?php
echo esc_html($registered_sidebar['name']);
?>
<span class="spinner"></span></h3></div>
<?php
wp_list_widget_controls($sidebar);
// Show the control forms for each of the widgets in this sidebar
?>
</div>
<?php
$i++;
}
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:38,代码来源:WidgetModule.php
示例7: display_layout_detail
function display_layout_detail($layout_id, $post_ID)
{
$i = 1;
$update = array('layout_id' => $layout_id, 'post_ID' => $post_ID, 'zones' => array());
require_once ABSPATH . 'wp-admin/includes/widgets.php';
global $wp_registered_widget_updates, $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets;
$this->register_zones_as_sidebars();
$sidebars_widgets = wp_get_sidebars_widgets();
if (empty($sidebars_widgets)) {
$sidebars_widgets = wp_get_widget_defaults();
}
?>
<h4><?php
_e("Select a zone and drag a widget", BAOL_PL_TEXTDOMAIN);
?>
</h4>
<div id="widget-list" class="float-break clear">
<?php
wp_list_widgets();
?>
</div>
<div class="details clear">
<ul><?php
foreach ($this->registered_layouts[$layout_id]['zones'] as $i => $zone) {
register_sidebar(array('name' => $zone, 'id' => 'zone-' . $i . '-page-' . $post_ID, 'before_widget' => '<div id="%1$s" class="widget zone %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>'));
$update['zones'][] = 'zone-' . $i . '-page-' . $post_ID;
?>
<li><a href="#zone-<?php
echo $i;
?>
-panel"><span><?php
echo $zone;
?>
</span></a></li><?php
}
$this->current_layout = $this->set_current_layout($post_ID, $update);
?>
</ul><?php
foreach ($this->registered_layouts[$layout_id]['zones'] as $i => $zone) {
?>
<div id="zone-<?php
echo $i;
?>
-panel">
<div class="widgets-zone-sortables zone-name">
<?php
wp_list_widget_controls('zone-' . $i . '-page-' . $post_ID);
?>
</div>
</div><?php
}
?>
</div>
<div style="display:none !important">
<?php
foreach ($wp_registered_sidebars as $sidebar => $registered_sidebar) {
if (in_array($sidebar, $update['zones'])) {
continue;
}
wp_list_widget_controls($sidebar);
}
?>
</div><?php
}
开发者ID:azeemgolive,项目名称:thefunkidsgame,代码行数:73,代码来源:page-layout.php
示例8: esc_attr
$wrap_class .= ' sidebar-' . $cusotm_sidebar['class'];
}
if ($counter > 0) {
$wrap_class .= ' closed';
}
?>
<div class="<?php
echo esc_attr($wrap_class);
?>
cherry-widgets-holder-wrap">
<div class='cherry-delete-sidebar-manager'>
<div class="cherry-spinner-wordpress spinner-wordpress-type-1"><span class="cherry-inner-circle"></span></div>
<span class="dashicons dashicons-trash"></span>
</div>
<?php
wp_list_widget_controls($sidebar, $cusotm_sidebar['name']);
// Show the control forms for each of the widgets in this sidebar
?>
</div>
<?php
$counter += 1;
}
?>
</div>
</div>
</div>
</div>
<!-- Script changed widgets page dom. -->
<script>
开发者ID:pixelTM,项目名称:cherry-sidebar-manager,代码行数:31,代码来源:cherry-widgets-page.php
示例9: esc_attr
$wrap_class = 'widgets-holder-wrap';
if ( !empty( $registered_sidebar['class'] ) )
$wrap_class .= ' sidebar-' . $registered_sidebar['class'];
if ( $i > 0 )
$wrap_class .= ' closed';
if ( $split && $i == $split ) {
?>
</div><div class="sidebars-column-2">
<?php
}
?>
<div class="<?php echo esc_attr( $wrap_class ); ?>">
<?php wp_list_widget_controls( $sidebar, $registered_sidebar['name'] ); // Show the control forms for each of the widgets in this sidebar ?>
</div>
<?php
$i++;
}
?>
</div>
</div>
</div>
<form method="post">
<?php wp_nonce_field( 'save-sidebar-widgets', '_wpnonce_widgets', false ); ?>
</form>
<br class="clear" />
</div>
开发者ID:ShankarVellal,项目名称:WordPress,代码行数:31,代码来源:widgets.php
示例10: block_output
/**
* The content for the content section.
*
* @since Client Dash 1.4
*/
public function block_output()
{
// Check to see if any plugin modifications have been made, and notify the user
$active_plugins = get_option('active_plugins');
$cd_active_plugins = get_option('cd_active_plugins');
if ($active_plugins != $cd_active_plugins) {
$dashboard_link = get_admin_url();
$dashboard_link = add_query_arg('cd_update_dash', 'true', $dashboard_link);
$dashboard_link = "<a href='{$dashboard_link}'>Dashboard</a>";
$this->error_nag("Hate to bother you, but one or more plugins has been activated / deactivated. Could you please visit the {$dashboard_link} to refresh the available widgets?");
return;
}
// WP API for widgets; required for use
require_once ABSPATH . 'wp-admin/includes/widgets.php';
// From wp-admin/widgets.php. Modified for CD use.
?>
<div id="cd-widgets">
<div class="widget-liquid-left">
<div id="widgets-left">
<div id="available-widgets" class="widgets-holder-wrap">
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br/></div>
<h3><?php
_e('Available Widgets');
?>
<span
id="removing-widget"><?php
_ex('Deactivate', 'removing-widget');
?>
<span></span></span></h3>
</div>
<div class="widget-holder">
<div class="sidebar-description">
<p class="description"><?php
_e('To activate a widget drag it to a sidebar or click on it. To deactivate a widget and delete its settings, drag it back.');
?>
</p>
</div>
<div id="widget-list">
<?php
wp_list_widgets();
?>
</div>
<br class='clear'/>
</div>
<br class="clear"/>
</div>
</div>
</div>
<div class="widget-liquid-right">
<div id="widgets-right" class="single-sidebar">
<div class="sidebars-column-1">
<?php
$i = 0;
foreach ($this->sidebars as $sidebar) {
$wrap_class = 'widgets-holder-wrap';
if (!empty($registered_sidebar['class'])) {
$wrap_class .= ' sidebar-' . $registered_sidebar['class'];
}
if ($i > 0) {
$wrap_class .= ' closed';
}
?>
<div class="<?php
echo esc_attr($wrap_class);
?>
">
<?php
wp_list_widget_controls($sidebar['id'], $sidebar['name']);
?>
</div>
<?php
$i++;
}
?>
</div>
</div>
</div>
<form action="" method="post">
<?php
wp_nonce_field('save-sidebar-widgets', '_wpnonce_widgets', false);
?>
</form>
<br class="clear"/>
<div class="widgets-chooser">
<ul class="widgets-chooser-sidebars"></ul>
<div class="widgets-chooser-actions">
<button class="button-secondary"><?php
_e('Cancel');
?>
</button>
<button class="button-primary"><?php
//.........这里部分代码省略.........
开发者ID:BenjaminCool,项目名称:client-dash,代码行数:101,代码来源:widgets.php
注:本文中的wp_list_widget_controls函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论