Skip to content

Commit

Permalink
Tweaks to the 2.0.0 readme. Fixes #27.
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones committed Oct 3, 2011
1 parent 187c717 commit ad5a3db
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions README
@@ -1,38 +1,49 @@
=== TGM Plugin Activation ===
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (@GaryJones)
Version: 2.0.0
Requires at least: 3.0
Tested up to: 3.2.1
Contributors: Thomas Griffin (@jthomasgriffin / thomasgriffinmedia.com)
Gary Jones (Github: @GaryJones / Twitter: GaryJ)
Version: 2.0.0
Requires at least: 3.0.0
Tested up to: 3.2.1

== Description ==

This class will revolutionize how plugins can be handled for WordPress themes. By using classes that are utilized within WordPress, the TGM_Plugin_Activation class can automatically install and activate multiple plugins that are either pre-packaged with a theme or downloaded from the WordPress Plugin Repository.
This class will revolutionize how plugins can be handled for WordPress themes. By using classes that are
utilized within WordPress, the TGM_Plugin_Activation class can automatically install and activate multiple
plugins that are either packaged with a theme or downloaded from the WordPress Plugin Repository.

This class uses the WP_Filesystem Abstraction class to find the best way to install the plugin. WP_Filesystem searches through a number of methods (Direct, FTP, FTP Sockets, SSH) and determines the best one for use based on the user's server setup. If FTP is needed, a form will be displayed to prompt users to input their FTP credentials. To do the installing, this class uses the Plugin_Upgrader and Plugin_Skin_Installer classes to download, install and activate the plugins. This class also uses WP_Error to display any errors to users during the plugin installation and activation process.
This class uses the WP_Filesystem Abstraction class to find the best way to install the plugin. WP_Filesystem
searches through a number of methods (Direct, FTP, FTP Sockets, SSH) and determines the best one for use based
on the user's server setup. If FTP is needed, a form will be displayed to prompt users to input their FTP
credentials. To do the installing, this class uses the Plugin_Upgrader and Plugin_Skin_Installer classes to
download, install and activate the plugins. This class also uses WP_Error to display any errors to users
during the plugin installation and activation process.

== Installation ==

=== UPDATE ===

As as v2.0.0, the TGM_Plugin_Activation class now has an API for theme developers to hook into the class. Make sure you look at the example.php file and review the installation instructions below.
1. Drop the class file somewhere in your theme hierarchy.
2. Add a require_once call within functions.php (or other theme file) referencing the class file.
3. Create a function, hooked to `tgmpa_init`, that registers the plugin and configurations.

The example.php file is a model for how you should include the class in your theme. Some important things to note:
For steps 2 and 3, it is recommended your view, copy and paste the contents of example.com
and amend to suit. The example.php file is a model for how you should include the class in your theme.

1. With the require_once call, make sure to amend the path to the correct location within your theme.
2. For plugins pre-packaged with the theme, the 'source' argument for the plugin array is required and should reflect the directory path to your pre-packaged plugin.
3. The $config variable holds an array of arguments that can be used to customized most everything within the class.
- If you define a default absolute path for pre-packaged plugins, you do not need to specify the directory path for your pre-packaged plugin within the 'source' argument. You will only need to specify the zip file.
Some important things to note:

Other than this, everything should be smooth sailing from here.
1. With the `require_once` call, make sure to amend the path to the correct location within your theme.
2. For plugins pulled from the .org repo, the source argument is optional. Otherwise it is required and should point
to the absolute path for the plugin zips within your theme, or to a URL for zips elsewhere online.
3. The $config variable holds an array of arguments that can be used to customize aspects of the class.
If you define an absolute default path for packaged plugins, you do not need to specify the directory path
for your pre-packaged plugin within the 'source' argument. You will only need to specify the zip file name.

== TODO ==

There are lots of things to do with this class (and tons of potential). Here is a short list:
Here is a short list of desired large improvements:

* Consolidate nag messages into one message split into two categories (plugins not installed and plugins installed but not activated)
* Add a bulk installer button at the top of the install plugins page to allow users to install all included/repo plugins at once
* Security and best practices audit

See https://github.com/thomasgriffin/TGM-Plugin-Activation/issues for current issues, and for reporting bugs and enhancements

== Changelog ==

Expand All @@ -41,20 +52,19 @@ There are lots of things to do with this class (and tons of potential). Here is
* Re-written structure to include an API for theme developers so no code inside the class needs to be touched
* Introduction of new properties: $default_path and $strings
* Ability to filter all message strings that are outputted by the class
* tgmpa_register() hook for API
* Removed unnecessary is_wp_error() check
* Now uses Settings API to output admin notices
* Internal CSS for optimization
* Internal style sheet for optimization
* Three new methods: register, config and actions
* New API function: tgmpa()
* Renamed API function: tgmpa()
* Updated example.php file with example setup for theme authors
* Ability to define custom text domain for localization

= 1.1.0 =

* Added support for multiple plugins of each instance (pre-packaged and repo)
* Removed unnecessary conditional check before class is defined
* Added new property $domain to hold textdomain for localization
* Added new property $domain to hold textdomain for internationalization
* Changed property $args to accept arrays of arguments for each plugin needed
* Added CSS for slight UI enhancements
* Added extra conditional checks current_user_can( 'install_plugins' ) and current_user_can( 'activate_plugins' ) for security
Expand Down

0 comments on commit ad5a3db

Please sign in to comment.