Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @derpixler derpixler revised this gist May 25, 2011. 1 changed file with 12 additions and 11 deletions.
    23 changes: 12 additions & 11 deletions wp-action-plugin-link-hook.php
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,18 @@
    <?php

    /**
    * Wordpress Hook into the plugin action links and filter them!
    * @author rene reimann
    * @authorHome http://www.rene-reimann.de
    *
    * @hook plugin_action_links Hooks into the plugin action links
    *
    * @function customActionLink() filter the Links
    * @param $content the original links by Wordpress
    * @return the filtered links
    *
    */
    *
    * Wordpress Hook into the plugin action links and filter them!
    * @author rene reimann
    * @authorHome http://www.rene-reimann.de
    *
    * @hook plugin_action_links Hooks into the plugin action links
    *
    * @function customActionLink() filter the Links
    * @param $content the original links by Wordpress
    * @return the filtered links
    *
    */

    add_action( 'plugin_action_links' , 'customActionLink');

  2. @derpixler derpixler revised this gist May 25, 2011. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions wp-action-plugin-link-hook.php
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,18 @@
    <?php

    /**
    * Wordpress Hook into the plugin action links and filter them!
    * @author rene reimann
    * @authorHome http://www.rene-reimann.de
    *
    * @hook plugin_action_links Hooks into the plugin action links
    *
    * @function customActionLink() filter the Links
    * @param $content the original links by Wordpress
    * @return the filtered links
    *
    */

    add_action( 'plugin_action_links' , 'customActionLink');

    function customActionLink($content){
  3. @derpixler derpixler created this gist May 25, 2011.
    14 changes: 14 additions & 0 deletions wp-action-plugin-link-hook.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <?php

    add_action( 'plugin_action_links' , 'customActionLink');

    function customActionLink($content){
    return array(
    $content['myLink'] = 'Your',
    $content['deactivate'] = 'Mother',
    $content['edit'] = 'is a',
    $content['blub'] = 'Plugin!'
    );
    }

    ?>