Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added ability to update plugin #211

Closed
wants to merge 21 commits into from

6 participants

@duckzland

Added new feature enabling user to update the plugin packed by theme author.

and others added some commits
@thomasgriffin Fixes #171.
Fixes permissions error by using network_admin_url instead of
admin_url. Reverted back to admin_url since after testing it works fine
for MultiSite.
852c7e1
@KingYes KingYes Added textdomain in `_n_noop` function 71eedf2
@thomasgriffin Merge pull request #173 from KingYes/master
Added textdomain in `_n_noop` function
dc97ed0
@tivnet tivnet Fix: spelling 51fcd46
@thomasgriffin Fixes #174. d868114
@thomasgriffin Merge pull request #179 from tivnet/master
Fix: spelling
e6c523a
@thomasgriffin Fixes #180. Fixes #182. Fixes #183. a5922db
@thomasgriffin Fixes #178. ebb8e68
@thomasgriffin Fixes #176. fae0b03
@thomasgriffin Fixes #185. 1e98e42
@zackkatz zackkatz Add filters to enable more customization
* Added `tgmpa_submenu_parent_slug` filter - modify what menu the sub-page is under, instead of requiring it under "Appearance". This allows the page to be added to a plugin's sub-menu.
* Added `tgmpa_table_columns` filter - modify table columns in table view
* Added `tgmpa_table_data_item` filter - modify plugin data that's ready for the table output
* Added `tgmpa_notice_rendered_action_links` filter - modify final action link output

I wanted to add a "Description" column that says why should an user install this plugin.

```
array(
    'name'      => 'WordPress SEO by Yoast',
    'slug'      => 'wordpress-seo',
    'description' => 'This is a valuable SEO plugin.',
);
```

These filters allow much more flexibility in the setup.
5fed627
@zackkatz zackkatz Removed hard-coded "description" setting b5ae6d8
@zackkatz zackkatz Updated admin_menu() method functionality
* Removed `tgmpa_submenu_parent_slug` filter - now filtering all args 
* added `tgmpa_admin_menu_args` filter
* added `tgmpa_admin_menu_use_add_theme_page` filter
2234a21
@zackkatz zackkatz Allow adding a plugin parameter named `is_callable`
Here's a use case: Yoast's WordPress SEO Plugin and the Premium version. Mostly same plugin but different slugs. This allows you to say "no, the slug doesn't exist, but this function (or method) is callable, so the plugin must be active".

Here's the plugin array item passed to `tgmpa()`: 

``
array(
    'name'      => 'WordPress SEO by Yoast',
    'slug'      => 'wordpress-seo',
    'required'  => false,
    'is_callable' => 'wpseo_init',
)
``

If the `wpseo_init()` function exists, the plugin's still considered active.
0b426d2
@zackkatz zackkatz Update class-tgm-plugin-activation.php 524d560
@thomasgriffin Merge pull request #205 from zackkatz/patch-1
Allow adding a plugin parameter named `is_callable`
a307067
@zackkatz zackkatz Fix WPCS formatting
Also merge in the `is_callable` commit.
efd3724
@thomasgriffin Merge pull request #188 from zackkatz/master
Add filters to enable more customization
aece2ef
@duckzland duckzland Initial attempt to add ability to update plugins
The initial attempt is still crude hack to add plugin updating ability to the bulk table form. Needs more work to add better messages for updating and things such as putting to maintenance mode first, implements the Plugin_Upgrader class actions and filters.

Need more testing if this will work on every possible servers.
36581c9
@duckzland duckzland fixed merge conflict 4f8dd7f
@duckzland

Merging the add_update_feature branch to master and fix the conflict caused by it. Now the add_update feature is compatible with the latest master commits instead of 2.4 tag

@duckzland

This was only tested in localhost environment using prepackaged zip plugins, although I think it will work just fine with plugin in the repository because the code actually uses native WP API.

