Example #1
0
/**
 * @package Hello_Dolly
 * @version 1.6
 */
/*
Plugin Name: INIT
Plugin URI:
Description: System Init
Author: Mo
Version: 1.1
Author URI: http://mo.sh/
*/
//register_theme_directory(__DIR__);
error_reporting(error_reporting() & ~E_USER_WARNING & ~E_USER_NOTICE);
if (class_exists('Shortcode')) {
    Shortcode::registerAll();
}
//kd(ot_get_option('phone_num') ?: '1800 011 2211');
//add_filter('theme_root',function($theme_root){
//    return __DIR__;
//});
//add_filter('theme_root_uri',function($theme_root_uri = '', $siteurl = '', $stylesheet_or_template = ''){
//    kd($theme_root_uri, $siteurl, $stylesheet_or_template);
//    return content_url();
//});
show_admin_bar(false);
// 上传图片时把绝对地址修改成相对地址(禁用,导致上传文件http错误)
//add_filter('wp_handle_upload', function ($fileInfos){
//    global $blog_id;
//    $path = get_blog_option($blog_id, 'siteurl');
//