get( 'Version' ) ); } add_action( 'wp_enqueue_scripts', 'uhp24_styles' ); /*********************************************************** ######################## Editor ############################ ************************************************************/ add_action( 'enqueue_block_assets', 'uhp24_block_styles', 5 ); function uhp24_block_styles(){ wp_enqueue_style('uhp24-css', get_stylesheet_directory_uri() . '/style.css'); } add_filter( 'should_load_remote_block_patterns', 'uhp24_disable_remote_patterns' ); function uhp24_disable_remote_patterns() { return false; } /*********************************************************** ###################### BrowserSync ######################### ************************************************************/ function add_cors_http_header(){ header('Access-Control-Allow-Origin: https://srh.ovid:333'); header('Access-Control-Allow-Credentials: true'); header('Access-Control-Allow-Headers: X-WP-Nonce', false ); } add_action('init','add_cors_http_header'); function uhp24_browsersync_save() { $args = [ 'blocking' => false, 'sslverify' => false ]; $request = wp_remote_get('https://srh.ovid:333/uhp/__browser_sync__?method=reload', $args); } add_action('rest_after_insert_page', 'uhp24_browsersync_save', 10, 3); add_action('rest_after_insert_post', 'uhp24_browsersync_save', 10, 3); add_action('save_post', 'uhp24_browsersync_save', 10, 3); add_action('customize_save_after', 'uhp24_browsersync_save', 10, 3); add_action('wp_update_nav_menu', 'uhp24_browsersync_save', 10, 3); add_action('updated_option', 'uhp24_browsersync_save', 10, 3);