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

PHP wp_nav_menu_disabled_check函数代码示例

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

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



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

示例1: cjtheme_admin_do_wp_nav_menu_meta_box

/**
 * Build and populate the BuddyPress accordion on Appearance > Menus.
 *
 * @since cjtheme 1.5.1
 *
 * @global $nav_menu_selected_id
 */
function cjtheme_admin_do_wp_nav_menu_meta_box()
{
    global $nav_menu_selected_id;
    $walker = new cjtheme_Walker_Nav_Menu_Checklist(false);
    $args = array('walker' => $walker);
    $post_type_name = 'cjtheme';
    $tabs = array();
    $menu_items = array();
    $menu_items[] = array('name' => __('title', 'cjtheme'), 'slug' => 'title', 'link' => '#', 'class' => 'title');
    $menu_items[] = array('name' => __('Login', 'cjtheme'), 'slug' => 'login', 'link' => '#');
    $menu_items[] = array('name' => __('Logout', 'cjtheme'), 'slug' => 'logout', 'link' => wp_logout_url(site_url()));
    $menu_items[] = array('name' => __('Register', 'cjtheme'), 'slug' => 'register', 'link' => "#");
    $menu_items[] = array('name' => __('Instant Search', 'cjtheme'), 'slug' => 'instant-search', 'link' => "#instant-search");
    $menu_items = apply_filters('cjtheme_nav_menu_items', $menu_items);
    $page_args = array();
    if (!empty($menu_items)) {
        foreach ($menu_items as $item) {
            $item_name = '';
            // Remove <span>number</span>
            $item_name = preg_replace('/([.0-9]+)/', '', $item['name']);
            $item_name = trim(strip_tags($item_name));
            $page_args[$item['slug']] = (object) array('ID' => -1, 'post_title' => $item_name, 'post_author' => 0, 'post_date' => 0, 'post_excerpt' => $item['slug'], 'post_type' => 'page', 'post_status' => 'publish', 'comment_status' => 'closed', 'guid' => $item['link']);
        }
    } else {
        _e('No items available here for the moment', 'cjtheme');
        return;
    }
    $tabs['pages'] = $page_args;
    ?>
	<div id="cjtheme-menu" class="posttypediv">
		<div id="tabs-panel-posttype-<?php 
    echo $post_type_name;
    ?>
-loggedin" class="tabs-panel tabs-panel-active">
			<ul id="cjtheme-menu-checklist-loggedin" class="categorychecklist form-no-clear">
				<?php 
    echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $tabs['pages']), 0, (object) $args);
    ?>
			</ul>
		</div>
		<p class="button-controls">
			<span class="add-to-menu">
				<input type="submit"<?php 
    if (function_exists('wp_nav_menu_disabled_check')) {
        wp_nav_menu_disabled_check($nav_menu_selected_id);
    }
    ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
    esc_attr_e('Add to Menu', 'cjtheme');
    ?>
" name="add-custom-menu-item" id="submit-cjtheme-menu" />
				<span class="spinner"></span>
			</span>
		</p>
	</div><!-- /#cjtheme-menu -->
	<?php 
}
开发者ID:praveen-thayikkattil,项目名称:cartoq-theme,代码行数:64,代码来源:custom-menu-items.php


示例2: mynav_show_custom_box

function mynav_show_custom_box()
{
    global $_nav_menu_placeholder, $nav_menu_selected_id;
    $locations = get_nav_menu_locations();
    //_print($locations);
    $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
    ?>
    <div class="customlinkdiv" id="customlinkdiv">
        <input type="hidden" value="custom" name="menu-item[<?php 
    echo $_nav_menu_placeholder;
    ?>
][menu-item-type]" />
        <p id="menu-item-url-wrap">
            <label class="howto" for="custom-menu-item-url">
                <span><?php 
    _e('URL');
    ?>
</span>
                <input id="custom-menu-item-url" name="menu-item[<?php 
    echo $_nav_menu_placeholder;
    ?>
][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
            </label>
        </p>

        <p id="menu-item-name-wrap">
            <label class="howto" for="custom-menu-item-name">
                <span><?php 
    _e('Link Text');
    ?>
</span>
                <input id="custom-menu-item-name" name="menu-item[<?php 
    echo $_nav_menu_placeholder;
    ?>
][menu-item-title]" type="text" class="regular-text menu-item-textbox input-with-default-title" title="<?php 
    esc_attr_e('Menu Item');
    ?>
" />
            </label>
        </p>

        <p class="button-controls">
			<span class="add-to-menu">
				<input type="submit"<?php 
    wp_nav_menu_disabled_check($nav_menu_selected_id);
    ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
    esc_attr_e('Add to Menu');
    ?>
" name="add-custom-menu-item" id="submit-customlinkdiv" />
				<span class="spinner"></span>
			</span>
        </p>

    </div><!-- /.customlinkdiv -->
<?php 
}
开发者ID:hoangsoft90,项目名称:hw-hoangweb-plugin,代码行数:57,代码来源:metabox-navmenu-page.php


示例3: archives_meta_box

    /**
     * Archives Menu
     *
     * @param  mixed  $object   Current object.
     * @param  array  $metabox  Box settings.
     */
    public static function archives_meta_box($object, $metabox)
    {
        global $nav_menu_selected_id;
        if (empty(static::$post_types)) {
            echo '<p>' . __('No items.') . '</p>';
            return;
        }
        $walker = new \Walker_Nav_Menu_Checklist([]);
        ?>
		<div id="<?php 
        echo static::$obj_archive;
        ?>
" class="<?php 
        echo static::$obj_archive;
        ?>
div">
			<div id="tabs-panel-<?php 
        echo static::$obj_archive;
        ?>
" class="tabs-panel tabs-panel-active">
				<ul id="<?php 
        echo static::$obj_archive;
        ?>
-checklist" class="categorychecklist form-no-clear"><?php 
        echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', static::$post_types), 0, (object) ['walker' => $walker]);
        ?>
</ul>
			</div><!-- /.tabs-panel -->
		</div>
		<p class="button-controls">
			<span class="add-to-menu">
				<input type="submit"<?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
        esc_attr_e('Add to Menu');
        ?>
" name="add-<?php 
        echo static::$obj_archive;
        ?>
-menu-item" id="submit-<?php 
        echo static::$obj_archive;
        ?>
" />
				<span class="spinner"></span>
			</span>
		</p>
<?php 
    }
开发者ID:locomotivemtl,项目名称:wordpress-boilerplate,代码行数:55,代码来源:nav-menus.php


示例4: callback

    public function callback($params)
    {
        global $_nav_menu_placeholder, $nav_menu_selected_id;
        $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
        /* get custom post types with archive support */
        $args = array('show_in_nav_menus' => true, 'has_archive' => true);
        $post_types = Post_Type::find($args, 'object');
        /* hydrate the necessary object properties for the walker */
        foreach ($post_types as &$post_type) {
            $post_type->classes = array();
            $post_type->type = $post_type->name;
            $post_type->object_id = $post_type->name;
            $post_type->title = $post_type->labels->name . ' ' . __('Archive', 'default');
            $post_type->object = 'cpt-archive';
            $post_type->menu_item_parent = null;
            $post_type->url = null;
            $post_type->xfn = null;
            $post_type->db_id = null;
            $post_type->target = null;
            $post_type->attr_title = null;
        }
        $walker = new \Walker_Nav_Menu_Checklist(array());
        ?>
		<div id="cpt-archive" class="posttypediv">
			 <div id="tabs-panel-cpt-archive" class="tabs-panel tabs-panel-active">
				  <ul id="ctp-archive-checklist" class="categorychecklist form-no-clear">
						<?php 
        echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $post_types), 0, (object) array('walker' => $walker));
        ?>
				  </ul>
			 </div>
		</div>
		<p class="button-controls">
			 <span class="add-to-menu">
				  <input type="submit"<?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
        esc_attr_e('Add to Menu');
        ?>
" name="add-ctp-archive-menu-item" id="submit-cpt-archive" />
				  <span class="spinner"></span>
			 </span>
		</p>
		<?php 
    }
开发者ID:adriend,项目名称:morepress,代码行数:46,代码来源:Post_Type_Archive.php


示例5: ee_cpt_archive_pages

    public function ee_cpt_archive_pages()
    {
        global $nav_menu_selected_id;
        $db_fields = false;
        $walker = new Walker_Nav_Menu_Checklist($db_fields);
        $current_tab = 'event-archives';
        /*if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
        			$current_tab = 'search';
        		}/**/
        $removed_args = array('action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce');
        ?>
		<div id="posttype-extra-nav-menu-pages" class="posttypediv">
			<ul id="posttype-extra-nav-menu-pages-tabs" class="posttype-tabs add-menu-item-tabs">
				<li <?php 
        echo 'event-archives' == $current_tab ? ' class="tabs"' : '';
        ?>
>
					<a class="nav-tab-link" data-type="tabs-panel-posttype-extra-nav-menu-pages-event-archives" href="<?php 
        if ($nav_menu_selected_id) {
            echo esc_url(add_query_arg('extra-nav-menu-pages-tab', 'event-archives', remove_query_arg($removed_args)));
        }
        ?>
#tabs-panel-posttype-extra-nav-menu-pages-event-archives">
						<?php 
        _e('Event Archive Pages', 'event_espresso');
        ?>
					</a>
				</li>
			<?php 
        /* // temporarily removing but leaving skeleton in place in case we ever decide to add more tabs.
        				<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>>
        					<a class="nav-tab-link" data-type="<?php echo esc_attr( $post_type_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#<?php echo $post_type_name; ?>-all">
        						<?php _e( 'View All' ); ?>
        					</a>
        				</li>
        				<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>>
        					<a class="nav-tab-link" data-type="tabs-panel-posttype-extra-nav-menu-pages-search" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg('extra-nav-menu-pages-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-extra-nav-menu-pages-search">
        						<?php _e( 'Search'); ?>
        					</a>
        				</li> -->
        			</ul><!-- .posttype-tabs -->
         			<?php */
        ?>

			<div id="tabs-panel-posttype-extra-nav-menu-pages-event-archives" class="tabs-panel <?php 
        echo 'event-archives' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive';
        ?>
">
				<ul id="extra-nav-menu-pageschecklist-event-archives" class="categorychecklist form-no-clear">
					<?php 
        $pages = $this->_get_extra_nav_menu_pages_items();
        $args['walker'] = $walker;
        echo walk_nav_menu_tree(array_map(array($this, '_setup_extra_nav_menu_pages_items'), $pages), 0, (object) $args);
        ?>
				</ul>
			</div><!-- /.tabs-panel -->

			<p class="button-controls">
				<span class="list-controls">
					<a href="<?php 
        echo esc_url(add_query_arg(array('extra-nav-menu-pages-tab' => 'event-archives', 'selectall' => 1), remove_query_arg($removed_args)));
        ?>
#posttype-extra-nav-menu-pages>" class="select-all"><?php 
        _e('Select All');
        ?>
</a>
				</span>

				<span class="add-to-menu">
					<input type="submit"<?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
        esc_attr_e(__('Add to Menu'));
        ?>
" name="add-post-type-menu-item" id="<?php 
        esc_attr_e('submit-posttype-extra-nav-menu-pages');
        ?>
" />
					<span class="spinner"></span>
				</span>
			</p>

		</div><!-- /.posttypediv -->

		<?php 
    }
开发者ID:lewiscarr,项目名称:event-espresso-core,代码行数:87,代码来源:EE_Admin.core.php


示例6: wplms_admin_do_wp_nav_menu_meta_box

function wplms_admin_do_wp_nav_menu_meta_box()
{
    global $nav_menu_selected_id;
    $walker = new WPLMS_backend_menu(false);
    $args = array('walker' => $walker);
    $post_type_name = 'wplms';
    $tabs = array();
    $tabs['membersonly']['label'] = __('Members-Only', 'vibe');
    $tabs['membersonly']['pages'] = wplms_nav_menu_get_members_pages();
    $tabs['instructorsonly']['label'] = __('Instructors-Only', 'vibe');
    $tabs['instructorsonly']['pages'] = wplms_nav_menu_get_instructors_pages();
    ?>

    <div id="wplms-menu" class="posttypediv">
      <h4><?php 
    _e('Members-Only', 'vibe');
    ?>
</h4>
      <p><?php 
    _e('<em>Members-Only</em> These links are only visible to logged in users.', 'vibe');
    ?>
</p>

      <div id="tabs-panel-posttype-<?php 
    echo $post_type_name;
    ?>
-loggedin" class="tabs-panel tabs-panel-active">
        <ul id="wplms-menu-checklist-loggedin" class="categorychecklist form-no-clear">
          <?php 
    echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $tabs['membersonly']['pages']), 0, (object) $args);
    ?>
        </ul>
      </div>

      <h4><?php 
    _e('Instructors-Only', 'vibe');
    ?>
