1
0
Fork 0
mirror of https://github.com/inretio/WordPress-Plugin-Boilerplate synced 2024-05-13 08:42:09 +03:00

Finalizing code for beta

* Updating DocBlocks
* Fixing typos
* Adjusting whitespace
This commit is contained in:
Tom McFarlin 2014-08-18 17:00:09 -04:00
parent 6782bb5ec3
commit 4d6a0dfa3e
7 changed files with 27 additions and 28 deletions

View file

@ -5,7 +5,7 @@
* All of the code for your Dashboard-specific JavaScript source * All of the code for your Dashboard-specific JavaScript source
* should reside in this file. * should reside in this file.
* *
* Note that this assume you're going to user jQuery, so it prepares * Note that this assume you're going to use jQuery, so it prepares
* the $ function reference to be used within the scope of this * the $ function reference to be used within the scope of this
* function. * function.
* *
@ -16,7 +16,7 @@
* *
* }); * });
* *
* Or when the window is completely ready: * Or when the window is loaded:
* *
* $( window ).load(function() { * $( window ).load(function() {
* *
@ -24,7 +24,7 @@
* *
* ...and so on. * ...and so on.
* *
* Remember that ideally, we should not attach anymore than a single DOM-ready or window-load handler * Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler
* for any particular page. Though other scripts in WordPress core, other plugins, and other themes may * for any particular page. Though other scripts in WordPress core, other plugins, and other themes may
* be doing this, we should try to minimize doing that in our own work. * be doing this, we should try to minimize doing that in our own work.
*/ */

View file

@ -1,9 +1,7 @@
<?php <?php
/** /**
* Short Description (no period) * Fired during plugin activation
*
* Long Description.
* *
* @link http://example.com * @link http://example.com
* @since 1.0.0 * @since 1.0.0
@ -13,9 +11,9 @@
*/ */
/** /**
* Short Description. (use period) * Fired during plugin activation.
* *
* Long Description. * This class defines all code necessary to run during the plugin's activation.
* *
* @since 1.0.0 * @since 1.0.0
* @package Plugin_Name * @package Plugin_Name

View file

@ -1,9 +1,7 @@
<?php <?php
/** /**
* Short Description (no period) * Fired during plugin deactivation
*
* Long Description.
* *
* @link http://example.com * @link http://example.com
* @since 1.0.0 * @since 1.0.0
@ -13,9 +11,9 @@
*/ */
/** /**
* Short Description. (use period) * Fired during plugin deactivation.
* *
* Long Description. * This class defines all code necessary to run during the plugin's deactivation.
* *
* @since 1.0.0 * @since 1.0.0
* @package Plugin_Name * @package Plugin_Name

View file

@ -1,7 +1,7 @@
<?php <?php
/** /**
* Define the internationalization functionality. * Define the internationalization functionality
* *
* Loads and defines the internationalization files for this plugin * Loads and defines the internationalization files for this plugin
* so that its ready for translation. * so that its ready for translation.
@ -27,11 +27,11 @@
class Plugin_Name_i18n { class Plugin_Name_i18n {
/** /**
* Short Description. (use period) * The domain specified for this plugin.
* *
* @since 1.0.0 * @since 1.0.0
* @access private * @access private
* @var type $domain Description. * @var string $domain The domain identifier for this plugin.
*/ */
private $domain; private $domain;

View file

@ -14,7 +14,7 @@
*/ */
/** /**
* The core plugin class * The core plugin class.
* *
* This is used to define internationalization, dashboard-specific hooks, and * This is used to define internationalization, dashboard-specific hooks, and
* public-facing site hooks. * public-facing site hooks.
@ -35,7 +35,7 @@ class Plugin_Name {
* *
* @since 1.0.0 * @since 1.0.0
* @access protected * @access protected
* @var type Plugin_Name_Loader Maintains and registers all hooks for the plugin. * @var Plugin_Name_Loader $loader Maintains and registers all hooks for the plugin.
*/ */
protected $loader; protected $loader;
@ -174,7 +174,7 @@ class Plugin_Name {
} }
/** /**
* Execute the loader to execute all of the hooks with WordPress. * Run the loader to execute all of the hooks with WordPress.
* *
* @since 1.0.0 * @since 1.0.0
*/ */

View file

@ -5,7 +5,7 @@
* All of the code for your public-facing JavaScript source * All of the code for your public-facing JavaScript source
* should reside in this file. * should reside in this file.
* *
* Note that this assume you're going to user jQuery, so it prepares * Note that this assume you're going to use jQuery, so it prepares
* the $ function reference to be used within the scope of this * the $ function reference to be used within the scope of this
* function. * function.
* *
@ -16,7 +16,7 @@
* *
* }); * });
* *
* Or when the window is completely ready: * Or when the window is loaded:
* *
* $( window ).load(function() { * $( window ).load(function() {
* *
@ -24,7 +24,7 @@
* *
* ...and so on. * ...and so on.
* *
* Remember that ideally, we should not attach anymore than a single DOM-ready or window-load handler * Remember that ideally, we should not attach any more than a single DOM-ready or window-load handler
* for any particular page. Though other scripts in WordPress core, other plugins, and other themes may * for any particular page. Though other scripts in WordPress core, other plugins, and other themes may
* be doing this, we should try to minimize doing that in our own work. * be doing this, we should try to minimize doing that in our own work.
*/ */

View file

@ -6,12 +6,15 @@
* When populating this file, consider the following flow * When populating this file, consider the following flow
* of control: * of control:
* *
* - Here, onActivateNewSite() should break. This method should be static. * - This method should be static
* - Check if the $_REQUEST content actually is the plugin name. * - Check if the $_REQUEST content actually is the plugin name
* - Check if it goes through the authentication (admin referrer checks). * - Run an admin referrer check to make sure it goes through authentication
* - Check the output of $_GET and if it makes sense. * - Verify the output of $_GET makes sense
* - Repeat with other user roles. Best directly by using the links/query string params. * - Repeat with other user roles. Best directly by using the links/query string parameters.
* - Repeat stuff for multisite. Once for a single site in the network, once sitewide. * - Repeat things for multisite. Once for a single site in the network, once sitewide.
*
* This file may be updated more in future version of the Boilerplate; however, this is the
* general skeleton and outline for how the file should work.
* *
* For more information, see the following discussion: * For more information, see the following discussion:
* https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913 * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913