Plugin Directory

Changeset 630446


Ignore:
Timestamp:
11/27/2012 12:23:26 AM (13 years ago)
Author:
mitchoyoshitaka
Message:

disable if post thumbnails are disabled

Location:
yet-another-related-posts-plugin/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • yet-another-related-posts-plugin/trunk/class-core.php

    r630433 r630446  
    571571                'users' => $wpdb->get_var("select count(ID) from $wpdb->users"),
    572572            ),
    573             'post_thumbnails' => current_theme_supports( 'post-thumbnails' ),
     573            'post_thumbnails' => current_theme_supports( 'post-thumbnails', 'post' ),
    574574            'locale' => get_bloginfo( 'language' ),
    575575            'url' => get_bloginfo('url'),
  • yet-another-related-posts-plugin/trunk/options-meta-boxes.php

    r630435 r630446  
    3838            if ( 'thumbnails' == $choice )
    3939                echo ' active';
    40             echo "'><div class='image'></div><div class='label'>" . __('Thumbnails', 'yarpp') . "</div></div>";
     40            if ( !current_theme_supports( 'post-thumbnails', 'post' ) )
     41                echo ' disabled';
     42            echo "'";
     43            if ( !current_theme_supports( 'post-thumbnails', 'post' ) )
     44                echo ' data-help="' . esc_attr( __( 'This option is disabled because your theme does not support post thumbnails.', 'yarpp' ) ) . '"';
     45            echo "><div class='image'></div><div class='label'>" . __('Thumbnails', 'yarpp') . "</div></div>";
    4146   
    4247            echo "<div data-value='custom' class='yarpp_template_button";
Note: See TracChangeset for help on using the changeset viewer.