WordPress.org

Plugin Directory

Changeset 549640 for feedwordpress


Ignore:
Timestamp:
05/28/12 02:59:25 (5 years ago)
Author:
radgeek
Message:

Remove compat code for WordPress versions no longer supported by FWP.

Location:
feedwordpress/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • feedwordpress/trunk/admin-ui.php

    r455025 r549640  
    258258            "Posts" => array('page' => 'posts-page.php', 'long' => 'Posts & Links'), 
    259259            "Authors" => array('page' => 'authors-page.php', 'long' => 'Authors'), 
    260             'Categories' => array('page' => 'categories-page.php', 'long' => 'Categories'.FEEDWORDPRESS_AND_TAGS), 
     260            'Categories' => array('page' => 'categories-page.php', 'long' => 'Categories & Tags'), 
    261261        ); 
    262262         
  • feedwordpress/trunk/categories-page.php

    r319407 r549640  
    1111        $this->dispatch = 'feedwordpress_admin_page_categories'; 
    1212        $this->pagenames = array( 
    13             'default' => 'Categories'.FEEDWORDPRESS_AND_TAGS, 
    14             'settings-update' => 'Syndicated Categories'.FEEDWORDPRESS_AND_TAGS, 
    15             'open-sheet' => 'Categories'.FEEDWORDPRESS_AND_TAGS, 
     13            'default' => 'Categories & Tags', 
     14            'settings-update' => 'Syndicated Categories & Tags', 
     15            'open-sheet' => 'Categories & Tags', 
    1616        ); 
    1717        $this->filename = __FILE__; 
     
    603603            'categories_box' => array('title' => __('Categories'), 'id' => 'categorydiv'), 
    604604        ); 
    605         if (!FeedWordPressCompatibility::post_tags()) : 
    606             unset($this->boxes_by_methods['tags_box']); 
    607         endif; 
    608605 
    609606        parent::display();   
  • feedwordpress/trunk/compatability.php

    r344272 r549640  
    7070    } /* FeedWordPressCompatibility::link_category_id () */ 
    7171 
    72     /*static*/ function post_tags () { 
    73         return FeedWordPressCompatibility::test_version(FWP_SCHEMA_23); 
    74     } /* FeedWordPressCompatibility::post_tags () */ 
    75  
    7672    /*static*/ function validate_http_request ($action = -1, $capability = null) { 
    7773        // Only worry about this if we're using a method with significant side-effects 
     
    10399        global $fwp_path; 
    104100 
    105         $hook = 'admin_footer'; 
    106         if (FeedWordPressCompatibility::test_version(FWP_SCHEMA_28)) : // WordPress 2.8+ 
    107             $hook = $hook . '-' . $fwp_path . '/' . basename($filename); 
    108         endif; 
     101        $hook = 'admin_footer-'.$fwp_path.'/'.basename($filename); 
    109102        return $hook; 
    110103    } /* FeedWordPressCompatibility::bottom_script_hook() */ 
    111104} /* class FeedWordPressCompatibility */ 
    112  
    113 define('FEEDWORDPRESS_AND_TAGS', (FeedWordPressCompatibility::post_tags() ? ' & Tags' : '')); 
    114  
    115 if (!function_exists('stripslashes_deep')) { 
    116     function stripslashes_deep($value) { 
    117         $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value); 
    118         return $value; 
    119     } 
    120 } 
    121  
    122 if (!function_exists('sanitize_user')) { 
    123     function sanitize_user ($text, $strict = false) { 
    124         return $text; // Don't munge it if it wasn't munged going in... 
    125     } 
    126 } 
    127  
    128 if (!function_exists('disabled')) { 
    129     /** 
    130      * Outputs the html disabled attribute. 
    131      * 
    132      * Compares the first two arguments and if identical marks as disabled 
    133      * 
    134      * @since 3.0.0 
    135      * 
    136      * @param mixed $disabled One of the values to compare 
    137      * @param mixed $current (true) The other value to compare if not just true 
    138      * @param bool $echo Whether to echo or just return the string 
    139      * @return string html attribute or empty string 
    140      */ 
    141     function disabled( $disabled, $current = true, $echo = true ) { 
    142         return __checked_selected_helper( $disabled, $current, $echo, 'disabled' ); 
    143     } 
    144 } /* if */ 
    145105 
    146106// Compat 
     
    174134    } /* function set_post_field () */ 
    175135 
    176 } /* if */ 
    177  
    178 if (!function_exists('term_exists')) { 
    179     // Fucking WordPress 3.0 wordsmithing. 
    180     function term_exists ( $term, $taxonomy = '', $parent = 0 ) { 
    181         return is_term($term, $taxonomy, $parent); 
    182     } 
    183136} /* if */ 
    184137 
  • feedwordpress/trunk/feedwordpress.php

    r548649 r549640  
    692692    do_action('feedwordpress_admin_menu_pre_categories', $menu_cap, $settings_cap); 
    693693    add_submenu_page( 
    694         $syndicationMenu, 'Categories'.FEEDWORDPRESS_AND_TAGS, 'Categories'.FEEDWORDPRESS_AND_TAGS, 
     694        $syndicationMenu, 'Categories & Tags', 'Categories & Tags', 
    695695        $settings_cap, FeedWordPress::path('categories-page.php') 
    696696    ); 
  • feedwordpress/trunk/syndicatedlink.class.php

    r549635 r549640  
    5151            $this->id = $link->link_id; 
    5252        else : 
    53             $this->id = $link; 
    54              
    55             if (function_exists('get_bookmark')) : // WP 2.1+ 
    56                 $this->link = get_bookmark($link); 
    57             else : 
    58                 $this->link = $wpdb->get_row(" 
    59                 SELECT * FROM $wpdb->links 
    60                 WHERE (link_id = '".$wpdb->escape($link)."')" 
    61                 ); 
    62             endif; 
     53            $this->id = $link;           
     54            $this->link = get_bookmark($link); 
    6355        endif; 
    6456 
Note: See TracChangeset for help on using the changeset viewer.