[355] | 1 | <?php
|
---|
[410] | 2 | // used wptouch plugin & iPhone access check (thx uemu)
|
---|
| 3 | function is_iphone_with_wptouch(){
|
---|
| 4 | global $wptouch_plugin;
|
---|
| 5 | if (is_object($wptouch_plugin)) return $wptouch_plugin->applemobile;
|
---|
| 6 | return false;
|
---|
| 7 | }
|
---|
| 8 |
|
---|
[355] | 9 | require_once( dirname( __FILE__ ).'/request_url.php');
|
---|
| 10 | if (is_xpress_index_page_call()){
|
---|
[360] | 11 | //When notifying by a private message, Notification_reserve_send();
|
---|
[358] | 12 | //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method.
|
---|
| 13 | $_SERVER['REQUEST_METHOD'] = 'POST';
|
---|
| 14 |
|
---|
[355] | 15 | require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.
|
---|
[430] | 16 | unset($offset);
|
---|
[355] | 17 | require_once(ABSPATH.'wp-settings.php');
|
---|
| 18 | if (!is_object($xoopsUser)){ // before login auth cookie clear
|
---|
| 19 | wp_logout();
|
---|
| 20 | }
|
---|
| 21 | wp();
|
---|
| 22 |
|
---|
[421] | 23 | //for Event notification update on single post to which link is changed by permalink
|
---|
| 24 | if ( is_404() ) {
|
---|
| 25 | if (!empty($_POST['not_redirect'])) {
|
---|
| 26 | include '../../mainfile.php';
|
---|
| 27 | require_once XOOPS_ROOT_PATH.'/include/notification_update.php';
|
---|
| 28 | exit();
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 |
|
---|
[355] | 32 | if (!function_exists('is_wordpress_style')){ // When the XPressME plug-in is invalid
|
---|
| 33 | require_once dirname( __FILE__ ).'/xpress_active_plugin.php' ;
|
---|
| 34 | xpress_pulugin_activation('xpressme/xpressme.php');
|
---|
| 35 | // reloaded
|
---|
| 36 | header('Location: ' . $xoops_config->module_url . '/');
|
---|
| 37 |
|
---|
| 38 | $err_str = "The activation of the XPressME plugin was executed.<br />\n";
|
---|
| 39 | $err_str .= "Because the XPressME plugin was invalid.<br />\n";
|
---|
| 40 | $err_str .= "Please do the rereading seeing on the page.\n";
|
---|
| 41 | die($err_str);
|
---|
| 42 | }
|
---|
[358] | 43 |
|
---|
| 44 | Notification_reserve_send();
|
---|
[355] | 45 | ob_start();
|
---|
[360] | 46 | if (version_compare($xoops_config->wp_version,'2.2', '<'))
|
---|
[355] | 47 | require_once dirname( __FILE__ ).'/old_template-loader.php' ;
|
---|
| 48 | else
|
---|
| 49 | require_once( ABSPATH . WPINC . '/template-loader.php' );
|
---|
| 50 | $wp_output = ob_get_contents();
|
---|
| 51 | ob_end_clean();
|
---|
[410] | 52 |
|
---|
| 53 | //Rendering Select
|
---|
| 54 | if(
|
---|
| 55 | is_wordpress_style() // When the display mode is WordPress style
|
---|
| 56 | || is_feed() // It judges it here because it does in is_index_page() through feed to which the permalink is set.
|
---|
| 57 | || is_iphone_with_wptouch() // When iPhone access & used wptouch plugin (thx uemu)
|
---|
| 58 | ){
|
---|
| 59 | echo $wp_output;
|
---|
[355] | 60 | } else {
|
---|
[410] | 61 | require_once( dirname( __FILE__ ).'/xpress_render.php' );
|
---|
| 62 | xpress_render($wp_output);
|
---|
[355] | 63 | }
|
---|
| 64 |
|
---|
| 65 | //When there is no block cache, and an optional block is different, cache is refreshed.
|
---|
| 66 | //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time.
|
---|
| 67 | // This Function in xpressme plugin
|
---|
| 68 | require_once( dirname( __FILE__ ).'/xpress_block_render.php' );
|
---|
| 69 | xpress_unnecessary_block_cache_delete($xoops_config->module_name);
|
---|
| 70 | if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
|
---|
| 71 | exit(); // The return to wp-blog-header.php is stolen here
|
---|
| 72 | }
|
---|
[360] | 73 | if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent
|
---|
| 74 | if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent
|
---|
[355] | 75 | ?> |
---|