remove( 'jquery'); $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' ); } } function my_acf_init() { acf_update_setting('google_api_key', 'AIzaSyCx46ZlrgRE3BBIebpV4KuSdAKIriLD75U'); } add_action('acf/init', 'my_acf_init'); function doThumb($id,$size) { $tmpUrl=wp_get_attachment_image_src($id,$size); return $tmpUrl[0]; } function doBg($id,$sizePhone,$sizeDesktop) { $str=''; if($sizePhone!='') { $tmpUrl=wp_get_attachment_image_src($id,$sizePhone); $str.=' data-bgPhone="'.$tmpUrl[0].'" '; } if($sizeDesktop!='') { $tmpUrl=wp_get_attachment_image_src($id,$sizeDesktop); $str.=' data-bgDesktop="'.$tmpUrl[0].'" '; } return $str; } function curl_get_contents($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $data = curl_exec($ch); curl_close($ch); return $data; } //add the theme options page if(function_exists('acf_add_options_page') ) { acf_add_options_page(array( 'page_title' => 'Theme General Settings', 'menu_title' => 'Theme Settings', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => false )); } function mytheme_filter_image_sizes( $sizes) { unset( $sizes['medium']); unset( $sizes['large']); return $sizes; } add_filter('intermediate_image_sizes_advanced', 'mytheme_filter_image_sizes'); function getExcerpt($str,$words=70,$addDots=true) { return preg_replace("/^\W*((\w[\w'-]*\b\W*){1,".$words."}).*/ms", '\\1',strip_tags($str)).($addDots==true?'[...]':''); } function remove_gutenberg_styles() { wp_dequeue_style( 'wp-block-library' ); } add_action( 'wp_enqueue_scripts', 'remove_gutenberg_styles', 100 );