Guest User

Untitled

a guest
Feb 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.46 KB | None | 0 0
  1. key: wordpress_logged_in_1234567890abcdef1234567890abcdef
  2. value: admin|1234567890|abcdef1234567890abcdef1234567890
  3.  
  4. $key = ... // the key from the WP cookie
  5. $value = ... // the value from the WP cookie
  6. $hash = hash_hmac ( 'md5' , $key.$value , 'some secret key' );
  7.  
  8. <?php
  9.  
  10. //this stops wp-settings from load everything
  11. define ('SHORTINIT',true);
  12.  
  13. error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
  14.  
  15. /** Define ABSPATH as this files directory */
  16. define( 'ABSPATH', dirname(__FILE__) . '/' );
  17.  
  18. //WP config file
  19. require ('wp-config.php');
  20.  
  21. if (SHORTINIT):
  22.  
  23. // Load the l18n library.
  24. require( ABSPATH . WPINC . '/l10n.php' );
  25.  
  26. // Run the installer if WordPress is not installed.
  27. wp_not_installed();
  28.  
  29.  
  30. // Load most of WordPress.
  31. require( ABSPATH . WPINC . '/class-wp-walker.php' );
  32. //require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
  33. require( ABSPATH . WPINC . '/formatting.php' );
  34. require( ABSPATH . WPINC . '/capabilities.php' );
  35. require( ABSPATH . WPINC . '/query.php' );
  36. require( ABSPATH . WPINC . '/theme.php' );
  37. require( ABSPATH . WPINC . '/user.php' );
  38. require( ABSPATH . WPINC . '/meta.php' );
  39. require( ABSPATH . WPINC . '/general-template.php' );
  40. require( ABSPATH . WPINC . '/link-template.php' );
  41. //require( ABSPATH . WPINC . '/author-template.php' );
  42. require( ABSPATH . WPINC . '/post.php' );
  43. //require( ABSPATH . WPINC . '/post-template.php' );
  44. //require( ABSPATH . WPINC . '/category.php' );
  45. //require( ABSPATH . WPINC . '/category-template.php' );
  46. require( ABSPATH . WPINC . '/comment.php' );
  47. //require( ABSPATH . WPINC . '/comment-template.php' );
  48. require( ABSPATH . WPINC . '/rewrite.php' );
  49. //require( ABSPATH . WPINC . '/feed.php' );
  50. //require( ABSPATH . WPINC . '/bookmark.php' );
  51. //require( ABSPATH . WPINC . '/bookmark-template.php' );
  52. require( ABSPATH . WPINC . '/kses.php' );
  53. require( ABSPATH . WPINC . '/cron.php' );
  54. //require( ABSPATH . WPINC . '/deprecated.php' );
  55. require( ABSPATH . WPINC . '/script-loader.php' );
  56. require( ABSPATH . WPINC . '/taxonomy.php' );
  57. //require( ABSPATH . WPINC . '/update.php' );
  58. //require( ABSPATH . WPINC . '/canonical.php' );
  59. require( ABSPATH . WPINC . '/shortcodes.php' );
  60. require( ABSPATH . WPINC . '/media.php' );
  61. require( ABSPATH . WPINC . '/http.php' );
  62. require( ABSPATH . WPINC . '/class-http.php' );
  63. require( ABSPATH . WPINC . '/widgets.php' );
  64. require( ABSPATH . WPINC . '/nav-menu.php' );
  65. //require( ABSPATH . WPINC . '/nav-menu-template.php' );
  66. //require( ABSPATH . WPINC . '/admin-bar.php' );
  67.  
  68. // Load multisite-specific files.
  69. if ( is_multisite() ) {
  70. require( ABSPATH . WPINC . '/ms-functions.php' );
  71. require( ABSPATH . WPINC . '/ms-default-filters.php' );
  72. require( ABSPATH . WPINC . '/ms-deprecated.php' );
  73. }
  74.  
  75. // Define constants that rely on the API to obtain the default value.
  76. // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
  77. wp_plugin_directory_constants( );
  78.  
  79. // Load must-use plugins.
  80. /*foreach ( wp_get_mu_plugins() as $mu_plugin ) {
  81. include_once( $mu_plugin );
  82. }
  83. unset( $mu_plugin );*/
  84.  
  85. // Load network activated plugins.
  86. if ( is_multisite() ) {
  87. foreach( wp_get_active_network_plugins() as $network_plugin ) {
  88. include_once( $network_plugin );
  89. }
  90. unset( $network_plugin );
  91. }
  92.  
  93. do_action( 'muplugins_loaded' );
  94.  
  95. if ( is_multisite() )
  96. ms_cookie_constants( );
  97.  
  98. // Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().
  99. wp_cookie_constants( );
  100.  
  101. // Define and enforce our SSL constants
  102. wp_ssl_constants( );
  103.  
  104. // Create common globals.
  105. require( ABSPATH . WPINC . '/vars.php' );
  106.  
  107. // Make taxonomies and posts available to plugins and themes.
  108. // @plugin authors: warning: these get registered again on the init hook.
  109. create_initial_taxonomies();
  110. create_initial_post_types();
  111.  
  112. // Register the default theme directory root
  113. //register_theme_directory( get_theme_root() );
  114.  
  115. // Load active plugins.
  116. /*foreach ( wp_get_active_and_valid_plugins() as $plugin )
  117. include_once( $plugin );
  118. unset( $plugin );*/
  119.  
  120. // Load pluggable functions.
  121. require( ABSPATH . WPINC . '/pluggable.php' );
  122. //require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
  123.  
  124. // Set internal encoding.
  125. wp_set_internal_encoding();
  126.  
  127. // Run wp_cache_postload() if object cache is enabled and the function exists.
  128. if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
  129. wp_cache_postload();
  130.  
  131. do_action( 'plugins_loaded' );
  132.  
  133. // Define constants which affect functionality if not already defined.
  134. wp_functionality_constants( );
  135.  
  136. // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
  137. wp_magic_quotes();
  138.  
  139. do_action( 'sanitize_comment_cookies' );
  140.  
  141. /**
  142. * WordPress Query object
  143. * @global object $wp_the_query
  144. * @since 2.0.0
  145. */
  146. $wp_the_query = new WP_Query();
  147.  
  148. /**
  149. * Holds the reference to @see $wp_the_query
  150. * Use this global for WordPress queries
  151. * @global object $wp_query
  152. * @since 1.5.0
  153. */
  154. $wp_query =& $wp_the_query;
  155.  
  156. /**
  157. * Holds the WordPress Rewrite object for creating pretty URLs
  158. * @global object $wp_rewrite
  159. * @since 1.5.0
  160. */
  161. $wp_rewrite = new WP_Rewrite();
  162.  
  163. /**
  164. * WordPress Object
  165. * @global object $wp
  166. * @since 2.0.0
  167. */
  168. $wp = new WP();
  169.  
  170. /**
  171. * WordPress Widget Factory Object
  172. * @global object $wp_widget_factory
  173. * @since 2.8.0
  174. */
  175. $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
  176.  
  177. do_action( 'setup_theme' );
  178.  
  179. // Define the template related constants.
  180. wp_templating_constants( );
  181.  
  182. // Load the default text localization domain.
  183. load_default_textdomain();
  184.  
  185. // Find the blog locale.
  186. $locale = get_locale();
  187. $locale_file = WP_LANG_DIR . "/$locale.php";
  188. if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
  189. require( $locale_file );
  190. unset($locale_file);
  191.  
  192. // Pull in locale data after loading text domain.
  193. require( ABSPATH . WPINC . '/locale.php' );
  194.  
  195. /**
  196. * WordPress Locale object for loading locale domain date and various strings.
  197. * @global object $wp_locale
  198. * @since 2.1.0
  199. */
  200. $GLOBALS['wp_locale'] = new WP_Locale();
  201.  
  202. // Load the functions for the active theme, for both parent and child theme if applicable.
  203. /*if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
  204. if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
  205. include( STYLESHEETPATH . '/functions.php' );
  206. if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
  207. include( TEMPLATEPATH . '/functions.php' );
  208. }*/
  209.  
  210. do_action( 'after_setup_theme' );
  211.  
  212. // Load any template functions the theme supports.
  213. //require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' );
  214.  
  215. // Set up current user.
  216. $wp->init();
  217.  
  218. /**
  219. * Most of WP is loaded at this stage, and the user is authenticated. WP continues
  220. * to load on the init hook that follows (e.g. widgets), and many plugins instantiate
  221. * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
  222. *
  223. * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
  224. */
  225. do_action( 'init' );
  226.  
  227. // Check site status
  228. if ( is_multisite() ) {
  229. if ( true !== ( $file = ms_site_check() ) ) {
  230. require( $file );
  231. die();
  232. }
  233. unset($file);
  234. }
  235.  
  236. /**
  237. * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
  238. *
  239. * AJAX requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
  240. * users not logged in.
  241. *
  242. * @link http://codex.wordpress.org/AJAX_in_Plugins
  243. *
  244. * @since 3.0.0
  245. */
  246. do_action('wp_loaded');
  247.  
  248. endif;
  249.  
  250. //require( ABSPATH . WPINC . '/pluggable.php' );
Add Comment
Please, Sign In to add comment