Linux 软件免费装
Banner图

NS WordPress Plugin Template

开发者 neversettle
更新时间 2018年9月17日 18:16
捐献地址: 去捐款
PHP版本: 3.5 及以上
WordPress版本: 4.9.8
版权: GPLv2 or later
版权网址: 版权信息

标签

plugin template reusable plugin template example model

下载

1.0.0 1.0.1

详情介绍:

This plugin is designed to be used as starting point for a new plugin. It will save you the time of putting in place a file structure, adding common files, creating a basic plugin class, wiring common hooks that you might need, adding an admin menu item, and more. It uses many common, standard WordPress techniques for frequently needed basic plugin features. It is well commented with TODO items to know where to customize it for your own needs. How to Use this Plugin Template
  1. Copy the entire folder to a new location and folder that you rename for your new plugin.
  2. Rename any of the files in the structure that you want to "re-brand" for your plugin and make sure any code references pointing to those files are also updated.
  3. Go through the code and follow the well-commented TODO items, renaming the class and variables and functions to suit your needs.
  4. Add your own core functionality / graphics / etc.
  5. If you have a lot of common things that you do from plugin to plugin, add those to your main "template" version and they will be available every time you copy it to a new plugin.
Important Notes Enjoy! Features Example techniques included in this Plugin Template
  1. General file structure
  2. Lots of comments and TODO items to help you know what to change
  3. Using a class approach to building a plugin
  4. Minimal variable updates by re-using class level variables for things like the plugin name and slug
  5. Using common WordPress hooks and filters
  6. Creating an admin menu item under the Settings menu
  7. Implementing the WordPress Settings API
  8. Very basic responsive settings page including a banner
  9. Creating a Sidebar that has its own widget system and can pull data from a feed on your WordPress site (this is more of an advanced feature that we use on our own plugins and it requires additional know-how to tweak for your needs). It can also be removed completely if you don't need / want it.

安装:

  1. Log in to your WordPress site as an administrator
  2. Use the built-in Plugins tools to install from the repository or unzip and Upload the plugin directory to /wp-content/plugins/
  3. Activate the plugin through the 'Plugins' menu in WordPress
  4. The current output of the plugin teamplate can be seen by going to Settings > NS Plugin Template

常见问题:

Is this plugin template supported?

We'll try to answer any questions that come up in the support forum here on WP.org, but this plugin is really designed to save time for developers who are already familiar with building WordPress plugins. However, it can also be a great place to start if you've never created a plugin before, and there a ton of resources out there to help you along your way.

更新日志:

1.0.1 1.0.0