Skip to content

Commit

Permalink
Disable embed targets by default
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Jan 4, 2021
1 parent 5d4e083 commit 38fbe3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/my-calendar-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ function mc_date_switcher( $type = 'calendar', $cid = 'all', $time = 'month', $d
*/
function mc_url_in_loop( $url ) {
// Only if AJAX is enabled.
if ( ( '1' !== get_option( 'mc_ajax_javascript' ) ) ) {
if ( ( '1' !== get_option( 'mc_ajax_javascript' ) ) && true === apply_filters( 'mc_use_embed_targets', false, $url ) ) {
if ( is_singular() && in_the_loop() && is_main_query() ) {
$url = esc_url( add_query_arg( 'embed', 'true', html_entity_decode( $url ) ) );
}
Expand Down

0 comments on commit 38fbe3a

Please sign in to comment.