</h4>
      <p><?php 
    _e('<em>Instructors-Only</em> links are visible to Instructors.', 'vibe');
    ?>
</p>

      <div id="tabs-panel-posttype-<?php 
    echo $post_type_name;
    ?>
-loggedout" class="tabs-panel tabs-panel-active">
        <ul id="buddypress-menu-checklist-loggedout" class="categorychecklist form-no-clear">
          <?php 
    echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $tabs['instructorsonly']['pages']), 0, (object) $args);
    ?>
        </ul>
      </div>

      <p class="button-controls">
        <span class="add-to-menu">
          <input type="submit"<?php 
    if (function_exists('wp_nav_menu_disabled_check')) {
        wp_nav_menu_disabled_check($nav_menu_selected_id);
    }
    ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
    esc_attr_e('Add to Menu', 'vibe');
    ?>
" name="add-custom-menu-item" id="submit-wplms-menu" />
          <span class="spinner"></span>
        </span>
      </p>
    </div><!-- /#buddypress-menu -->

    <?php 
}
开发者ID:nikitansk,项目名称:devschool,代码行数:72,代码来源:vibe-menu.php


示例7: add_megamenu_metabox

    function add_megamenu_metabox($post)
    {
        // Add an nonce field so we can check for it later.
        wp_nonce_field('add_megamenu_metabox', 'add_megamenu_metabox_nonce');
        global $_nav_menu_placeholder, $nav_menu_selected_id;
        $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
        ?>
        <div class="customlink-add-item" id="customlink-add-item">
            <input type="submit" <?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu" value="<?php 
        esc_attr_e('Add Column');
        ?>
" name="add-column" id="submit-megamenu-column" onclick="jQuery('#custom-menu-item-name-megamenu').val('Mega Menu Column') "/><br><br>
            <input type="submit" <?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu" value="<?php 
        esc_attr_e('Add Heading Item');
        ?>
" name="add-column" id="submit-megamenu-heading-item" onclick="jQuery('#custom-menu-item-name-megamenu').val('Mega Menu Heading') "/><br><br>
            <input type="submit" <?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu" value="<?php 
        esc_attr_e('Add Content Item');
        ?>
" name="add-column" id="submit-megamenu-content-item" onclick="jQuery('#custom-menu-item-name-megamenu').val('Mega Menu Content') "/><br><br>


            <label for="myplugin_new_field">After you click on the button, menu item will appear on the bottom of current menu.<br>
                Rearrange it to the right position<br>
                <br>
                See our documentation on ....
            </label>
        </div>
    <?php 
        wp_register_style('tfingi-megamenu-backend', plugins_url('tfingi-megamenu-backend.css', __FILE__));
        wp_enqueue_style('tfingi-megamenu-backend');
        wp_register_script('tfingi-megamenu-js', plugins_url('tfingi-megamenu.js', __FILE__), array('jquery'), filemtime(plugin_dir_path(__FILE__) . 'tfingi-megamenu.js'), true);
        wp_enqueue_script('tfingi-megamenu-js');
    }
开发者ID:ravenvn,项目名称:sandau,代码行数:43,代码来源:tfingi-megamenu.php


示例8: nav_html


//.........这里部分代码省略.........
"> <?php 
            echo __('CoursePress Login', 'cp');
            ?>
							</label>
							<input type="hidden" class="menu-item-type" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-type]" value="custom">
							<input type="hidden" class="menu-item-title" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-title]" value="<?php 
            echo __('Login', 'cp');
            ?>
">
							<input type="hidden" class="menu-item-url" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-url]" value="<?php 
            echo CoursePress::instance()->get_login_slug(true);
            ?>
">
							<input type="hidden" class="menu-item-classes" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-classes]" value="coursepress-menu-item coursepress-menu-item-login">
						</li>
						<?php 
            $_nav_menu_placeholder = $_nav_menu_placeholder - 1;
            ?>
						<li>
							<label class="menu-item-title">
								<input type="checkbox" class="menu-item-checkbox" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-object-id]" value="<?php 
            echo $_nav_menu_placeholder;
            ?>
"> <?php 
            echo __('CoursePress Signup', 'cp');
            ?>
							</label>
							<input type="hidden" class="menu-item-type" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-type]" value="custom">
							<input type="hidden" class="menu-item-title" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-title]" value="<?php 
            echo __('Signup', 'cp');
            ?>
