You can simply attach backgroung with CSS to layer below, that when iframe will be ready it will overlap your backgroung with spinner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; } | |
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; } | |
.video:after { content: ""; position: absolute; display: block; | |
background: url(play-button.png) no-repeat 0 0; | |
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; } | |
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } | |
/* image poster clicked, player class added using js */ | |
.video.player img { display: none; } | |
.video.player:after { display: none; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* REMOVE DASHBOARD WELCOME | |
remove_action('welcome_panel', 'wp_welcome_panel'); | |
// */ | |
//* REMOVE ADMIN DASHBOARD WIDGETS | |
// Create the function to use in the action hook | |
function remove_default_dashboard_widgets() { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove the slug from published post permalinks for our custom post types. | |
*/ | |
add_filter( 'post_type_link', function( $post_link, $post, $leavename ) { | |
$post_types = array( | |
'post_type_1', | |
'post_type_2' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://regexr.com/3cbrm | |
^http(?:s?):\/\/(?:www\.|web\.|m\.)?facebook\.com\/([A-z0-9\.]+)\/videos(?:\/[0-9A-z].+)?\/(\d+)(?:.+)?$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns an array of image IDs stored in gllery meta field | |
* | |
* @param string $field_key Gallery field meta key | |
* @param int $post_id Post ID to get field from. If not set - will try to use current post. | |
* @return array | |
*/ | |
function my_get_jet_engine_gallery( $field_key = '', $post_id = null ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// //remove emoji support | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
// // Remove rss feed links | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("WPE_JSON_TRANSIENT_NAME", "wpe_dummyjson"); | |
define("WPE_JSON_TRANSIENT_TTL", 60); | |
define("WPE_JSON_ENDPOINT_BASE", "https://dummyjson.com/"); | |
/** Add query type to dropdown */ | |
add_filter("bricks/setup/control_options", function ($control_options) { | |
// Add a new query loop type | |
$control_options["queryTypes"]["wpe_json"] = esc_html__( | |
"DummyJSON", |