Permalink
Browse files

Various textual changes.

- Update URLs to point to the new repo location
- Fix Thomas' twitter url
- Add some links to the (updated) website
- Changed 'pre-packaged' to 'bundled' in documentation text
- Correct the documentation for the `$plugins` and `$configuration` arrays in `example.php`
- Start discouraging the overloading of the TGMPA strings with the view of providing our own translations in the (near) future.
  • Loading branch information...
1 parent 48ff113 commit b1f4ea55c95bd0a09ae773c4391375c84edf7863 @jrfnl jrfnl committed May 20, 2015
Showing with 25 additions and 26 deletions.
  1. +2 −2 CONTRIBUTING.md
  2. +9 −12 README.md
  3. +3 −3 class-tgm-plugin-activation.php
  4. +11 −9 example.php
View
@@ -65,5 +65,5 @@ There is no need to sign-off or GPG sign your commits. Tags (from 2.4.1 onwards)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/).
* [Read the Issue Guidelines by @necolas](https://github.com/necolas/issue-guidelines/blob/master/CONTRIBUTING.md) for more details,
-[issue ticket]: https://github.com/thomasgriffin/TGM-Plugin-Activation/issues
-[reviewmerge]: https://github.com/thomasgriffin/TGM-Plugin-Activation/labels/reviewmerge
+[issue ticket]: https://github.com/TGMPA/TGM-Plugin-Activation/issues
+[reviewmerge]: https://github.com/TGMPA/TGM-Plugin-Activation/labels/reviewmerge
View
@@ -5,33 +5,26 @@
**Lead Developers:**
-[Thomas Griffin](https://github.com/thomasgriffin) ([@jthomasgriffin](https://twitter.com/jrf_nl)), [Gary Jones](https://github.com/GaryJones) ([@GaryJ](https://twitter.com/GaryJ)), [Juliette Reinders Folmer](https://github.com/jrfnl) ([@jrf_nl](https://twitter.com/jrf_nl))
+[Thomas Griffin](https://github.com/thomasgriffin) ([@jthomasgriffin](https://twitter.com/jthomasgriffin)), [Gary Jones](https://github.com/GaryJones) ([@GaryJ](https://twitter.com/GaryJ)), [Juliette Reinders Folmer](https://github.com/jrfnl) ([@jrf_nl](https://twitter.com/jrf_nl))
**Version:** 2.5.0-alpha
**Requires at least:** 3.7.0
**Tested up to:** 4.2.0
## Description
-TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference pre-packaged plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
+TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
## Installation
-1. Head to the [Releases](https://github.com/thomasgriffin/TGM-Plugin-Activation/releases) page and download the latest release zip.
+1. Head to the [Releases](https://github.com/TGMPA/TGM-Plugin-Activation/releases) page and download the latest release zip.
2. Extract the class file and place it somewhere in your theme hierarchy.
3. Add a `require_once` call within `functions.php` (or other theme file) referencing the class file.
4. Create a function, hooked to `tgmpa_register`, that registers the plugin and configurations.
For steps 3 and 4, it is recommended you view, copy and paste the contents of `example.php`
and amend to suit. The `example.php` file is a model for how you should include the class in your theme.
-*Some important things to note:*
-
-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.
+Detailed documentation on [how to configure TGMPA](http://tgmpluginactivation.com/configuration/) is available on the website.
### Composer
@@ -41,9 +34,13 @@ TGM Plugin Activation is also available as a [package](https://packagist.org/pac
composer create-project tgmpa/tgm-plugin-activation --no-dev
~~~
+## Frequently Asked Questions
+
+See [the FAQ page](http://tgmpluginactivation.com/faq/).
+
## Feedback
-See https://github.com/thomasgriffin/TGM-Plugin-Activation/issues for current issues and for reporting bugs and enhancements.
+See https://github.com/TGMPA/TGM-Plugin-Activation/issues for current issues and the [guidelines for reporting bugs and enhancements](https://github.com/TGMPA/TGM-Plugin-Activation/wiki/Guidelines-for-reporting-bugs).
__Note:__ TGM Plugin Activation library authors are not responsible for the *end-user support* for any plugin or theme which uses the library.
@@ -49,7 +49,7 @@
* Automatic plugin installation and activation library.
*
* Creates a way to automatically install and activate plugins from within themes.
- * The plugins can be either pre-packaged, downloaded from the WordPress
+ * The plugins can be either bundled, downloaded from the WordPress
* Plugin Repository or downloaded from another external source.
*
* @since 1.0.0
@@ -171,11 +171,11 @@ class TGM_Plugin_Activation {
public $capability = 'edit_theme_options';
/**
- * Default absolute path to folder containing pre-packaged plugin zip files.
+ * Default absolute path to folder containing bundled plugin zip files.
*
* @since 2.0.0
*
- * @var string Absolute path prefix to packaged zip file location. Default is empty string.
+ * @var string Absolute path prefix to zip file location for bundled plugins. Default is empty string.
*/
public $default_path = '';
View
@@ -6,13 +6,15 @@
* It is expected that theme authors would copy and paste this code into their
* functions.php file, and amend to suit.
*
+ * @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
+ *
* @package TGM-Plugin-Activation
* @subpackage Example
* @version 2.5.0-alpha
* @author Thomas Griffin, Gary Jones
* @copyright Copyright (c) 2011, Thomas Griffin
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
- * @link https://github.com/thomasgriffin/TGM-Plugin-Activation
+ * @link https://github.com/TGMPA/TGM-Plugin-Activation
*/
/**
@@ -25,8 +27,10 @@
/**
* Register the required plugins for this theme.
*
- * In this example, we register two plugins - one included with the TGMPA library
- * and one from the .org repo.
+ * In this example, we register five plugins:
+ * - one included with the TGMPA library
+ * - two from an external source, one from an arbitrary source, one from a GitHub repository
+ * - two from the .org repo, where one demonstrates the use of the `is_callable` argument
*
* The variable passed to tgmpa_register_plugins() should be an array of plugin
* arrays.
@@ -41,7 +45,7 @@ function my_theme_register_required_plugins() {
*/
$plugins = array(
- // This is an example of how to include a plugin pre-packaged with a theme.
+ // This is an example of how to include a plugin bundled with a theme.
array(
'name' => 'TGM Example Plugin', // The plugin name.
'slug' => 'tgm-example-plugin', // The plugin slug (typically the folder name).
@@ -69,7 +73,6 @@ function my_theme_register_required_plugins() {
'name' => 'Adminbar Link Comments to Pending',
'slug' => 'adminbar-link-comments-to-pending',
'source' => 'https://github.com/jrfnl/WP-adminbar-comments-to-pending/archive/master.zip',
- 'required' => false,
),
// This is an example of how to include a plugin from the WordPress Plugin Repository.
@@ -101,13 +104,10 @@ function my_theme_register_required_plugins() {
* sending in a pull-request with .po file(s) with the translations.
*
* Only uncomment the strings in the config array if you want to customize the strings.
- *
- * Some of the strings are wrapped in a sprintf(), so see the comments at the
- * end of each line for what each argument will be.
*/
$config = array(
'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.
- 'default_path' => '', // Default absolute path to pre-packaged plugins.
+ 'default_path' => '', // Default absolute path to bundled plugins.
'menu' => 'tgmpa-install-plugins', // Menu slug.
'parent_slug' => 'themes.php', // Parent menu slug.
'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
@@ -116,6 +116,7 @@ function my_theme_register_required_plugins() {
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false, // Automatically activate plugins after installation or not.
'message' => '', // Message to output right before the plugins table.
+ /*
'strings' => array(
'page_title' => __( 'Install Required Plugins', 'theme-slug' ),
'menu_title' => __( 'Install Plugins', 'theme-slug' ),
@@ -191,6 +192,7 @@ function my_theme_register_required_plugins() {
'nag_type' => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
),
+ */
);
tgmpa( $plugins, $config );

0 comments on commit b1f4ea5

Please sign in to comment.