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
function metaslider_post_feed_and( $args, $slide, $slider_settings, $slide_settings ) { | |
if ( isset( $args['tax_query'][0] ) ) { | |
$args['tax_query'][0]['operator'] = 'AND'; | |
} | |
return $args; | |
} | |
add_filter( 'metaslider_post_feed_args', 'metaslider_post_feed_and', 10, 4); |
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
add_filter( 'script_loader_tag', 'disable_async_for_rocket_loader', 11, 2 ); | |
function disable_async_for_rocket_loader( $tag, $handle ) { | |
if ( strpos( $handle, 'metaslider' ) !== FALSE ) { | |
$tag = str_replace( "<script type='text/javascript'", "<script data-cfasync='false'", $tag ); | |
} | |
return $tag; | |
} |
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
function ms_vimeo_loop_and_https($url, $slider_id, $slide_id) { | |
return "https:" . $url . "&loop=1"; | |
} | |
add_filter('metaslider_vimeo_params', 'ms_vimeo_loop_and_https', 10, 3); |
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
function metaslider_fix_agp_font_awesome() { | |
if( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) { | |
wp_dequeue_script("colorbox-js"); | |
wp_dequeue_style("colorbox-css"); | |
} | |
} | |
add_action('admin_enqueue_scripts', 'metaslider_fix_agp_font_awesome', 10); |
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
function metaslider_fix_beaton() { | |
if( isset( $_GET['page'] ) && $_GET['page'] == 'metaslider' ) { | |
wp_dequeue_script("custom-js"); | |
wp_dequeue_script("setup-js"); | |
wp_dequeue_script("upload-js"); | |
wp_dequeue_script("datepicker-js"); | |
} | |
} | |
add_action('admin_enqueue_scripts', 'metaslider_fix_beaton', 10); |
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
function ms_vimeo_force_https($url, $slider_id, $slide_id) { | |
return "https:" . $url; | |
} | |
add_filter('metaslider_vimeo_params', 'ms_vimeo_force_https', 10, 3); |
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
/** | |
* Use wp_get_attachment_url to retrieve the attachment URL | |
* | |
* Important: Resized images created by Meta Slider are not uploaded to s3. | |
* Important: Disable cropping in the slideshow settings to stop Meta Slider from outputting a URL to a file that doesn't exist on S3. | |
*/ | |
function metaslider_s3_cloudfront_url($local_url, $attachment_id) { | |
return wp_get_attachment_url($attachment_id); | |
} | |
add_filter('metaslider_attachment_url', 'metaslider_s3_cloudfront_url', 10, 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
function metaslider_protocol() { | |
return "https"; | |
} | |
add_filter('metaslider_tubeplayer_protocol', 'metaslider_protocol'); |
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
/** | |
* Adds a {comment_count} template tag to Meta Slider Post Feed captions | |
*/ | |
function metaslider_comment_count($content) { | |
$content = str_replace( "{comment_count}", comments_number() , $content ); | |
return $content; | |
} | |
add_filter( "metaslider_post_feed_template", "metaslider_comment_count" ); |
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
@media screen and (max-width: 480px) { | |
.metaslider .nivo-caption * { | |
font-size: 0.8em; | |
} | |
} |
NewerOlder