New string for links, dynamic root menu enabling or disabling should work now.

@GaryJones
Collaborator

Could I be a pain and ask you to do the PR against the develop branch please? It will be easier to read after I rolled back the master branch to 2.4.0, so we can consider it properly. Thanks.

@GaryJones GaryJones closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 18, 2014
  1. Fixes #171.

    authored
    Fixes permissions error by using network_admin_url instead of
    admin_url. Reverted back to admin_url since after testing it works fine
    for MultiSite.
Commits on Mar 19, 2014
  1. @KingYes
  2. Merge pull request #173 from KingYes/master

    authored
    Added textdomain in `_n_noop` function
Commits on Mar 25, 2014
  1. @tivnet

    Fix: spelling

    tivnet authored
Commits on Mar 28, 2014
  1. Fixes #174.

    authored
  2. Merge pull request #179 from tivnet/master

    authored
    Fix: spelling
  3. Fixes #178.

    authored
Commits on Mar 30, 2014
  1. Fixes #176.

    authored
Commits on Apr 6, 2014
  1. Fixes #185.

    authored
Commits on Apr 17, 2014
  1. @zackkatz

    Add filters to enable more customization

    zackkatz authored
    * Added `tgmpa_submenu_parent_slug` filter - modify what menu the sub-page is under, instead of requiring it under "Appearance". This allows the page to be added to a plugin's sub-menu.
    * Added `tgmpa_table_columns` filter - modify table columns in table view
    * Added `tgmpa_table_data_item` filter - modify plugin data that's ready for the table output
    * Added `tgmpa_notice_rendered_action_links` filter - modify final action link output
    
    I wanted to add a "Description" column that says why should an user install this plugin.
    
    ```
    array(
        'name'      => 'WordPress SEO by Yoast',
        'slug'      => 'wordpress-seo',
        'description' => 'This is a valuable SEO plugin.',
    );
    ```
    
    These filters allow much more flexibility in the setup.
  2. @zackkatz
  3. @zackkatz

    Updated admin_menu() method functionality

    zackkatz authored
    * Removed `tgmpa_submenu_parent_slug` filter - now filtering all args 
    * added `tgmpa_admin_menu_args` filter
    * added `tgmpa_admin_menu_use_add_theme_page` filter
Commits on Jun 8, 2014
  1. @zackkatz

    Allow adding a plugin parameter named `is_callable`

    zackkatz authored
    Here's a use case: Yoast's WordPress SEO Plugin and the Premium version. Mostly same plugin but different slugs. This allows you to say "no, the slug doesn't exist, but this function (or method) is callable, so the plugin must be active".
    
    Here's the plugin array item passed to `tgmpa()`: 
    
    ``
    array(
        'name'      => 'WordPress SEO by Yoast',
        'slug'      => 'wordpress-seo',
        'required'  => false,
        'is_callable' => 'wpseo_init',
    )
    ``
    
    If the `wpseo_init()` function exists, the plugin's still considered active.
  2. @zackkatz
Commits on Jun 11, 2014
  1. Merge pull request #205 from zackkatz/patch-1

    authored
    Allow adding a plugin parameter named `is_callable`
  2. @zackkatz

    Fix WPCS formatting

    zackkatz authored
    Also merge in the `is_callable` commit.
Commits on Jun 13, 2014
  1. Merge pull request #188 from zackkatz/master

    authored
    Add filters to enable more customization
Commits on Jul 13, 2014
  1. @duckzland

    Initial attempt to add ability to update plugins

    duckzland authored
    The initial attempt is still crude hack to add plugin updating ability to the bulk table form. Needs more work to add better messages for updating and things such as putting to maintenance mode first, implements the Plugin_Upgrader class actions and filters.
    
    Need more testing if this will work on every possible servers.
  2. @duckzland

    fixed merge conflict

    duckzland authored
  3. @duckzland
Something went wrong with that request. Please try again.