承接 flexpress/component-menu 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

flexpress/component-menu

Composer 安装命令:

composer require flexpress/component-menu

包简介

Menus for WordPress

README 文档

README

Install via Pimple

$pimple["menu"] = function() {
  return new PostTypeMenu();
};

Usage

$defaults = array(

  'starting_level' => 1,
  'post_type' => 'page',
  'post_id' => $GLOBALS['post']->ID,
  'sudo_items' => array(),
  'force_current' => null,
  "recurse" => true

);

$pimple["menu"]->output($defaults);

Options

starting_level

This is what level the meny should start displaying on, for example if you have Careers > Vacancies > Vacancy listings and you set the level as 1(default) then it would display Vacancies and skip the Careers level.

post_type

This option allows you to specify what post type you want to use, defaults to page

post_id

This option lets you change the post_id that is used to get the ancestors and is also used to set the current page in the menu.

sudo_items

This option allows you to create sudo menu items, an example config would look like this:

$args['sudo_items'] = array(
  
  123 => array(
    "id" => -1,
    "title" => "Some random link",
    "link" => "/some/random/link",
  )

);

This would add a page with the title Some random link, which links to /some/random/link under the item in the menu that has the id 123.

force_current

You can use this option to speficy what the current link is, this is a post_id

recurse

You can turn off recurse to make the menu not recurse and just output the current level.

统计信息

  • 总下载量: 85
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-08-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固