我想在我的多站点上设置媒体变量的默认值。如果我想在一个网站上这样做,很简单,我会在mysite上添加值。com/wp管理/选项。php到image\\u default\\u align、image\\u default\\u link\\u type和image\\u default\\u size,但我无法为这些添加网络全局值。
所以我想手动编辑核心文件:/wp admin/options。php,但我不知道如何做到这一点,这个级别的php不在我的范围之内。
下面是列出变量的代码,但对于这些最初不按顺序排列的值:
$whitelist_options = array(
\'general\' => array(
\'blogname\',
\'blogdescription\',
\'gmt_offset\',
\'date_format\',
\'time_format\',
\'start_of_week\',
\'timezone_string\',
\'WPLANG\',
\'new_admin_email\'
),
\'discussion\' => array(
\'default_pingback_flag\',
\'default_ping_status\',
\'default_comment_status\',
\'comments_notify\',
\'moderation_notify\',
\'comment_moderation\',
\'require_name_email\',
\'comment_whitelist\',
\'comment_max_links\',
\'moderation_keys\',
\'blacklist_keys\',
\'show_avatars\',
\'avatar_rating\',
\'avatar_default\',
\'close_comments_for_old_posts\',
\'close_comments_days_old\',
\'thread_comments\',
\'thread_comments_depth\',
\'page_comments\',
\'comments_per_page\',
\'default_comments_page\',
\'comment_order\',
\'comment_registration\'
),
\'media\' => array(
\'thumbnail_size_w\',
\'thumbnail_size_h\',
\'thumbnail_crop\',
\'medium_size_w\',
\'medium_size_h\',
\'large_size_w\',
\'large_size_h\',
\'image_default_size\',
\'image_default_align\',
\'image_default_link_type\'
),
\'reading\' => array(
\'posts_per_page\',
\'posts_per_rss\',
\'rss_use_excerpt\',
\'show_on_front\',
\'page_on_front\',
\'page_for_posts\',
\'blog_public\'
),
\'writing\' => array(
\'default_category\',
\'default_email_category\',
\'default_link_category\',
\'default_post_format\'
)
);
主要部分包括:
\'media\' => array(
\'thumbnail_size_w\',
\'thumbnail_size_h\',
\'thumbnail_crop\',
\'medium_size_w\',
\'medium_size_h\',
\'large_size_w\',
\'large_size_h\',
\'image_default_size\',
\'image_default_align\',
\'image_default_link_type\'
),
下面是一个示例,其中(我认为)变量的代码排序值:
$whitelist_options[\'general\'][] = \'siteurl\';
我没有做到这一点。。。