routes:WordPress的简单路由

时间:2021-05-24 13:13:17
【文件属性】:
文件名称:routes:WordPress的简单路由
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-24 13:13:17
PHP 路线 WordPress的简单路由。 设计用于 基本用法 /* functions.php */ Routes :: map ( 'myfoo/bar' , 'my_callback_function' ); Routes :: map ( 'my-events/:event' , function ( $ params ) { $ event_slug = $ params [ 'event' ]; $ event = new ECP_Event ( $ event_slug ); $ query = new WPQuery (); //if you want to send a custom query to the page's main loop Routes :: load ( 'single.php' , array ( 'event' =>
【文件预览】:
routes-master
----.gitignore(175B)
----bin()
--------install-wp-tests.sh(3KB)
----.travis.yml(599B)
----composer.json(1020B)
----README.md(4KB)
----phpunit.xml(448B)
----.coveralls.yml(74B)
----tests()
--------single.php(5B)
--------test-routes.php(6KB)
--------bootstrap.php(365B)
----Routes.php(5KB)
----readme.txt(1KB)

网友评论