本文整理汇总了PHP中isUserMadeSidebar函数的典型用法代码示例。如果您正苦于以下问题:PHP isUserMadeSidebar函数的具体用法?PHP isUserMadeSidebar怎么用?PHP isUserMadeSidebar使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isUserMadeSidebar函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$qode_custom_sidebars = array();
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
$qode_custom_sidebars[$sidebar['id']] = ucwords($sidebar['name']);
}
}
$qode_blog_categories = array();
$categories = get_categories();
foreach ($categories as $category) {
$qode_blog_categories[$category->term_id] = $category->name;
}
//Qode Slide Type
$qodeSlideType = new QodeMetaBox("slides", "Qode Slide Type");
$qodeFramework->qodeMetaBoxes->addMetaBox("slides_type", $qodeSlideType);
$qode_slide_background_type = new QodeMetaField("imagevideo", "qode_slide-background-type", "image", "Slide Background Type", "Do you want to upload an image or video?", array(), array("dependence" => true, "dependence_hide_on_yes" => "#qodef-meta-box-slides_video_settings", "dependence_show_on_yes" => "#qodef-meta-box-slides_image_settings"));
$qodeSlideType->addChild("qode_slide-background-type", $qode_slide_background_type);
//Qode Slide Image
$qodeSlideImageSettings = new QodeMetaBox("slides", "Qode Slide Image", "qode_slide-background-type", array("video"));
$qodeFramework->qodeMetaBoxes->addMetaBox("slides_image_settings", $qodeSlideImageSettings);
$qode_slide_image = new QodeMetaField("image", "qode_slide-image", "", "Slide Image", "Choose background image");
$qodeSlideImageSettings->addChild("qode_title-image", $qode_slide_image);
$qode_slide_overlay_image = new QodeMetaField("image", "qode_slide-overlay-image", "", "Overlay Image", "Choose overlay image (pattern) for background image");
$qodeSlideImageSettings->addChild("qode_slide-overlay-image", $qode_slide_overlay_image);
$qode_enable_image_animation = new QodeMetaField("yesno", "qode_enable_image_animation", "no", "Enable Image Animation", "Enabling this option will turn on a motion animation on the slide image", array(), array("dependence" => "true", "dependence_hide_on_yes" => "", "dependence_show_on_yes" => "#qodef_qode_enable_image_animation_container"));
$qodeSlideImageSettings->addChild('qode_enable_image_animation', $qode_enable_image_animation);
$qode_enable_image_animation_container = new QodeContainer("qode_enable_image_animation_container", "qode_enable_image_animation", "no");
$qodeSlideImageSettings->addChild("qode_enable_image_animation_container", $qode_enable_image_animation_container);
$qode_enable_image_animation_type = new QodeMetaField("select", "qode_enable_image_animation_type", "zoom_center", "Animation Type", "", array("zoom_center" => "Zoom In Center", "zoom_top_left" => "Zoom In to Top Left", "zoom_top_right" => "Zoom In to Top Right", "zoom_bottom_left" => "Zoom In to Bottom Left", "zoom_bottom_right" => "Zoom In to Bottom Right"));
$qode_enable_image_animation_container->addChild("qode_enable_image_animation_type", $qode_enable_image_animation_type);
示例2: start_el
//.........这里部分代码省略.........
?>
</select>
<br/><?php
_e('Only with "wide with icons" menu type', 'qode');
?>
</label>
</p>
<p class="field-custom description description-thin description-thin-custom">
</p>
<p class="field-custom description description-thin description-thin-custom">
<label for="edit-menu-item-sidebar-<?php
echo $item_id;
?>
">
<?php
_e('Custom widget area', 'qode');
?>
<br />
<select id="edit-menu-item-sidebar<?php
echo $item_id;
?>
" name="menu-item-sidebar[<?php
echo $item_id;
?>
]">
<option value="" <?php
if (esc_attr($item->sidebar) == "") {
echo 'selected="selected"';
}
?>
></option>
<?php
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (esc_attr($item->sidebar) == ucwords($sidebar['id'])) {
?>
selected="selected" <?php
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
?>
</select>
<br/><?php
_e('Only with "wide & wide with icons" menu type', 'qode');
?>
</label>
</p>
<?php
/* New fields insertion ends here */
?>
<div class="menu-item-actions description-wide submitbox">
<?php
示例3: displayCustomFields
//.........这里部分代码省略.........
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == "") {
?>
selected="selected" <?php
}
?>
></option>
<option value="no" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == "no") {
?>
selected="selected" <?php
}
?>
>No</option>
<option value="yes" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == "yes") {
?>
selected="selected" <?php
}
?>
>Yes</option>
<?php
echo '</select>';
break;
case "image-title-image":
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<div class="image_holder"><input type="text" id="title_image" name="' . $this->prefix . $customField['name'] . '" class="title_image" value="' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '" /><input class="upload_button" type="button" value="Upload file"></div>';
break;
case "selectbox-sidebar":
// Selectbox
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<select name="' . $this->prefix . $customField['name'] . '" id="' . $this->prefix . $customField['name'] . '">';
echo '<option value=""></option>';
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == ucwords($sidebar['id'])) {
?>
selected="selected" <?php
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
echo '</select>';
break;
case "datepicker":
// Datepicker
echo '<label for="' . $this->prefix . $customField['name'] . '"><b>' . $customField['title'] . '</b></label>';
echo '<input type="text" class="datepicker" name="' . $this->prefix . $customField['name'] . '" id="' . $this->prefix . $customField['name'] . '" value="' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '" />';
break;
case "colorpicker":
//Colorpicker
echo '<label for="' . $this->prefix . $customField['name'] . '"><b>' . $customField['title'] . '</b></label>';
echo '<div class="colorSelector"><div style="background-color:' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '"></div></div>';
echo '<input type="text" name="' . $this->prefix . $customField['name'] . '" id="' . $this->prefix . $customField['name'] . '" value="' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '" size="10" maxlength="10" />';
示例4: general_options_contentbox
//.........这里部分代码省略.........
?>
value="3">Sidebar 1/3 left</option>
<option <?php
if (isset($options['blog_single_sidebar'])) {
$blog_single_sidebar = $options['blog_single_sidebar'];
if ($blog_single_sidebar == 4) {
echo "selected='selected'";
}
}
?>
value="4">Sidebar 1/4 left</option>
</select>
</td>
</tr>
<tr valign="middle">
<td scope="row" width="150"><?php
esc_html_e('Sidebar to display', 'qode');
?>
</td>
<td>
<select name="qode_options_satellite[blog_single_sidebar_custom_display]">
<option value="" <?php
if (isset($options['blog_single_sidebar_custom_display'])) {
$blog_single_sidebar_custom_display = $options['blog_single_sidebar_custom_display'];
if ($blog_single_sidebar_custom_display == "") {
echo "selected='selected'";
}
}
?>
></option>
<?php
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (isset($options['blog_single_sidebar_custom_display'])) {
$blog_single_sidebar_custom_display = $options['blog_single_sidebar_custom_display'];
if ($blog_single_sidebar_custom_display == ucwords($sidebar['id'])) {
echo "selected='selected'";
}
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
?>
</select>
</td>
</tr>
</tbody>
</table>
<?php
display_save_changes_button();
?>
</div>
<h3><?php
esc_html_e('Contact page', 'qode');
示例5: general_options_contentbox
//.........这里部分代码省略.........
if (isset($options['enable_content_bottom_area']) && $options['enable_content_bottom_area'] == "yes") {
echo "selected='selected'";
}
?>
value="yes">yes</option>
<option <?php
if (isset($options['enable_content_bottom_area']) && $options['enable_content_bottom_area'] == "no") {
echo "selected='selected'";
}
?>
value="no">no</option>
</select>
</div>
</td>
</tr>
<tr valign="middle">
<td scope="row" width="150"><?php
esc_html_e('Content bottom sidebar to display', 'qode');
?>
</td>
<td>
<select name="qode_options_theme13[content_bottom_sidebar_custom_display]">
<option value="" <?php
if (isset($options['content_bottom_sidebar_custom_display'])) {
$content_bottom_sidebar_custom_display = $options['content_bottom_sidebar_custom_display'];
if ($content_bottom_sidebar_custom_display == "") {
echo "selected='selected'";
}
}
?>
></option>
<?php
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (isset($options['content_bottom_sidebar_custom_display'])) {
$content_bottom_sidebar_custom_display = $options['content_bottom_sidebar_custom_display'];
if ($content_bottom_sidebar_custom_display == ucwords($sidebar['id'])) {
echo "selected='selected'";
}
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
?>
</select>
</td>
</tr>
<tr valign="middle">
<td valign="middle" width="150"><?php
esc_html_e('Content bottom in grid', 'qode');
?>
</td>
<td>
<div class="inline">
<select name="qode_options_theme13[content_bottom_in_grid]">
示例6: displayCustomFields
//.........这里部分代码省略.........
foreach ($fontArrays as $fontArray) {
?>
<option <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == str_replace(' ', '+', $fontArray["family"])) {
echo "selected='selected'";
}
?>
value="<?php
echo str_replace(' ', '+', $fontArray["family"]);
?>
"><?php
echo $fontArray["family"];
?>
</option>
<?php
}
?>
<?php
echo '</select>';
echo '</div>';
break;
case "selectbox-sidebar":
// Selectbox
if ($customField['float_left'] == 'yes') {
$float_left = 'float_left';
} else {
$float_left = '';
}
echo '<div class="form-field ' . $float_left . ' form-required">';
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<select name="' . $this->prefix . $customField['name'] . '" id="' . $this->prefix . $customField['name'] . '">';
echo '<option value=""></option>';
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == ucwords($sidebar['id'])) {
?>
selected="selected" <?php
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
echo '</select>';
echo '</div>';
break;
case "carousel-image":
if ($customField['float_left'] == 'yes') {
$float_left = 'float_left';
} else {
$float_left = '';
}
echo '<div class="form-field ' . $float_left . ' form-required">';
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<div class="image_holder"><input type="text" id="carousel-image" name="' . $this->prefix . $customField['name'] . '" class="title_image" value="' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '" /><input class="upload_button" type="button" value="Upload file"></div>';
echo '</div>';
示例7: general_options_contentbox
//.........这里部分代码省略.........
if (isset($options['enable_content_bottom_area']) && $options['enable_content_bottom_area'] == "yes") {
echo "selected='selected'";
}
?>
value="yes">yes</option>
<option <?php
if (isset($options['enable_content_bottom_area']) && $options['enable_content_bottom_area'] == "no") {
echo "selected='selected'";
}
?>
value="no">no</option>
</select>
</div>
</td>
</tr>
<tr valign="middle">
<td scope="row" width="150"><?php
esc_html_e('Content bottom sidebar to display', 'qode');
?>
</td>
<td>
<select name="qode_options_proya[content_bottom_sidebar_custom_display]">
<option value="" <?php
if (isset($options['content_bottom_sidebar_custom_display'])) {
$content_bottom_sidebar_custom_display = $options['content_bottom_sidebar_custom_display'];
if ($content_bottom_sidebar_custom_display == "") {
echo "selected='selected'";
}
}
?>
></option>
<?php
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (isset($options['content_bottom_sidebar_custom_display'])) {
$content_bottom_sidebar_custom_display = $options['content_bottom_sidebar_custom_display'];
if ($content_bottom_sidebar_custom_display == ucwords($sidebar['id'])) {
echo "selected='selected'";
}
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
?>
</select>
</td>
</tr>
<tr valign="middle">
<td valign="middle" width="150"><?php
esc_html_e('Content bottom in grid', 'qode');
?>
</td>
<td>
<div class="inline">
<select name="qode_options_proya[content_bottom_in_grid]">
示例8: displayCustomFields
//.........这里部分代码省略.........
></option>
<option value="left" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == "left") {
?>
selected="selected" <?php
}
?>
>Left</option>
<option value="center" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == "center") {
?>
selected="selected" <?php
}
?>
>Center</option>
<?php
echo '</select>';
echo '</div>';
break;
case "selectbox-sidebar":
// Selectbox
if ($customField['float_left'] == 'yes') {
$float_left = 'float_left';
} else {
$float_left = '';
}
echo '<div class="form-field ' . $float_left . ' form-required">';
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<select name="' . $this->prefix . $customField['name'] . '" id="' . $this->prefix . $customField['name'] . '">';
echo '<option value=""></option>';
foreach ($GLOBALS['wp_registered_sidebars'] as $sidebar) {
if (isUserMadeSidebar(ucwords($sidebar['name']))) {
?>
<option value="<?php
echo ucwords($sidebar['id']);
?>
" <?php
if (get_post_meta($post->ID, $this->prefix . $customField['name'], true) == ucwords($sidebar['id'])) {
?>
selected="selected" <?php
}
?>
>
<?php
echo ucwords($sidebar['name']);
?>
</option>
<?php
}
}
echo '</select>';
echo '</div>';
break;
case "carousel-image":
if ($customField['float_left'] == 'yes') {
$float_left = 'float_left';
} else {
$float_left = '';
}
echo '<div class="form-field ' . $float_left . ' form-required">';
echo '<label for="' . $this->prefix . $customField['name'] . '" style="display:inline;"><b>' . $customField['title'] . '</b></label> ';
echo '<div class="image_holder"><input type="text" id="carousel-image" name="' . $this->prefix . $customField['name'] . '" class="title_image" value="' . htmlspecialchars(get_post_meta($post->ID, $this->prefix . $customField['name'], true)) . '" /><input class="upload_button" type="button" value="Upload file"></div>';
echo '</div>';