">
							<input type="hidden" class="menu-item-url" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-url]" value="<?php 
            echo CoursePress::instance()->get_signup_slug(true);
            ?>
">
							<input type="hidden" class="menu-item-classes" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-classes]" value="coursepress-menu-item coursepress-menu-item-signup">
						</li>

					</ul>
				</div>
				<!-- /.tabs-panel -->

				<p class="button-controls">
					<span class="list-controls">
						<a href="<?php 
            echo esc_url(add_query_arg(array($post_type_name . '-tab' => 'cp-published', 'selectall' => 1), remove_query_arg($removed_args)));
            ?>
#posttype-<?php 
            echo $post_type_name;
            ?>
" class="select-all"><?php 
            _e('Select All', 'cp');
            ?>
</a>
					</span>
					<span class="add-to-menu">
						<input type="submit"<?php 
            wp_nav_menu_disabled_check($nav_menu_selected_id);
            ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
            esc_attr_e('Add to Menu', 'cp');
            ?>
" name="add-course-menu-item" id="<?php 
            echo esc_attr('submit-posttype-' . $post_type_name);
            ?>
"/>
						<span class="spinner"></span>
					</span>
				</p>
			</div>
		<?php 
        }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:101,代码来源:class.menumetabox.php


示例9: wp_nav_menu_item_anspress_meta_box

    /**
     * Shows AnsPress menu meta box in WP menu editor
     * @return void
     * @since unknown
     */
    public function wp_nav_menu_item_anspress_meta_box()
    {
        global $_nav_menu_placeholder, $nav_menu_selected_id;
        $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
        $pages = anspress()->pages;
        echo '<div class="aplinks" id="aplinks">';
        echo '<input type="hidden" value="custom" name="menu-item[' . $_nav_menu_placeholder . '][menu-item-type]" />';
        echo '<ul>';
        $pages['profile'] = array('title' => __('User profile', 'anspress-question-answer'), 'show_in_menu' => true);
        $pages['notification'] = array('title' => __('User notification', 'anspress-question-answer'), 'show_in_menu' => true);
        foreach ($pages as $k => $args) {
            if ($args['show_in_menu']) {
                echo '<li>';
                echo '<label class="menu-item-title">';
                echo '<input type="radio" value="" name="menu-item[' . $_nav_menu_placeholder . '][menu-item-url]" class="menu-item-checkbox" data-url="' . strtoupper('ANSPRESS_PAGE_URL_' . $k) . '" data-title="' . $args['title'] . '"> ' . $args['title'] . '</label>';
                echo '</li>';
            }
        }
        echo '</ul><p class="button-controls">
					<span class="add-to-menu">
						<input type="submit"' . wp_nav_menu_disabled_check($nav_menu_selected_id) . ' class="button-secondary submit-add-to-menu right" value="' . __('Add to Menu', 'anspress-question-answer') . '" name="add-custom-menu-item" id="submit-aplinks" />
						<span class="spinner"></span>
					</span>
				</p>';
        echo '</div>';
    }
开发者ID:deepakd92,项目名称:anspress,代码行数:31,代码来源:anspress-admin.php


示例10: wp_nav_menu_item_anspress_meta_box

    public function wp_nav_menu_item_anspress_meta_box()
    {
        global $_nav_menu_placeholder, $nav_menu_selected_id;
        $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
        $base_page = ap_opt('base_page');
        ?>
		<div class="aplinks" id="aplinks">
			<input type="hidden" value="custom" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-type]" />
			<ul>
				<li>
					<label class="menu-item-title">
						<input type="radio" value="" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-url]" class="menu-item-checkbox" data-url="ANSPRESS_BASE_PAGE_URL" data-title="<?php 
        _e('AnsPress', 'ap');
        ?>
"> <?php 
        _e('AnsPress', 'ap');
        ?>
					</label>
				</li>
				<li>
					<label class="menu-item-title">
						<input type="radio" value="" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-url]" class="menu-item-checkbox" data-url="ANSPRESS_ASK_PAGE_URL" data-title="<?php 
        _e('Ask', 'ap');
        ?>
"> <?php 
        _e('Ask', 'ap');
        ?>
					</label>
				</li>				
				<li>
					<label class="menu-item-title">
						<input type="radio" value="" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-url]" class="menu-item-checkbox" data-url="ANSPRESS_CATEGORIES_PAGE_URL" data-title="<?php 
        _e('Categories', 'ap');
        ?>
