本文整理汇总了PHP中wp_sidebar_description函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_sidebar_description函数的具体用法?PHP wp_sidebar_description怎么用?PHP wp_sidebar_description使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_sidebar_description函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wp_list_widget_controls
/**
* Show the widgets and their settings for a sidebar.
* Used in the admin widget config screen.
*
* @since 2.5.0
*
* @param string $sidebar Sidebar ID.
* @param string $sidebar_name Optional. Sidebar name. Default empty.
*/
function wp_list_widget_controls($sidebar, $sidebar_name = '')
{
add_filter('dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar');
$description = wp_sidebar_description($sidebar);
echo '<div id="' . esc_attr($sidebar) . '" class="widgets-sortables">';
if ($sidebar_name) {
?>
<div class="sidebar-name">
<div class="sidebar-name-arrow"><br /></div>
<h3><?php
echo esc_html($sidebar_name);
?>
<span class="spinner"></span></h3>
</div>
<?php
}
if (!empty($description)) {
?>
<div class="sidebar-description">
<p class="description"><?php
echo $description;
?>
</p>
</div>
<?php
}
dynamic_sidebar($sidebar);
echo '</div>';
}
示例2: wp_list_widget_controls
/**
* Show the widgets and their settings for a sidebar.
* Used in the the admin widget config screen.
*
* @since unknown
*
* @param string $sidebar id slug of the sidebar
*/
function wp_list_widget_controls($sidebar)
{
add_filter('dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar');
echo "<div id='{$sidebar}' class='widgets-sortables'>\n";
$description = wp_sidebar_description($sidebar);
if (!empty($description)) {
echo "<div class='sidebar-description'>\n";
echo "\t<p class='description'>{$description}</p>";
echo "</div>\n";
}
dynamic_sidebar($sidebar);
echo "</div>\n";
}
示例3: ultimate_wp_list_widget_controls
function ultimate_wp_list_widget_controls( $sidebar ) {
add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' );
echo "<div id='$sidebar' class='widgets-sortables ui-sortable'>\n";
$description = wp_sidebar_description( $sidebar );
if ( !empty( $description ) ) {
echo "<div class='sidebar-description'>\n";
echo "\t<p class='description'>$description</p>";
echo "</div>\n";
}
ultimate_dynamic_sidebar(false, $sidebar );
echo "</div>\n";
}