Created
March 22, 2018 10:07
-
-
Save bigdigital/edd744e72c26714591245ce62850cb91 to your computer and use it in GitHub Desktop.
The7 Floating logo replace to CDN url
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( 'presscore_localized_script', function( $data ) { | |
$ossdl_off_cdn_url = get_option( 'ossdl_off_cdn_url' ); | |
$ossdl_off_blog_url = get_option( 'ossdl_off_blog_url' ); | |
$theme_settings = $data['themeSettings']; | |
$theme_settings['floatingHeader']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['floatingHeader']['logo']['html'] ); | |
$theme_settings['floatingHeader']['logo']['url'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['floatingHeader']['logo']['url'] ); | |
$theme_settings['stickyMobileHeaderFirstSwitch']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['stickyMobileHeaderFirstSwitch']['logo']['html'] ); | |
$theme_settings['stickyMobileHeaderSecondSwitch']['logo']['html'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $theme_settings['stickyMobileHeaderSecondSwitch']['logo']['html'] ); | |
$data['themeSettings'] = $theme_settings; | |
$data['themeUrl'] = str_replace( $ossdl_off_blog_url, $ossdl_off_cdn_url, $data['themeUrl'] ); | |
return $data; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment