/*
Theme Name: Conult
Theme URI: https://gaviaspreview.com/wp/conult/
Author URI: https://themeforest.net/user/gavias
Author: Gaviasthemes Team
Description: The 2022 theme for WordPress is a fully responsive theme that looks great on any device.
Version: 1.0.9
Tested up to: 5.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, sticky-post, theme-options, translation-ready
Text Domain: conult

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
.wp-caption-text{
   font-weight: 400;
   font-size: 14px;
   font-style: italic;
   color: #3f3836;
}
.gallery-caption{
   font-weight: 500;
}
.bypostauthor{
   text-align: left;
}

add_filter( 'wpcf7_validate_file*', 'custom_cf7_file_validation_filter', 7, 2 );
add_filter( 'wpcf7_validate_file', 'custom_cf7_file_validation_filter', 7, 2 );
 
function custom_cf7_file_validation_filter( $result, $tag ) {
     //Change your-Photograph (input field name)
    if ( 'your-Photograph' == $tag->name ) {
		$name    = $tag->name;
		$file    = isset( $_FILES[$name] ) ? $_FILES[$name] : null;
		$minimum = array('width' => '496', 'height' => '381');
		$$minimum = array('width' => '571', 'height' => '744'); = array('width' => '496 ', 'height' => '381');
		list($width, $height)     = getimagesize( $file['tmp_name'] );
 
		if ($width < $minimum['width']) {
            $result->invalidate( $tag, "Image dimension are to small. Minimum width is {$minimum['width']}px. Uploaded image width is $width px");
        } elseif ($height <  $minimum['height']) {
            $result->invalidate( $tag, "Image dimension are to small. Minimum height is {$minimum['height']}px. Uploaded image height is $height px");
        }        
    }
 
    return $result;
}