"> <?php 
        _e('Categories', 'ap');
        ?>
					</label>
				</li>
				<li>
					<label class="menu-item-title">
						<input type="radio" value="" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-url]" class="menu-item-checkbox" data-url="ANSPRESS_TAGS_PAGE_URL" data-title="<?php 
        _e('Tags', 'ap');
        ?>
"> <?php 
        _e('Tags', 'ap');
        ?>
						
					</label>
				</li>
				<li>
					<label class="menu-item-title">
						<input type="radio" value="" name="menu-item[<?php 
        echo $_nav_menu_placeholder;
        ?>
][menu-item-url]" class="menu-item-checkbox" data-url="ANSPRESS_USERS_PAGE_URL" data-title="<?php 
        _e('Users', 'ap');
        ?>
"> <?php 
        _e('Users', 'ap');
        ?>
					</label>
				</li>
			</ul>

			<p class="button-controls">
				<span class="add-to-menu">
					<input type="submit"<?php 
        wp_nav_menu_disabled_check($nav_menu_selected_id);
        ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
        esc_attr_e('Add to Menu');
        ?>
" name="add-custom-menu-item" id="submit-aplinks" />
					<span class="spinner"></span>
				</span>
			</p>

		</div><!-- /.customlinkdiv -->
		<?php 
    }
开发者ID:coollog,项目名称:theboola,代码行数:96,代码来源:anspress-admin.php


示例11: search_meta_box_render

        function search_meta_box_render()
        {
            global $_nav_menu_placeholder, $nav_menu_selected_id;
            $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
            ?>
		<div class="customlinkdiv" id="searchboxitemdiv">
			<div class="tabs-panel-active">
				<ul class="categorychecklist">
					<li>
						<input type="hidden" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-type]" value="search">
						<input type="hidden" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-type_label]" value="<?php 
            echo _x('Search Box', 'type-label', 'bop-nav-search-box-item');
            ?>
">
						
						<input type="hidden" class="menu-item-title" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-title]" value="<?php 
            echo _x('Search', 'default-title', 'bop-nav-search-box-item');
            ?>
">
						<input type="hidden" class="menu-item-url" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-url]" value="<?php 
            echo esc_attr(get_search_link());
            ?>
">
						<input type="hidden" class="menu-item-classes" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-classes]" value="bop-nav-search">
						
						<input type="checkbox" class="menu-item-object-id" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-object-id]" value="<?php 
            echo $_nav_menu_placeholder;
            ?>
" checked="true">
					</li>
				</ul>
			</div>

			<p class="button-controls">
				<span class="add-to-menu">
					<input type="submit"<?php 
            wp_nav_menu_disabled_check($nav_menu_selected_id);
            ?>
 class="button-secondary right" value="<?php 
            echo esc_attr_x('Add to menu', 'meta-box-submit', 'bop-nav-search-box-item');
            ?>
" name="add-search-menu-item" id="submit-searchboxitemdiv">
					<span class="spinner"></span>
				</span>
			</p>
		</div>
		<script type="text/javascript">
			(function($){
				$(window).on('load', function(){
					$('#submit-searchboxitemdiv').on('click', function(e){
						e.preventDefault();
						$('#searchboxitemdiv').addSelectedToMenu();
					});
				});
			})(jQuery);
		</script>
		<?php 
        }
开发者ID:beccarefford,项目名称:techgirlz-redesign,代码行数:76,代码来源:plugin.php


示例12: kleo_admin_do_wp_nav_menu_meta_box

/**
 * Build and populate the BuddyPress accordion on Appearance > Menus.
 *
 * @since Kleo 1.5.1
 *
 * @global $nav_menu_selected_id
 */
