[1] | 1 | <?php
|
---|
[92] | 2 | require_once dirname( __FILE__ ).'/include/xpress_debug_log.php' ;
|
---|
[133] | 3 | require_once dirname( __FILE__ ).'/class/config_from_xoops.class.php' ;
|
---|
[92] | 4 | $xoops_config = new ConfigFromXoops;
|
---|
[31] | 5 | require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ;
|
---|
[1] | 6 |
|
---|
[96] | 7 | /**
|
---|
| 8 | * mb_language() sets language. If language is omitted, it returns current language as string.
|
---|
| 9 | * language setting is used for encoding e-mail messages.
|
---|
| 10 | * Valid languages are "Japanese", "ja","English","en" and "uni" (UTF-8).
|
---|
| 11 | * mb_send_mail() uses this setting to encode e-mail.
|
---|
| 12 | * Language and its setting is ISO-2022-JP/Base64 for Japanese, UTF-8/Base64 for uni, ISO-8859-1/quoted printable for English.
|
---|
| 13 | */
|
---|
| 14 | if (function_exists("mb_language")) mb_language('uni');
|
---|
[1] | 15 |
|
---|
[95] | 16 |
|
---|
[96] | 17 | // ** MySQL settings - You can get this info from your web host ** //
|
---|
| 18 | // Do not change 'DB_NAME','DB_USER','DB_PASSWORD' & 'DB_HOST'
|
---|
| 19 | // because copies a set value of XOOPS.
|
---|
| 20 |
|
---|
| 21 | /** Do not change. The name of the database for WordPress */
|
---|
| 22 | define('DB_NAME', $xoops_config->xoops_db_name);
|
---|
| 23 |
|
---|
| 24 | /** Do not change. MySQL database username */
|
---|
| 25 | define('DB_USER', $xoops_config->xoops_db_user);
|
---|
| 26 |
|
---|
| 27 | /** Do not change. MySQL database password */
|
---|
| 28 | define('DB_PASSWORD', $xoops_config->xoops_db_pass);
|
---|
| 29 |
|
---|
| 30 | /** Do not change. MySQL hostname */
|
---|
| 31 | define('DB_HOST', $xoops_config->xoops_db_host);
|
---|
| 32 |
|
---|
| 33 | /** Database Charset to use in creating database tables. */
|
---|
[1] | 34 | define('DB_CHARSET', 'utf8');
|
---|
[96] | 35 |
|
---|
| 36 | /** The Database Collate type. Don't change this if in doubt. */
|
---|
[1] | 37 | define('DB_COLLATE', '');
|
---|
| 38 |
|
---|
[95] | 39 | //define('WP_DEBUG' ,true);
|
---|
| 40 |
|
---|
[96] | 41 | /**#@+
|
---|
| 42 | * Authentication Unique Keys.
|
---|
| 43 | *
|
---|
| 44 | * Change these to different unique phrases!
|
---|
| 45 | * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
|
---|
| 46 | *
|
---|
| 47 | * @since 2.6.0
|
---|
| 48 | */
|
---|
| 49 | define('AUTH_KEY', 'put your unique phrase here');
|
---|
| 50 | define('SECURE_AUTH_KEY', 'put your unique phrase here');
|
---|
| 51 | define('LOGGED_IN_KEY', 'put your unique phrase here');
|
---|
| 52 | define('NONCE_KEY', 'put your unique phrase here');
|
---|
[1] | 53 |
|
---|
[210] | 54 | if ($xoops_config->is_wpmu){ //for WordPressMU
|
---|
| 55 | define('VHOST', 'no');
|
---|
| 56 | $base = $xoops_config->mu_path_current_site;
|
---|
| 57 | define('DOMAIN_CURRENT_SITE', $xoops_config->mu_domain_current_site );
|
---|
| 58 | define('PATH_CURRENT_SITE', $xoops_config->mu_path_current_site );
|
---|
| 59 | define('SITE_ID_CURRENT_SITE', 1);
|
---|
| 60 | define('BLOGID_CURRENT_SITE', '1' );
|
---|
| 61 |
|
---|
| 62 | define('AUTH_SALT', 'put your unique phrase here');
|
---|
| 63 | define('LOGGED_IN_SALT', 'put your unique phrase here');
|
---|
| 64 | define('SECURE_AUTH_SALT', 'put your unique phrase here');
|
---|
| 65 | }
|
---|
| 66 |
|
---|
[96] | 67 | /**
|
---|
| 68 | * WordPress Database Table prefix.
|
---|
| 69 | *
|
---|
| 70 | * You can have multiple installations in one database if you give each a unique
|
---|
| 71 | * prefix. Only numbers, letters, and underscores please!
|
---|
| 72 | */
|
---|
| 73 | // Do not change. $table_prefix is generated from XOOPS DB Priefix and the module directory name.
|
---|
| 74 | $table_prefix = $xoops_config->module_db_prefix;
|
---|
[1] | 75 |
|
---|
[96] | 76 | /**
|
---|
| 77 | * WordPress Localized Language, defaults to Japanese.
|
---|
| 78 | *
|
---|
| 79 | * Change this to localize WordPress. A corresponding MO file for the chosen
|
---|
| 80 | * language must be installed to wp-content/languages. For example, install
|
---|
| 81 | * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
|
---|
| 82 | * language support.
|
---|
| 83 | *
|
---|
| 84 | * Example:
|
---|
| 85 | * define ('WPLANG', ''); // language support to English
|
---|
| 86 | */
|
---|
| 87 | define ('WPLANG', 'ja'); // language support to Japanese
|
---|
[1] | 88 |
|
---|
| 89 | /* That's all, stop editing! Happy blogging. */
|
---|
| 90 |
|
---|
[96] | 91 | /** WordPress absolute path to the Wordpress directory. */
|
---|
[1] | 92 | if ( !defined('ABSPATH') )
|
---|
| 93 | define('ABSPATH', dirname(__FILE__).'/');
|
---|
[95] | 94 |
|
---|
[96] | 95 | require_once( ABSPATH .'/include/request_url.php');
|
---|
| 96 | if (is_xpress_index_page_call()){
|
---|
[173] | 97 | require_once $xoops_config->xoops_mainfile_path; //It is necessary to execute it for the user attestation before wp-settings.php.
|
---|
[171] | 98 | require_once(ABSPATH.'wp-settings.php');
|
---|
[294] | 99 | if (!is_object($xoopsUser)){ // before login auth cookie clear
|
---|
| 100 | wp_logout();
|
---|
| 101 | }
|
---|
[1] | 102 | wp();
|
---|
[179] | 103 |
|
---|
| 104 | if (!function_exists('is_wordpress_style')){ // When the XPressME plug-in is invalid
|
---|
| 105 | require_once dirname( __FILE__ ).'/include/xpress_active_plugin.php' ;
|
---|
| 106 | xpress_pulugin_activation('xpressme/xpressme.php');
|
---|
| 107 | // reloaded
|
---|
| 108 | header('Location: ' . $xoops_config->module_url . '/');
|
---|
| 109 |
|
---|
| 110 | $err_str = "The activation of the XPressME plugin was executed.<br />\n";
|
---|
| 111 | $err_str .= "Because the XPressME plugin was invalid.<br />\n";
|
---|
| 112 | $err_str .= "Please do the rereading seeing on the page.\n";
|
---|
| 113 | die($err_str);
|
---|
| 114 | }
|
---|
| 115 |
|
---|
[252] | 116 | ob_start();
|
---|
| 117 | if($xoops_config->is_wp20 )
|
---|
| 118 | require_once dirname( __FILE__ ).'/include/old_template-loader.php' ;
|
---|
| 119 | else
|
---|
| 120 | require_once( ABSPATH . WPINC . '/template-loader.php' );
|
---|
| 121 | $wp_output = ob_get_contents();
|
---|
| 122 | ob_end_clean();
|
---|
[181] | 123 | // It judges it here because it does in is_index_page() through feed to which the permalink is set.
|
---|
| 124 | if (is_wordpress_style() || is_feed()) {
|
---|
[252] | 125 | echo $wp_output;
|
---|
[145] | 126 | } else {
|
---|
| 127 | require_once( ABSPATH .'/include/xpress_render.php' );
|
---|
| 128 | xpress_render($wp_output);
|
---|
| 129 | }
|
---|
[252] | 130 |
|
---|
[96] | 131 | //When there is no block cache, and an optional block is different, cache is refreshed.
|
---|
| 132 | //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time.
|
---|
| 133 | // This Function in xpressme plugin
|
---|
[137] | 134 | require_once( ABSPATH .'/include/xpress_block_render.php' );
|
---|
[172] | 135 | xpress_unnecessary_block_cache_delete($xoops_config->module_name);
|
---|
| 136 | if (is_home()) xpress_block_cache_refresh($xoops_config->module_name);
|
---|
[96] | 137 | exit(); // The return to wp-blog-header.php is stolen here
|
---|
[1] | 138 | }
|
---|
[132] | 139 | if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;
|
---|
[207] | 140 | if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;
|
---|
[96] | 141 | require_once(ABSPATH.'wp-settings.php');
|
---|
| 142 | ?> |
---|