Created
June 20, 2018 20:42
-
-
Save kary4/57f5e9de7a46521a8dca15615af6db88 to your computer and use it in GitHub Desktop.
This file contains 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 et_core_page_resource_maybe_output_fallback_script() { | |
if ( is_admin() && ! is_customize_preview() ) { | |
return; | |
} | |
if ( function_exists( 'et_get_option' ) && 'off' === et_get_option( 'et_pb_static_css_file', 'on' ) ) { | |
return; | |
} | |
$IS_SINGULAR = et_core_page_resource_is_singular(); | |
$POST_ID = $IS_SINGULAR ? et_core_page_resource_get_the_ID() : 'global'; | |
if ( $IS_SINGULAR && 'off' === get_post_meta( $POST_ID, '_et_pb_static_css_file', true ) ) { | |
return; | |
} | |
$SITE_URL = get_site_url(); | |
$SCRIPT = file_get_contents( ET_CORE_PATH . 'admin/js/page-resource-fallback.min.js' ); | |
//print( "<script>var et_site_url='{$SITE_URL}';var et_post_id='{$POST_ID}';{$SCRIPT}</script>" ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment