WordPress.org

Plugin Directory

Changeset 636837


Ignore:
Timestamp:
12/10/12 23:37:03 (5 years ago)
Author:
beautomated
Message:

Setting trunk version to 'devel', and updated Plugin settings links to the newer format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interspire-bigcommerce/trunk/bigcommerce.php

    r631004 r636837  
    55Description: Integrate Bigcommerce products into your WordPress pages and posts. 
    66Author: Katz Web Services & beAutomated 
    7 Version: 1.4 
     7Version: 1.4.1-devel 
    88Author URI: http://www.katzwebservices.com 
    99License: GPLv2 
     
    2626add_action( 'admin_init', array( 'Bigcommerce', 'admin_init' ) ); 
    2727add_action( 'admin_menu', array( 'Bigcommerce', 'admin_menu' ) ); 
    28 add_filter( 'plugin_action_links', array( 'Bigcommerce', 'plugin_action_links' ), 10, 2 ); 
     28add_filter( 
     29    'plugin_action_links_' . plugin_basename( __FILE__ ), 
     30    array( 'Bigcommerce', 'plugin_action_links' ) 
     31); 
    2932add_action( 'admin_footer',  array( 'Bigcommerce', 'admin_footer' ) ); 
    3033add_action( 'wp_footer', array( 'Bigcommerce', 'wp_footer' ) ); 
     
    5861        ); 
    5962 
    60         // Support For Localizations 
     63        // Load Support For Localizations 
    6164        load_plugin_textdomain( 
    6265            'wpinterspire', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' 
    6366        ); 
    6467 
    65         // Only Continue For Page/Post Editor Or Settings Page 
    66         if( 
    67             ! in_array( 
    68                 $pagenow, array( 
    69                     'options-general.php', 'post.php', 'page.php', 'page-new.php', 'post-new.php' 
    70                 ) 
    71             )  
    72         ) { return; } 
     68        // Only Continue For Self Settings Page 
    7369        if( 
    7470            $pagenow == 'options-general.php' 
     
    8076        self::$configured = Bigcommerce_api::CheckSettings(); 
    8177 
    82         // (Re)Build Products If Requested 
     78        // (Re)Build Products Upon Request 
    8379        if ( 
    8480            isset( $_REQUEST['wpinterspirerebuild'] ) 
     
    226222 
    227223    // Tied To WP Hook By The Same Name - Adds Settings Link 
    228     function plugin_action_links( $links, $file ) { 
    229         static $the_plugin; 
    230         if( ! $the_plugin ) $the_plugin = plugin_basename(__FILE__); 
    231         if ( $file == $the_plugin ) { 
    232             $settings_link = '<a href="' . admin_url( 'options-general.php?page=wpinterspire' ) . '">' 
    233                 . __( 'Settings', 'wpinterspire' ) . '</a>'; 
    234             array_unshift( $links, $settings_link ); 
    235         } 
    236         return $links; 
    237     } 
     224    function plugin_action_links( $links ) { 
     225        $links['settings'] = '<a href="options-general.php?page=wpinterspire">' 
     226            . __( 'Settings', 'wpinterspire' ) . '</a>'; 
     227        return $links; 
     228    } 
    238229 
    239230    // Tied To WP Hook By The Same Name - Adds Admin Submenu Link 
     
    259250    // Displays The Configuration Check 
    260251    function show_configuration_check() { 
     252 
     253        // Configured 
    261254        if( self::$configured ) { 
    262255            $content = __( 'Your Bigcommerce API settings are configured properly.', 'wpinterspire' ) 
     
    269262                        . __( ' icon. Click it to add a product to your post or page.', 'wpinterspire' ) 
    270263                ); 
     264 
     265        // Unconfigured 
    271266        } else { 
    272267            $content =  __( 'Your Bigcommerce API settings are <strong>not configured properly</strong>.', 'wpinterspire' ) ; 
    273268            if( self::$errors ) { $content .= '<br /><blockquote>' . implode( '<br />', self::$errors ) . '</blockquote>'; } 
    274269        } 
     270 
     271        // Output 
    275272        echo self::make_notice_box( $content, ( ( self::$configured ) ? false : true ) ); 
    276273    } 
     
    336333        return $val; 
    337334    } 
    338  
    339 } /* End Of Plugin Class */ 
     335} 
    340336 
    341337?> 
Note: See TracChangeset for help on using the changeset viewer.