https://github.com/nash-ye/wp-enforce-featured-image
Enforce certain post types to be published with a featured image with certain dimensions if specified.
https://github.com/nash-ye/wp-enforce-featured-image
wordpress wordpress-plugin
Last synced: 2 months ago
JSON representation
Enforce certain post types to be published with a featured image with certain dimensions if specified.
- Host: GitHub
- URL: https://github.com/nash-ye/wp-enforce-featured-image
- Owner: nash-ye
- License: gpl-3.0
- Created: 2016-12-22T16:17:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-31T08:24:08.000Z (almost 7 years ago)
- Last Synced: 2025-03-16T11:56:19.768Z (over 1 year ago)
- Topics: wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/enforce-featured-image/
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://wordpress.org/plugins/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,
) );
}
```