Support

Account

Home Forums General Issues image upload button disappears after the image gets deleted from media library Reply To: image upload button disappears after the image gets deleted from media library

  • Please Try this one guys.

    
    
    function create_field( $field )
    	{
    		// vars
    		$o = array(
    			'class'		=>	'',
    			'url'		=>	'',
    		);
    		
    		if( $field['value'] && is_numeric($field['value']) )
    		{
    			$url = wp_get_attachment_image_src($field['value'], $field['preview_size']);
    			
    			if( $url !== false ) {
    				$o['class'] = 'active';
    				$o['url'] = $url[0];
    			}
    		}
    
    

    “Edit this function as above. path is : core/fields/image.php “