1 | <?php
|
---|
2 | require_once( dirname( __FILE__ ).'/request_url.php');
|
---|
3 | if (is_xpress_index_page_call()){
|
---|
4 | //When notifying by a private message, Notification_reserve_send();
|
---|
5 | //it is evaded that the data base becomes read-only as a result of the check on the referrer and the method.
|
---|
6 | $_SERVER['REQUEST_METHOD'] = 'POST';
|
---|
7 |
|
---|
8 | require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.
|
---|
9 | require_once(ABSPATH.'wp-settings.php');
|
---|
10 | if (!is_object($xoopsUser)){ // before login auth cookie clear
|
---|
11 | wp_logout();
|
---|
12 | }
|
---|
13 | wp();
|
---|
14 |
|
---|
15 | if (!function_exists('is_wordpress_style')){ // When the XPressME plug-in is invalid
|
---|
16 | require_once dirname( __FILE__ ).'/xpress_active_plugin.php' ;
|
---|
17 | xpress_pulugin_activation('xpressme/xpressme.php');
|
---|
18 | // reloaded
|
---|
19 | header('Location: ' . $xoops_config->module_url . '/');
|
---|
20 |
|
---|
21 | $err_str = "The activation of the XPressME plugin was executed.<br />\n";
|
---|
22 | $err_str .= "Because the XPressME plugin was invalid.<br />\n";
|
---|
23 | $err_str .= "Please do the rereading seeing on the page.\n";
|
---|
24 | die($err_str);
|
---|
25 | }
|
---|
26 |
|
---|
27 | Notification_reserve_send();
|
---|
28 | ob_start();
|
---|
29 | if (version_compare($xoops_config->wp_version,'2.2', '<'))
|
---|
30 | require_once dirname( __FILE__ ).'/old_template-loader.php' ;
|
---|
31 | else
|
---|
32 | require_once( ABSPATH . WPINC . '/template-loader.php' );
|
---|
33 | $wp_output = ob_get_contents();
|
---|
34 | ob_end_clean();
|
---|
35 | // It judges it here because it does in is_index_page() through feed to which the permalink is set.
|
---|
36 | if (is_wordpress_style() || is_feed()) {
|
---|
37 | echo $wp_output;
|
---|
38 | } else {
|
---|
39 | require_once( dirname( __FILE__ ).'/xpress_render.php' );
|
---|
40 | xpress_render($wp_output);
|
---|
41 | }
|
---|
42 |
|
---|
43 | //When there is no block cache, and an optional block is different, cache is refreshed.
|
---|
44 | //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time.
|
---|
45 | // This Function in xpressme plugin
|
---|
46 | require_once( dirname( __FILE__ ).'/xpress_block_render.php' );
|
---|
47 | xpress_unnecessary_block_cache_delete($xoops_config->module_name);
|
---|
48 | if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
|
---|
49 | exit(); // The return to wp-blog-header.php is stolen here
|
---|
50 | }
|
---|
51 | if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent
|
---|
52 | if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path; // for Notification_triggerEvent
|
---|
53 | ?> |
---|