WordPress.org

Plugin Directory

Changeset 1192552


Ignore:
Timestamp:
07/04/15 19:56:15 (21 months ago)
Author:
vladimir.s
Message:

Terms descriptions: v.3.2.1
Bug fix: in compare terms links with page link function

Location:
terms-descriptions/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • terms-descriptions/trunk/includes/parsers/td_parser.php

    r1122801 r1192552  
    131131     */ 
    132132    protected function is_current_url( $url ) { 
    133         return $this->get_current_url() === trailingslashit( $url ); 
     133        $cur_slug = $this->get_current_url(); 
     134        $term_url = preg_replace( '/^https?\:\/\/(www\.)?/i', '', trailingslashit( $url ) ); 
     135        return $cur_slug === $term_url; 
    134136    } 
    135137 
     
    158160            return $this->cur_url; 
    159161        } 
    160         $this->cur_url = 'http'; 
    161         if ( isset( $_SERVER[ "HTTPS" ] ) && $_SERVER[ "HTTPS" ] == "on" ) { 
    162             $this->cur_url .= "s"; 
    163         } 
    164         $this->cur_url .= "://"; 
    165162        if ( $_SERVER[ "SERVER_PORT" ] != "80" ) { 
    166             $this->cur_url .= $_SERVER[ "SERVER_NAME" ] . ":" . $_SERVER[ "SERVER_PORT" ] . $_SERVER[ "REQUEST_URI" ]; 
     163            $this->cur_url = $_SERVER[ "SERVER_NAME" ] . ":" . $_SERVER[ "SERVER_PORT" ] . $_SERVER[ "REQUEST_URI" ]; 
    167164        } else { 
    168             $this->cur_url .= $_SERVER[ "SERVER_NAME" ] . $_SERVER[ "REQUEST_URI" ]; 
     165            $this->cur_url = $_SERVER[ "SERVER_NAME" ] . $_SERVER[ "REQUEST_URI" ]; 
    169166        } 
    170167        return trailingslashit( $this->cur_url ); 
  • terms-descriptions/trunk/includes/td_admin_options.php

    r1122801 r1192552  
    6464                            <label><input name="td_options[convert_in__<?php echo $type; ?>]" type="checkbox" 
    6565                                          id="convert_in__<?php echo $type; ?>" 
    66                                     <?php checked( $options[ 'convert_in__'.$type ], 'on' ); ?> /> 
     66                                    <?php if (isset($options[ 'convert_in__'.$type ])) { checked( $options[ 'convert_in__'.$type ], 'on' ); } ?> /> 
    6767                                    <?php _e( 'in posts of type', TD_TEXTDOMAIN ); ?> "<?php echo $data->labels->name; ?>" 
    6868                            </label><br /> 
     
    7878                    <th scope="row"><?php _e( 'Convert terms in shortcodes', TD_TEXTDOMAIN ); ?></th> 
    7979                    <td> 
    80                         <label><input name="td_options[convert_in_shortcodes]" type="checkbox" id="convert_in_posts" <?php checked( $options[ 'convert_in_shortcodes' ], 'on' ); ?> /></label><br /> 
     80                        <label><input name="td_options[convert_in_shortcodes]" type="checkbox" id="convert_in_posts" 
     81                                <?php if(isset($options[ 'convert_in_shortcodes' ])) { checked( $options[ 'convert_in_shortcodes' ], 'on' ); } ?> /></label><br /> 
    8182                    </td> 
    8283                </tr> 
  • terms-descriptions/trunk/readme.txt

    r1160668 r1192552  
    33Tags: post, page, links, plugin 
    44Requires at least: 3.9 
    5 Tested up to: 4.2.1 
     5Tested up to: 4.2.2 
    66Stable tag: trunk 
    77 
     
    7777== Changelog == 
    7878 
     79= 3.2.1 = 
     80 
     81* Bug fix: in compare terms links with page link function 
     82 
    7983= 3.2 = 
    8084 
  • terms-descriptions/trunk/terms-descriptions.php

    r1152193 r1192552  
    44Plugin URI: http://www.simplecoding.org/plagin-wordpress-terms-descriptions 
    55Description: This plugin allows you to create list of terms and assign links to them. Plugin automatically replaces terms occurrences in your posts with appropriate links. You can control the number of replacements. After activation you can create terms list on plugin administration page (Tools -> Terms Descriptions). 
    6 Version: 3.2 
     6Version: 3.2.1 
    77Author: Vladimir Statsenko 
    88Author URI: http://www.simplecoding.org 
Note: See TracChangeset for help on using the changeset viewer.