http://kktzf.com.cn/wiki/history/WordPress:UnMuify_the_plugin_shared_tables?feed=atom 精品欧洲av无码一区二区,精品久久久无码人妻中文字幕 2025-07-05T15:28:31Z 本wiki上該頁面的版本歷史 MediaWiki 1.39.3 http://kktzf.com.cn/wiki/WordPress:UnMuify_the_plugin_shared_tables?diff=11717&oldid=prev Xxf3325:?新頁面: In WPMU the runtime muifys the wpdb->prefix, changing it from the default wp_ prefix to wp_x_ where x = 1...n; as this is usually needed to convert plugins that know about a single blog t... 2008-09-26T05:39:24Z <p>新頁面: In WPMU the runtime muifys the wpdb-&gt;prefix, changing it from the default wp_ prefix to wp_x_ where x = 1...n; as this is usually needed to convert plugins that know about a single blog t...</p> <p><b>新頁面</b></p><div>In WPMU the runtime muifys the wpdb-&gt;prefix, changing it from the default wp_ prefix to wp_x_ where x = 1...n; as this is usually needed to convert plugins that know about a single blog to one that can deal with many.<br /> <br /> This normally works fine, but causes issues where a plugin actually wants a global table, not a per blog one.<br /> <br /> If you need a plugin to use a global table, then you could either modify the plugin's code to use $wpmuBaseTablePrefix (which is the base table prefix, probably wp_) or you can possibly add lines similar to these at the start and end of the plugin files rather than editing all the code inline:<br /> <br /> &lt;pre&gt;<br /> &lt;?php<br /> $normal_table_prefix = $table_prefix; // grab for later<br /> $table_prefix = $wpmuBaseTablePrefix; // setting to global base<br /> $wpdb-&gt;prefix = $wpmuBaseTablePrefix; // setting to glboal base<br /> <br /> <br /> // ... all the plugin code here<br /> <br /> <br /> $table_prefix = $normal_table_prefix; // back to what it was<br /> $wpdb-&gt;prefix = $normal_table_prefix; // back to what it was<br /> unset($normal_table_prefix); // and we're done with this now<br /> ?&gt;<br /> &lt;/pre&gt;</div> Xxf3325