我已经回答了一个类似的问题(Inherit plugin settings to new site in Multisite ).
而且,如果理解正确,“自动设置其唯一首选项”将是在wp_options
桌子
因此,遵循WP Pagenavi示例。插件自动安装/激活后,运行如下操作:未测试
function set_my_plugin_options(){
$defaults = array(
\'pages_text\' => \'Page %CURRENT_PAGE% of %TOTAL_PAGES%\',
\'current_text\' => \'%PAGE_NUMBER%\',
\'page_text\' => \'%PAGE_NUMBER%\',
\'first_text\' => \'« First\',
\'last_text\' => \'Last »\',
\'prev_text\' => \'«\',
\'next_text\' => \'»\',
\'dotleft_text\' => \'...\',
\'dotright_text\' => \'...\',
\'num_pages\' => 5,
\'num_larger_page_numbers\' => 3,
\'larger_page_numbers_multiple\' => 10,
\'always_show\' =>,
\'use_pagenavi_css\' => 1,
\'style\' => 1
);
update_option( \'pagenavi_options\', $defaults );
}