scossdl_off_get_options()
Set up some defaults.
Хуки из функции
Возвращает
null
. Ничего (null).
Использование
scossdl_off_get_options();
Заметки
- Global. Строка. $ossdl_off_blog_url
- Global. Строка. $ossdl_off_cdn_url
- Global. Строка. $ossdl_cname
- Global. int. $ossdl_https
- Global. Массив. $ossdl_off_include_dirs
- Global. Массив. $ossdl_off_excludes
- Global. Массив. $ossdl_arr_of_cnames
Код scossdl_off_get_options() scossdl off get options WPSCache 1.12.4
function scossdl_off_get_options() { global $ossdl_off_blog_url, $ossdl_off_cdn_url, $ossdl_cname, $ossdl_https; global $ossdl_off_include_dirs, $ossdl_off_excludes, $ossdl_arr_of_cnames; $ossdl_off_blog_url = get_option( 'ossdl_off_blog_url' ); if ( false === $ossdl_off_blog_url ) { $ossdl_off_blog_url = untrailingslashit( get_site_url() ); add_option( 'ossdl_off_blog_url', $ossdl_off_blog_url ); } if ( has_filter( 'ossdl_off_blog_url' ) ) { $ossdl_off_blog_url = untrailingslashit( apply_filters( 'ossdl_off_blog_url', $ossdl_off_blog_url ) ); } $ossdl_off_cdn_url = get_option( 'ossdl_off_cdn_url' ); if ( false === $ossdl_off_cdn_url ) { $ossdl_off_cdn_url = untrailingslashit( get_site_url() ); add_option( 'ossdl_off_cdn_url', $ossdl_off_cdn_url ); } $include_dirs = get_option( 'ossdl_off_include_dirs' ); if ( false !== $include_dirs ) { $ossdl_off_include_dirs = array_filter( array_map( 'trim', explode( ',', $include_dirs ) ) ); } else { $ossdl_off_include_dirs = scossdl_off_default_inc_dirs(); add_option( 'ossdl_off_include_dirs', implode( ',', $ossdl_off_include_dirs ) ); } $exclude = get_option( 'ossdl_off_exclude' ); if ( false !== $exclude ) { $ossdl_off_excludes = array_filter( array_map( 'trim', explode( ',', $exclude ) ) ); } else { $ossdl_off_excludes = array( '.php' ); add_option( 'ossdl_off_exclude', implode( ',', $ossdl_off_excludes ) ); } $ossdl_cname = get_option( 'ossdl_cname' ); if ( false !== $ossdl_cname ) { $ossdl_cname = trim( $ossdl_cname ); } else { $ossdl_cname = ''; add_option( 'ossdl_cname', $ossdl_cname ); } $ossdl_arr_of_cnames = array_filter( array_map( 'trim', explode( ',', $ossdl_cname ) ) ); $ossdl_https = intval( get_option( 'ossdl_https' ) ); }