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