WordPress.org

Plugin Directory

Changeset 628512


Ignore:
Timestamp:
11/22/12 05:30:56 (17 months ago)
Author:
pento
Message:

Added support for being installed in a symlink dir

Location:
automatic-updater/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • automatic-updater/trunk/admin.php

    r628004 r628512  
    147147} 
    148148 
    149 function auto_updater_plugin_row_meta( $links, $file ) { 
    150     if( AUTOMATIC_UPDATER_BASENAME == $file ) { 
    151         $links[] = '<a href="options-general.php?page=automatic-updater">' . esc_html__( 'Settings', 'automatic-updater' ) . '</a>'; 
    152     } 
     149function auto_updater_plugin_row_links( $links ) { 
     150    $url = admin_url( 'options-general.php?page=automatic-updater' ); 
     151    if ( is_multisite() ) 
     152        $url = admin_url( 'network/settings.php?page=automatic-updater' ); 
     153 
     154    array_unshift( $links, "<a href='$url'>" . esc_html__( 'Settings', 'automatic-updater' ) . '</a>' ); 
    153155 
    154156    return $links; 
    155157} 
    156 add_filter( 'plugin_row_meta', 'auto_updater_plugin_row_meta', 10, 2 ); 
     158add_filter( 'plugin_action_links_' . AUTOMATIC_UPDATER_BASENAME, 'auto_updater_plugin_row_links' ); 
     159add_filter( 'network_admin_plugin_action_links_' . AUTOMATIC_UPDATER_BASENAME, 'auto_updater_plugin_row_links' ); 
  • automatic-updater/trunk/automatic-updater.php

    r628004 r628512  
    1515$auto_updater_running = false; 
    1616 
    17 define( 'AUTOMATIC_UPDATER_BASENAME', plugin_basename( __FILE__ ) ); 
     17$my_plugin_file = __FILE__; 
     18 
     19if ( isset( $plugin ) ) 
     20    $my_plugin_file = $plugin; 
     21else if ( isset( $mu_plugin ) ) 
     22    $my_plugin_file = $mu_plugin; 
     23else if ( isset( $network_plugin ) ) 
     24    $my_plugin_file = $network_plugin; 
     25 
     26define( 'AUTOMATIC_UPDATER_BASENAME', plugin_basename( $my_plugin_file ) ); 
    1827 
    1928function auto_updater_requires_wordpress_version() { 
  • automatic-updater/trunk/readme.txt

    r628004 r628512  
    4444= 0.7.2 = 
    4545* ADDED: WordPress MultiSite support 
     46* FIXED: Now works properly if installed in a symlink directory 
    4647 
    4748= 0.7.1 = 
Note: See TracChangeset for help on using the changeset viewer.