WordPress.org

Plugin Directory

Changeset 533026


Ignore:
Timestamp:
04/18/12 18:31:23 (2 years ago)
Author:
pross
Message:

3.4 support added

Location:
theme-check/trunk/checks
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/checks/customs.php

    r336084 r533026  
    1111        checkcount(); 
    1212 
    13         if ( strpos( $php, 'add_custom_image_header' ) === false ) { 
    14             $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: No reference to <strong>add_custom_image_header</strong> was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.", "themecheck" ); 
     13        if ( ! preg_match( '#add_theme_support\s?\(\s?[\'|"]custom-header#', $php ) ) { 
     14            $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: No reference to <strong>add_theme_support( 'custom-header', \$args )</strong> was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.", "themecheck" ); 
    1515        } 
    1616 
    17         if ( strpos( $php, 'add_custom_background' ) === false ) { 
    18             $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: No reference to <strong>add_custom_background()</strong> was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.", "themecheck" ); 
     17        if ( ! preg_match( '#add_theme_support\s?\(\s?[\'|"]custom-background#', $php ) ) { 
     18            $this->error[] = __( "<span class='tc-lead tc-recommended'>RECOMMENDED</span>: No reference to <strong>add_theme_support( 'custom-background', \$args )</strong> was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.", "themecheck" ); 
    1919        } 
    2020 
  • theme-check/trunk/checks/dep_recommend.php

    r503927 r533026  
    1010 
    1111        $checks = array( 
    12             array( 'wp_timezone_supported' => 'No alternatives', '3.2' ) 
     12            // frontend 
     13            array( 'get_themes' => 'wp_get_themes()', '3.4' ), 
     14            array( 'get_theme' => 'wp_get_theme()', '3.4' ), 
     15            array( 'get_current_theme' => 'wp_get_theme()', '3.4' ), 
     16            array( 'clean_pre' => 'none available', '3.4' ), 
     17            array( 'add_custom_image_header' => 'add_theme_support( \'custom-header\', $args )', '3.4' ), 
     18            array( 'remove_custom_image_header' => 'remove_theme_support( \'custom-header\' )', '3.4' ), 
     19            array( 'add_custom_background' => 'add_theme_support( \'custom-background\', $args )', '3.4' ), 
     20            array( 'remove_custom_background' => 'remove_theme_support( \'custom-background\' )', '3.4' ), 
     21            array( 'get_theme_data' => 'wp_get_theme()', '3.4' ), 
     22            array( 'update_page_cache' => 'update_post_cache()', '3.4' ), 
     23            array( 'clean_page_cache' => 'update_post_cache()', '3.4' ), 
     24             
     25            // admin 
     26            array( 'get_allowed_themes' => 'wp_get_themes( array( \'allowed\' => true ) )', '3.4' ), 
     27            array( 'get_broken_themes' => 'wp_get_themes( array( \'errors\' => true )', '3.4' ), 
     28            array( 'current_theme_info' => 'wp_get_theme()', '3.4' ), 
    1329            ); 
    1430 
  • theme-check/trunk/checks/deprecated.php

    r503927 r533026  
    118118            array( 'update_category_cache' => 'No alternatives', '3.1' ), 
    119119            array( 'get_users_of_blog' => 'get_users()', '3.1' ), 
     120            array( 'wp_timezone_supported' => 'None available', '3.2' ), 
     121            array( 'the_editor' => 'wp_editor', '3.3' ), 
     122            array( 'get_user_metavalues' => 'none available', '3.3' ), 
     123            array( 'sanitize_user_object' => 'none available', '3.3' ), 
     124            array( 'get_boundary_post_rel_link' => 'none available', '3.3' ), 
     125            array( 'start_post_rel_link' => 'none available ', '3.3' ), 
     126            array( 'get_index_rel_link' => 'none available', '3.3' ), 
     127            array( 'index_rel_link' => 'none available', '3.3' ), 
     128            array( 'get_parent_post_rel_link' => 'none available', '3.3' ), 
     129            array( 'parent_post_rel_link' => 'none available', '3.3' ), 
     130            array( 'wp_admin_bar_dashboard_view_site_menu' => 'none available', '3.3' ), 
     131            array( 'is_blog_user' => 'is_member_of_blog()', '3.3' ), 
     132            array( 'debug_fopen' => 'error_log()', '3.3' ), 
     133            array( 'debug_fwrite' => 'error_log()', '3.3' ), 
     134            array( 'debug_fclose' => 'error_log()', '3.3' ), 
     135 
     136             
     137             
    120138            // end wp-includes deprecated 
    121139 
     
    139157            array( 'get_others_unpublished_posts' => 'None available','3.1' ), 
    140158            array( 'get_others_drafts' => 'None available','3.1' ), 
    141             array( 'get_others_pending' => 'None available','3.1' ) 
     159            array( 'get_others_pending' => 'None available', '3.1' ), 
     160            array( 'wp_dashboard_quick_press()' => 'None available', '3.2' ), 
     161            array( 'wp_tiny_mce' => 'wp_editor', '3.2' ), 
     162            array( 'wp_preload_dialogs' => 'wp_editor()', '3.2' ), 
     163            array( 'wp_print_editor_js' => 'wp_editor()', '3.2' ), 
     164            array( 'wp_quicktags' => 'wp_editor()', '3.2' ), 
     165            array( 'favorite_actions' => 'WP_Admin_Bar', '3.2' ), 
     166            array( 'screen_layout' => '$current_screen->render_screen_layout()', '3.3' ), 
     167            array( 'screen_options' => '$current_screen->render_per_page_options()', '3.3' ), 
     168            array( 'screen_meta' => ' $current_screen->render_screen_meta()', '3.3' ), 
     169            array( 'media_upload_image' => 'wp_media_upload_handler()', '3.3' ), 
     170            array( 'media_upload_audio' => 'wp_media_upload_handler()', '3.3' ), 
     171            array( 'media_upload_video' => 'wp_media_upload_handler()', '3.3' ), 
     172            array( 'media_upload_file' => 'wp_media_upload_handler()', '3.3' ), 
     173            array( 'type_url_form_image' => 'wp_media_insert_url_form( \'image\' )', '3.3' ), 
     174            array( 'type_url_form_audio' => 'wp_media_insert_url_form( \'audio\' )', '3.3' ), 
     175            array( 'type_url_form_video' => 'wp_media_insert_url_form( \'video\' )', '3.3' ), 
     176            array( 'type_url_form_file' => 'wp_media_insert_url_form( \'file\' )', '3.3' ), 
     177            array( 'add_contextual_help' => 'get_current_screen()->add_help_tab()', '3.3' ),         
    142178            // end wp-admin 
    143179            ); 
  • theme-check/trunk/checks/theme_support.php

    r503927 r533026  
    88 
    99        $checks = array( 
    10             '/add_theme_support\(\s?("|\')custom-headers("|\')\s?\)/' => 'add_custom_image_header()', 
    11             '/add_theme_support\(\s?("|\')custom-background("|\')\s?\)/' => 'add_custom_background()', 
     10//          '/add_theme_support\(\s?("|\')custom-headers("|\')\s?\)/' => 'add_custom_image_header()', 
     11//s         '/add_theme_support\(\s?("|\')custom-background("|\')\s?\)/' => 'add_custom_background()', 
    1212            ); 
    1313 
Note: See TracChangeset for help on using the changeset viewer.