function kleo_admin_do_wp_nav_menu_meta_box()
{
    global $nav_menu_selected_id;
    $walker = new Kleo_Walker_Nav_Menu_Checklist(false);
    $args = array('walker' => $walker);
    $post_type_name = 'kleo';
    $tabs = array();
    $menu_items = array();
    $menu_items[] = array('name' => __('Login', 'kleo_framework'), 'slug' => 'login', 'link' => '#');
    $menu_items[] = array('name' => __('Logout', 'kleo_framework'), 'slug' => 'logout', 'link' => "#");
    $menu_items[] = array('name' => __('Register', 'kleo_framework'), 'slug' => 'register', 'link' => "#");
    $menu_items = apply_filters('kleo_nav_menu_items', $menu_items);
    $page_args = array();
    if (!empty($menu_items)) {
        foreach ($menu_items as $item) {
            $item_name = '';
            // Remove <span>number</span>
            $item_name = preg_replace('/([.0-9]+)/', '', $item['name']);
            $item_name = trim(strip_tags($item_name));
            $page_args[$item['slug']] = (object) array('ID' => -1, 'post_title' => $item_name, 'post_author' => 0, 'post_date' => 0, 'post_excerpt' => $item['slug'], 'post_type' => 'page', 'post_status' => 'publish', 'comment_status' => 'closed', 'guid' => $item['link']);
        }
    } else {
        _e('No items available here for the moment', 'kleo_framework');
        return;
    }
    $tabs['pages'] = $page_args;
    ?>

	<div id="kleo-menu" class="posttypediv">
		<p><?php 
    _e('Some links are relative to the current user, and are not visible to visitors who are not logged in.', 'kleo_framework');
    ?>
</p>

		<div id="tabs-panel-posttype-<?php 
    echo $post_type_name;
    ?>
-loggedin" class="tabs-panel tabs-panel-active">
			<ul id="kleo-menu-checklist-loggedin" class="categorychecklist form-no-clear">
				<?php 
    echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $tabs['pages']), 0, (object) $args);
    ?>
			</ul>
		</div>
        <p>With BuddyPress/bbPress installed you can add a link to your profile with ##profile_link## in the URL input from <strong>Links</strong> section bellow. Example: ##profile_link##/messages</p>
		<p>You can also include the members username next to the My Account avatar with ##member_name## in the Title Attribute field.</p>

		<p class="button-controls">
			<span class="add-to-menu">
				<input type="submit"<?php 
    if (function_exists('wp_nav_menu_disabled_check')) {
        wp_nav_menu_disabled_check($nav_menu_selected_id);
    }
    ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
    esc_attr_e('Add to Menu', 'kleo_framework');
    ?>
" name="add-custom-menu-item" id="submit-kleo-menu" />
				<span class="spinner"></span>
			</span>
		</p>
	</div><!-- /#kleo-menu -->

	<?php 
}
开发者ID:quyip8818,项目名称:wps,代码行数:72,代码来源:menu-items.php


示例13: meta_box

        /**
         * Display our custom meta box
         * @global int $_nav_menu_placeholder   A placeholder index for the menu item
         * @global int|string $nav_menu_selected_id    (id, name or slug) of the currently-selected menu
         */
        public function meta_box()
        {
            global $_nav_menu_placeholder, $nav_menu_selected_id;
            $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
            $last_object_id = get_option('gs_sim_last_object_id', 0);
            $object_id = $this->new_object_id($last_object_id);
            ?>
            <div class="gs-sim-div" id="gs-sim-div">
                <input type="hidden" class="menu-item-db-id" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-db-id]" value="0" />
                <input type="hidden" class="menu-item-object-id" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-object-id]" value="<?php 
            echo $object_id;
            ?>
" />
                <input type="hidden" class="menu-item-object" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-object]" value="gs_sim" />
                <input type="hidden" class="menu-item-type" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-type]" value="gs_sim" />
                <input type="hidden" id="gs-sim-description-nonce" value="<?php 
            echo wp_create_nonce('gs-sim-description-nonce');
            ?>
" />
                <p id="menu-item-title-wrap">
                    <label for="gs-sim-title"><?php 
            _e('Title');
            ?>
</label>
                    <input id="gs-sim-title" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-title]" type="text" class="regular-text menu-item-textbox" title="<?php 
            esc_attr_e('Title');
            ?>
" style="width:100%" />    
                </p>

                <p id="menu-item-html-wrap">
                    <textarea style="width:100%;" rows="9" id="gs-sim-html" name="menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][menu-item-description]" class="code menu-item-textbox" title="<?php 
            esc_attr_e('Text/html/shortcode here!');
            ?>
"></textarea>
                </p>

                <p class="button-controls">
                    <span class="add-to-menu">
                        <input type="submit"<?php 
            wp_nav_menu_disabled_check($nav_menu_selected_id);
            ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
            esc_attr_e('Add to Menu');
            ?>
" name="add-gs-sim-menu-item" id="submit-gs-sim" />
                        <span class="spinner"></span>
                    </span>
                </p>

            </div>
            <?php 
        }
开发者ID:patilswapnilv,项目名称:Shortcode-in-Menus,代码行数:76,代码来源:index.php


