WordPress框架:Codestar Framework

Codestar Framework

A Simple and Lightweight WordPress Option Framework for Themes and Plugins.

  • 源代码地址:

[国外]github https://github.com/Codestar/codestar-framework

[国内]gitee https://gitee.com/doswhy/codestar-framework

快速使用方法:

以模板开发codestarframework自带的demo为例

1.在 /wp-content/themes/theme-name/ 创建 inc 文件夹

2.下载Codestar Framework并解压到 /wp-content/themes/theme-name/inc/

3. /wp-content/themes/theme-name/ functions.php 添加

  • require_once get_stylesheet_directory() . ‘/inc/codestar-framework/codestar-framework.php’;

4. /wp-content/themes/theme-name/inc/codestar-framework/codestar-framework.php 在最后一行添加

  • require_once plugin_dir_path( __FILE__ ) .’samples/options.samples.php’;

5.然后就可可以在菜单栏看见CFS Demo 了

WordPress框架:Codestar Framework插图

标签