WordPress.org

Plugin Directory

Changeset 585312


Ignore:
Timestamp:
08/14/12 11:31:11 (20 months ago)
Author:
GregLone
Message:

Small bugfix (because of some changes in WP 3.4.1 core)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sf-archiver/trunk/w3p-archiver.php

    r516339 r585312  
    44Plugin URI: http://www.screenfeed.fr/archi/ 
    55Description: A simple way to display archive pages for your custom post types 
    6 Version: 1.1 
     6Version: 1.1.1 
    77Author: Grégory Viguier 
    88Author URI: http://www.screenfeed.fr/greg/ 
     
    1313define( 'W3P_ACPT_PLUGIN_NAME', 'SF Archiver' ); 
    1414define( 'W3P_ACPT_PAGE_NAME',   'w3p_acpt_config' ); 
    15 define( 'W3P_ACPT_VERSION',     '1.1' ); 
     15define( 'W3P_ACPT_VERSION',     '1.1.1' ); 
    1616define( 'W3P_ACPT_DOMAIN',      'w3p-acpt' ); 
    1717define( 'W3P_ACPT_FILE',        __FILE__ ); 
     
    7272            $pt = $q->query_vars['post_type']; 
    7373            $sets = get_option('_w3p_acpt'); 
    74      
     74 
    7575            if ( isset($sets[$pt]['enabled'], $sets[$pt]['ppp']) && $sets[$pt]['enabled'] && $sets[$pt]['ppp'] ) 
    7676                $q->query_vars['posts_per_page'] = $sets[$pt]['ppp']; 
     
    142142        if ( ! isset( $args->rewrite['feeds'] ) || ! $args->has_archive ) 
    143143            $args->rewrite['feeds'] = (bool) $args->has_archive; 
     144        if ( ! isset( $args->rewrite['ep_mask'] ) ) { 
     145            if ( isset( $args->permalink_epmask ) ) 
     146                $args->rewrite['ep_mask'] = $args->permalink_epmask; 
     147            else 
     148                $args->rewrite['ep_mask'] = EP_PERMALINK; 
     149        } 
    144150 
    145151        if ( $args->hierarchical ) 
     
    172178        } 
    173179 
    174         $wp_rewrite->add_permastruct($post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front'], $args->permalink_epmask); 
     180        $wp_rewrite->add_permastruct($post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite ); 
    175181 
    176182        // Great, stop the copy/paste and just add the final touch. Easy, isn't it? ;) 
Note: See TracChangeset for help on using the changeset viewer.