WordPress.org

Plugin Directory

Changeset 591496


Ignore:
Timestamp:
08/28/12 19:21:34 (20 months ago)
Author:
tlovett1
Message:

Add version 1.1

Location:
safe-redirect-manager
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • safe-redirect-manager/trunk/readme.txt

    r591005 r591496  
    1212Safe Redirect Manager is a HTTP redirect manager for WordPress. An easy-to-use UI allows you to redirect locations to new URL's with the HTTP status codes of your chosing. The plugin uses the wp_safe_redirect function which only allows redirects to whitelisted hosts for security purposes. The plugin automatically handles whitelisting hosts for you. 
    1313 
     14[Fork the plugin on GitHub.](https://github.com/tlovett1/Safe-Redirect-Manager) 
     15 
    1416== Installation == 
    1517 
    1618Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page. 
     19 
     20== Changelog == 
     21 
     22= 1.1 = 
     23*   safe-redirect-manager.php - plugin_url() used properly, is_plugin_page function 
     24 
     25= 1.0 = 
     26*   Plugin released 
  • safe-redirect-manager/trunk/safe-redirect-manager.php

    r591005 r591496  
    55Description: Easily and safely manage HTTP redirects. 
    66Author: Taylor Lovett (10up LLC), VentureBeat 
    7 Version: 1.0 
     7Version: 1.1 
    88Author URI: http://www.10up.com 
    99 
     
    7676     */ 
    7777    public function action_print_logo_css() { 
    78         global $post; 
    79         if ( is_object( $post ) && $this->redirect_post_type == $post->post_type ) { 
     78        if ( $this->is_plugin_page() ) { 
    8079        ?> 
    8180            <style type="text/css"> 
    8281                #icon-tools { 
    83                     background: url("<?php echo plugins_url(); ?>/safe-redirect-manager/images/icon32x32.png") no-repeat top left !important; 
     82                    background: url("<?php echo plugins_url( 'images/icon32x32.png', __FILE__ ); ?>") no-repeat top left !important; 
    8483                    margin-right: 0; 
    8584                } 
     
    102101     
    103102    /** 
     103     * Whether or not this is an admin page specific to the plugin 
     104     * 
     105     * @since 1.1 
     106     * @uses get_post_type 
     107     * @return bool 
     108     */ 
     109    private function is_plugin_page() { 
     110        return (bool) ( get_post_type() == $this->redirect_post_type || ( isset( $_GET['post_type'] ) && $this->redirect_post_type == $_GET['post_type'] ) );    
     111    }   
     112     
     113    /** 
    104114     * Echoes admin message if redirect chains exist 
    105115     * 
     
    109119     */ 
    110120    public function action_redirect_chain_alert() { 
    111         global $post, $hook_suffix; 
    112         if ( is_object( $post ) && $this->redirect_post_type == $post->post_type ) { 
     121        global $hook_suffix; 
     122        if ( $this->is_plugin_page() ) { 
    113123            if ( $this->check_for_possible_redirect_loops() ) { 
    114124            ?> 
Note: See TracChangeset for help on using the changeset viewer.