Not sure how I missed your reply. Yes, I want consistency throughout the posts, so all posts must have an image that is 640×360.
GREAT NEWS!
This task has been completed and I’m sure many WordPress multi-author websites will be ecstatic!
The current method requires the use of the WyPiekacz plugin. In the settings, select “Post thumbnail (Featured image) is required:” then edit the wypiekacz.php file.
Find:
$has_thumbnail = false;
if ( ( $post_id > 0 ) && function_exists( 'has_post_thumbnail' ) ) {
$has_thumbnail = has_post_thumbnail( $post_id );
}
$has_thumbnail = apply_filters( 'wypiekacz_check_thumbnail', $has_thumbnail, $post_id, $post_data );
if ( !$has_thumbnail ) {
$this->errors[] = array( 'post_thumbnail', __('Post thumbnail (Featured image) is required.', 'wypiekacz') );
}
Change to:
$has_thumbnail_proper_dimension = false;
if ( ( $post_id > 0 ) && function_exists( 'has_post_thumbnail' ) ) {
$has_thumbnail = has_post_thumbnail( $post_id );
list($url, $width, $height) = wp_get_attachment_image_src(get_post_thumbnail_id( $post->ID ), "Full");
echo $imgsrc[0];
if($width>=640 and $height>=360){
$has_thumbnail_proper_dimension=true;
}
}
$has_thumbnail = apply_filters( 'wypiekacz_check_thumbnail', $has_thumbnail, $post_id, $post_data );
if ( !$has_thumbnail ) {
$this->errors[] = array( 'post_thumbnail', __('Post thumbnail (Featured image) is required.', 'wypiekacz') );
}
if ( !$has_thumbnail_proper_dimension ) {
$this->errors[] = array( 'post_thumbnail', __('Post thumbnail (Featured image) should be atleast 640x360.', 'wypiekacz') );
}
Change 640 and 360 above to fit your needs.
I am currently working to add this in the settings of the plugin.
I am not really a coder at all, so if someone has the time, I would love the help.
THANKS – To Rajeev Vyas on wordpress.stackexchange.com for his help!