示例14: vpt_render_menu_metabox

        function vpt_render_menu_metabox($object, $args)
        {
            global $_nav_menu_placeholder, $nav_menu_selected_id;
            $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
            ?>
			<div class="customlinkdivVpt" id="customlinkdivVpt">
				<input type="hidden" value="custom" name="vpt-menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][vpt-menu-item-type]" />
					
				<input id="custom-vpt-menu-item-url" name="vpt-menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][vpt-menu-item-url]" type="hidden" value="*" />
				<input id="custom-vpt-menu-item-custom-type" name="vpt-menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][vpt-menu-item-custom-type]" type="hidden" />	

				<p id="menu-item-name-wrap">
					<label class="howto" for="custom-vpt-menu-item-titles">
						<span><?php 
            _e('Titles');
            ?>
</span>
						
						<textarea rows="8" id="custom-vpt-menu-item-titles" name="vpt-menu-item[<?php 
            echo $_nav_menu_placeholder;
            ?>
][vpt-menu-item-titles]" class="regular-text vpt-menu-item-textbox input-with-default-title" title="<?php 
            esc_attr_e('Titles');
            ?>
" style = "margin-left:40px;width:180px;">
						</textarea>
						<span>* separate Titles using a new line.</span>
					</label>
				</p>

				<p class="button-controls">
					<span class="add-to-menu">
						<input type="submit"<?php 
            wp_nav_menu_disabled_check($nav_menu_selected_id);
            ?>
 class="button-secondary submit-add-to-menu right" value="<?php 
            esc_attr_e('Add to Menu');
            ?>
" name="add-custom-vpt-menu-item" id="submit-customlinkdivVpt" />
						<span class="spinner"></span>
					</span>
				</p>

			</div><!-- /.customlinkdivVpt -->
			<?php 
        }
开发者ID:aileenpiagola,项目名称:virtual-pages-with-templates,代码行数:55,代码来源:virtualpages-with-templates.php


示例15: wp_nav_menu_item_taxonomy_meta_box


//.........这里部分代码省略.........

		<div class="tabs-panel <?php 
    echo 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive';
    ?>
" id="tabs-panel-search-taxonomy-<?php 
    echo $taxonomy_name;
    ?>
">
			<?php 
    if (isset($_REQUEST['quick-search-taxonomy-' . $taxonomy_name])) {
        $searched = esc_attr($_REQUEST['quick-search-taxonomy-' . $taxonomy_name]);
        $search_results = get_terms($taxonomy_name, array('name__like' => $searched, 'fields' => 'all', 'orderby' => 'count', 'order' => 'DESC', 'hierarchical' => false));
    } else {
        $searched = '';
        $search_results = array();
    }
    ?>
			<p class="quick-search-wrap">
				<input type="search" class="quick-search input-with-default-title" title="<?php 
    esc_attr_e('Search');
    ?>
" value="<?php 
    echo $searched;
    ?>
" name="quick-search-taxonomy-<?php 
    echo $taxonomy_name;
    ?>
" />
				<span class="spinner"></span>
				<?php 
    submit_button(__('Search'), 'button-small quick-search-submit button-secondary hide-if-js', 'submit', false, array('id' => 'submit-quick-search-taxonomy-' . $taxonomy_name));
    ?>
			</p>

			<ul id="<?php 
    echo $taxonomy_name;
    ?>
-search-checklist" data-wp-lists="list:<?php 
    echo $taxonomy_name;
    ?>
" class="categorychecklist form-no-clear">
			<?php 
    if (!empty($search_results) && !is_wp_error($search_results)) {
        ?>
				<?php 
        $args['walker'] = $walker;
        echo walk_nav_menu_tree(array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args);
        ?>
			<?php 
    } elseif (is_wp_error($search_results)) {
        ?>
				<li><?php 
        echo $search_results->get_error_message();
        ?>
</li>
			<?php 
    } elseif (!empty($searched)) {
        ?>
				<li><?php 
        _e('No results found.');
        ?>
</li>
			<?php 
    }
    ?>
			</ul>
		</div><!-- /.tabs-panel -->

		<p class="button-controls">
			<span class="list-controls">
				<a href="<?php 
    echo esc_url(add_query_arg(array($taxonomy_name . '-tab' => 'all', 'selectall' => 1), remove_query_arg($removed_args)));
    ?>
#taxonomy-<?php  

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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