Changeset 621307
- Timestamp:
- 11/05/2012 04:14:24 PM (13 years ago)
- Location:
- oop-plugin-template-solution/trunk
- Files:
-
- 2 edited
-
oop-plugin-template-solution.php (modified) (2 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
oop-plugin-template-solution/trunk/oop-plugin-template-solution.php
r621289 r621307 4 4 * Plugin Name: Object Oriented Plugin Template Solution 5 5 * 6 * Description: A well engineered template for creating newplugins using6 * Description: A well engineered template for creating plugins using 7 7 * object-oriented programming practices. 8 8 * 9 9 * Plugin URI: http://wordpress.org/extend/plugins/oop-plugin-template-solution/ 10 * Version: 1.0. 010 * Version: 1.0.1 11 11 * (Remember to change the VERSION constant, below, as well!) 12 12 * Author: Daniel Convissor … … 50 50 * This plugin's version 51 51 */ 52 const VERSION = '1.0. 0';52 const VERSION = '1.0.1'; 53 53 54 54 /** -
oop-plugin-template-solution/trunk/readme.txt
r621289 r621307 12 12 == Description == 13 13 14 This gives authors of new plugins a leg up on creating a great, easy to14 Gives authors of new plugins a leg up on creating a great, easy to 15 15 maintain plugin by providing a carefully designed plugin skeleton to build on. 16 16 Authors of existing plugins can extract individual components and concepts 17 and transplant them into theirprojects.17 for transplantation into their own projects. 18 18 19 19 * Clean, object-oriented design … … 54 54 of "My Plugin" in the settings section with the name of your plugin. 55 55 56 # Settings ...56 # Settings ----- 57 57 # Plugin identifier / directory (hyphen separated). 58 58 old_id=oop-plugin-template-solution … … 66 66 old_name="Object Oriented Plugin Template Solution" 67 67 new_name="My Plugin" 68 # -------------- 68 69 69 70 70 # Now do the replacements...71 # Copy and rename the files. 71 72 cp -R $old_id $new_id 72 73 cd $new_id 73 74 mv $old_id.php $new_id.php 75 76 # Replace strings in the files. 74 77 find . -type f -exec sed "s/$old_id/$new_id/g" -i {} \; 75 78 find . -type f -exec sed "s/$old_class/$new_class/g" -i {} \; … … 133 136 classes: 134 137 135 * The only file each test script needs obtain is done by a `require_once` 136 call for `TestCase.php`. That obtains the PHPUnit and other items needed. 138 * Have a `require_once` call for `TestCase.php` at the top of the script. 139 That obtains the PHPUnit and other items needed. It's the only file you 140 need to include. 137 141 * Classes must extend `TestCase` 138 142 * If you add a `setUpBeforeClass()` method, it must 139 143 call `parent::setUpBeforeClass()` 140 144 * If you add a `setUp()` method, it must call `parent::setUp()` 145 * If you add a `tearDown()` method, it must call `parent::tearDown()` 146 * If you add a `tearDownAfterClass()` method, it must 147 call `parent::tearDownAfterClass()` 141 148 142 149 Take a look at the `TestLogin.php` script for examples of how to handle … … 179 186 == Changelog == 180 187 188 = 1.0.1 (2012-11-05) = 189 * Clarify instructions and descriptions. 190 181 191 = 1.0.0 (2012-11-05) = 182 192 * Initial release.
Note: See TracChangeset
for help on using the changeset viewer.