WordPress.org

Plugin Directory

Changeset 557753


Ignore:
Timestamp:
06/14/12 06:52:21 (22 months ago)
Author:
cnorris23
Message:

Add plugin settings link to plugin listing

Location:
edit-author-slug/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • edit-author-slug/trunk/edit-author-slug.php

    r557709 r557753  
    1616 * Plugin URI: http://brandonallen.org/wordpress/plugins/edit-author-slug/ 
    1717 * Description: Allows an Admin (or capable user) to edit the author slug of a user, and change the Author Base. <em>i.e. - (WordPress default structure) http://example.com/author/username/ (Plugin allows) http://example.com/ninja/master-ninja/</em> 
    18  * Version: 0.9 
     18 * Version: 0.9.1 
    1919 * Tested With: 3.2.1, 3.3.2, 3.4 
    2020 * Author: Brandon Allen 
     
    5858     * @var string Edit Author Slug Version 
    5959     */ 
    60     public $version = '0.9'; 
     60    public $version = '0.9.1'; 
    6161 
    6262    /** 
  • edit-author-slug/trunk/includes/admin-functions.php

    r557151 r557753  
    503503} 
    504504 
     505/** 
     506 * Add settings link to plugin listing. 
     507 * 
     508 * @since 0.9.1 
     509 * 
     510 * @param array $links Links array in which we would prepend our link 
     511 * @param string $file Current plugin basename 
     512 * 
     513 * @global obj $ba_eas Edit Author Slug object 
     514 * @uses plugin_basename() To get the plugin basename 
     515 * @uses add_query_arg() To add the edit-author-slug query arg 
     516 * @uses admin_url() To get the admin url 
     517 */ 
     518function ba_eas_add_settings_link( $links, $file ) { 
     519    global $ba_eas; 
     520 
     521    if ( plugin_basename( $ba_eas->file ) == $file ) { 
     522        $settings_link = '<a href="' . add_query_arg( array( 'page' => 'edit-author-slug' ), admin_url( 'options-general.php' ) ) . '">' . __( 'Settings', 'edit-author-slug' ) . '</a>'; 
     523        array_unshift( $links, $settings_link ); 
     524    } 
     525 
     526    return $links; 
     527} 
     528 
    505529/** Upgrade *******************************************************************/ 
    506530 
     
    513537 * 
    514538 * @global obj $ba_eas Edit Author Slug object 
    515  * 
    516539 * @uses update_option() To update Edit Author Slug options 
    517540 */ 
  • edit-author-slug/trunk/includes/hooks.php

    r557709 r557753  
    3030 
    3131    // Settings 
    32     add_action( 'admin_menu', 'ba_eas_add_settings_menu'       ); 
    33     add_action( 'admin_init', 'ba_eas_register_admin_settings' ); 
     32    add_action( 'admin_menu',          'ba_eas_add_settings_menu'        ); 
     33    add_action( 'admin_init',          'ba_eas_register_admin_settings'  ); 
     34    add_filter( 'plugin_action_links', 'ba_eas_add_settings_link', 10, 2 ); 
    3435} 
    3536 
  • edit-author-slug/trunk/languages/edit-author-slug.pot

    r557709 r557753  
    11# Copyright (C) 2012 Brandon Allen 
    22# This file is distributed under the same license as the Edit Author Slug package. 
    3 # Brandon Allen <wp_plugins [at] brandonallen (dot) org>, 2011. 
     3# Brandon Allen <wp_plugins [at] brandonallen (dot) org>, 2012. 
    44msgid "" 
    55msgstr "" 
  • edit-author-slug/trunk/readme.txt

    r557713 r557753  
    4747 
    4848== Changelog == 
     49 
     50= 0.9.1 = 
     51* Add 'Settings' link to plugins list table 
    4952 
    5053= 0.9.0 = 
Note: See TracChangeset for help on using the changeset viewer.