Enforce certain post types to be published with a featured image with certain dimensions if specified.
Author: | Nashwan Doaqan (profile at wordpress.org) |
WordPress version required: | 4.4 |
WordPress version tested: | 4.7.29 |
Plugin version: | 0.1.3 |
Added to WordPress repository: | 23-12-2016 |
Last updated: | 23-12-2016
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | https://github.com/nash-ye/wp-enforce-feature... |
Total downloads: | 728 |
Click to start download |
Enforce Featured Image is an API to enforce certain post types to be published with a featured image with certain dimensions if specified.
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,
) );
}
Note: You can use Code Snippets plugin to add the code snippets to your site.
Credits
This plugin is based on Force Featured Image plugin by XWP.
Contributing
Developers can contribute to the source code on the Github Repository.
ChangeLog