nash-ye / wp-enforce-featured-image

Enforce certain post types to be published with a featured image with certain dimensions if specified.

Home Page:https://wordpress.org/plugins/enforce-featured-image/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WP Enforce Featured Image

Enforce certain post types to be published with a featured image with certain dimensions if specified.

Requirements

WordPress 4.4+

Credits

This plugin is based on Force Featured Image plugin by XWP.

Usage

Write an another plugin file, or paste the example below in your theme functions.php file:

if ( class_exists( 'Enforce_Featured_Image' ) ) {
    Enforce_Featured_Image::enforce_on_post_type( 'post', array(
        'min_width'                => 640,
        'min_height'               => 300,
        'force_on_published_posts' => false,
    ) );
}

About

Enforce certain post types to be published with a featured image with certain dimensions if specified.

https://wordpress.org/plugins/enforce-featured-image/

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%