WordPress开发框架整理

WordPress听过的时间很久,但我是才接触一年左右,在这个过程中,我发现了一些非常好用的开发框架,在这里整理下,分享给大家,排名不分先后,只是我发现他们的一个时间顺序。之后,如果我又发现了其他优秀开发框架,会继续更新。

一、Codestar Framework

官网:https://codestarframework.com/

用途:

图片[1]-WordPress开发框架整理 - KEKC博客-KEKC博客

可用字段:

图片[2]-WordPress开发框架整理 - KEKC博客-KEKC博客

很多国内主题也采用这个框架来开发,比如子比主题。免费版可以添加后台管理设置,高级版可以做的东西很多,收费版下载地址及介绍:https://www.hmmoo.com/wordpress/wordpressplugins/103.html

二、Advanced Custom Fields

这是wordpress里一个强大的自定义字段插件,简称ACF,可以自定义文章、分类、用户等字段,其字段也是多种多样,文字、图片、颜色选择等等都支持,用顺溜了,是一个不错的仿站插件,能节省你很多时间。但后面我发现,他还能用来做后台设置。

官网:https://www.advancedcustomfields.com/

图片[3]-WordPress开发框架整理 - KEKC博客-KEKC博客

专业版相比于免费版来说支持更多的字段类型,专业版下载地址:https://www.hmmoo.com/wordpress/wordpressplugins/99.html

三、Options Framework

国外很流行,是国外一个博客站长所写的框架,基本实现了Codestar Framework的免费功能,但框架更加轻量,因此也有人用它做主题、插件的设置页面,比如闪电博开发就喜欢用这个。

但是有个缺点,这个博主好像不更新了,最新版也是停留在了2014年,版本停留在了1.9。

官网:https://wptheming.com/2014/11/options-framework-theme-v1-9-0/

插件版下载:https://github.com/devinsays/options-framework-plugin

主题版下载:https://github.com/devinsays/options-framework-theme

四、Customizer Library

这也是写Options Framework框架的博主写的,用于主题的自定义设置,如果你要用代码实现,可以看看我这篇文章:

这个开发框架下载地址:https://github.com/devinsays/customizer-library

五、Custom Post Type UI

官方描述:用于为 WordPress 创建自定义帖子类型和自定义分类的管理 UI

这是一个自定义文章类型的一个插件,使用太过于简单,只需要点点点就能新建自己的自定义的文章类型和分类法,都不需要代码,当然,你也可以用代码来创建(在GITHUB)。

插件地址:https://wordpress.org/plugins/custom-post-type-ui/

GITHUB地址:https://github.com/WebDevStudios/custom-post-type-ui

六、pods

这个和上面第二个acf一样,用于自定义字段的,同样很强大,国内也有人在用,比如新宿UI开发的uniapp,其中有的设置就是通过pods实现的。

插件地址:https://wordpress.org/plugins/pods/

GITHUB:https://github.com/pods-framework/pods

七、Admin Options Pages

名如其用途,可以添加后台设置页。添加无需代码。

图片[4]-WordPress开发框架整理 - KEKC博客-KEKC博客
图片[5]-WordPress开发框架整理 - KEKC博客-KEKC博客

八、TGM Plugin Activation

一个PHP库,可让您轻松要求或推荐WordPress主题(和插件)的插件。它允许您的用户使用本机WordPress类,函数和界面以单一或批量方式安装,更新甚至自动激活插件。您可以引用捆绑的插件,WordPress插件存储库中的插件,甚至是互联网上其他地方托管的插件。

插件地址:https://github.com/TGMPA/TGM-Plugin-Activation

使用示例:

<?php
add_action( 'tgmpa_register', 'ex_themes_regs_plugins_' );
function ex_themes_regs_plugins_() {
    $plugins = array(
        // This is an include a plugin bundled with a theme.

        array(
            'name'                   => 'Filester – File Manager Pro',
            'slug'                   => 'filester',
            'required'  	    	 => false,
        ), 
        array(
            'name'                   => 'Delete Duplicate Posts',
            'slug'                   => 'delete-duplicate-posts',
            'required'  	    	 => false,
        ),
        /* 
        array(
            'name'                   => 'One Click Demo Import',
            'slug'                   => 'one-click-demo-import',
            'required'  	    	 => true,
        ),
         */
        array(
            'name'                   => 'WP Speed of Light',
            'slug'                   => 'wp-speed-of-light',
            'required'  	    	 => false,
        ),
		 
        array(
            'name'                   => 'WP Report Post',
            'slug'                   => 'wp-report-post',
            'required'  	    	 => true,
        ),
		 
        array(
            'name'                   => 'KK Star Ratings',
            'slug'                   => 'kk-star-ratings',
            'required'  	    	 => true,
        ), 
		array(
			'name'                   => 'Term Management Tools',
			'slug'                   => 'term-management-tools',
			'required'  	    	 => true,
		),
		 
        array(
            'name'               => 'AccessPress Social Login', // The plugin name.
            'slug'               => 'accesspress-social-login', // The plugin slug (typically the folder name).
            //'source' 			 => get_stylesheet_directory() . '/libs/plugin/accesspress-social-login.zip', // The plugin source
            'source'             => 'https://www.dropbox.com/s/spmlx3nl23c39hj/accesspress-social-login.zip?dl=1', // The plugin source.
            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
        ),
		 
        array(
            'name'               => 'Fix My Feed RSS Repair', // The plugin name.
            'slug'               => 'fix-rss', // The plugin slug (typically the folder name).
            //'source' 			 => get_stylesheet_directory() . '/libs/plugin/fix-rss.zip', // The plugin source
            'source'             => 'https://www.dropbox.com/s/desv6uuc9au4ex4/fix-rss.zip?dl=1', // The plugin source.
            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
        ),
        array(
            'name'               => 'WP Speed of Light Addon', // The plugin name.
            'slug'               => 'wp-speed-of-light-addon', // The plugin slug (typically the folder name).
            //'source' 			 => get_stylesheet_directory() . '/libs/plugin/fix-rss.zip', // The plugin source
            'source'             => 'https://www.dropbox.com/s/rhp7ee28ew11576/wp-speed-of-light-addon.zip?dl=1', // The plugin source.
            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
        ),
        /* 
		array(
            'name'               => '5play Autopost', // The plugin name.
            'slug'               => 'exthemes-autopost', // The plugin slug (typically the folder name).
            'source' 			 => get_stylesheet_directory() . '/libs/plugin/exthemes-autopost.zip', // The plugin source
            //'source'             => 'https://ex-themes.com/files/fix-rss.zip', // The plugin source.
            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
        ),
        
		array(
            'name'               => '5play Core', // The plugin name.
            'slug'               => 'exthemes-core', // The plugin slug (typically the folder name).
            'source' 			 => get_stylesheet_directory() . '/libs/plugin/exthemes-core.zip', // The plugin source
            //'source'             => 'https://ex-themes.com/files/fix-rss.zip', // The plugin source.
            'required'           => false, // If false, the plugin is only 'recommended' instead of required.
        ),
         */
    );
    $config = array(
        'id'           => 'ex_themes',             // Unique ID for hashing notices for multiple instances of TGMPA.
        'default_path' => '',                      // Default absolute path to bundled plugins.
        'menu'         => 'tgmpa-install-plugins', // Menu slug.
        'has_notices'  => true,                    // Show admin notices or not.
        'dismissable'  => true,                    // If false, a user cannot dismiss the nag message.
        'dismiss_msg'  => '',                      // If 'dismissable' is false, this message will be output at top of nag.
        'is_automatic' => true,                    // Automatically activate plugins after installation or not.
        'message'      => '',                      // Message to output right before the plugins table.
    );
    tgmpa( $plugins, $config );
}

九、Redux Framework

超级强大,一直在维护,我都有点后悔这么晚发现它了。官网介绍:是一个简单,真正可扩展的选项框架,适用于WordPress主题和插件!

我觉得和Codestar Framework有得一拼。

插件GITHUB:https://github.com/reduxframework/redux-framework

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容