{"id":3859,"date":"2019-06-19T08:19:44","date_gmt":"2019-06-19T08:19:44","guid":{"rendered":"https:\/\/puvox.software\/blog\/?p=3859"},"modified":"2021-11-14T13:45:48","modified_gmt":"2021-11-14T13:45:48","slug":"available-functions-class-during-shortinit-wp","status":"publish","type":"post","link":"https:\/\/puvox.software\/blog\/available-functions-class-during-shortinit-wp\/","title":{"rendered":"Available functions, class during SHORTINIT (WP)"},"content":{"rendered":"<div class=\"default-content-clss content_3859 type_post \"><div class=\"wpLinkHere\">Remember short-link to MUST-HAVE WP plugins: <a href=\"https:\/\/puvox.software\/wordpress\">puvox.software\/wordpress<\/a>&nbsp; <\/div><div style=\"clear:both;\"><\/div><p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-3864 size-full\" src=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/wp-declared-classes-defined-functions-constants.png\" alt=\"\" width=\"530\" height=\"220\" srcset=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/wp-declared-classes-defined-functions-constants.png 530w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/wp-declared-classes-defined-functions-constants-300x125.png 300w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/08\/wp-declared-classes-defined-functions-constants-400x166.png 400w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/p>\n<p>There is almost no documentation about <a href=\"http:\/\/wordpress.org\">WordPress<\/a>\u00a0<code>SHORTINIT<\/code>\u00a0constant. It is mainly used when people need to load wp-core minimally (<code>SHORTINIT<\/code>\u00a0is being checked in <code>wp-settings.php<\/code>) as opposed to complete WP Load without it.<\/p>\n<p>We made a dump of complete (for now) list of dump of available functions, classes and constants, when using <code>SHORTINIT<\/code>:<\/p>\n<p>RESULTS &#8211;&gt;<a href=\"https:\/\/pastebin.com\/3cfmH1C0\">https:\/\/pastebin.com\/3cfmH1C0<\/a><\/p>\n<p>___<br \/>\n<em>Btw, test was made using:\u00a0<\/em><\/p>\n<div>\n<pre>function get_all() {\n\u00a0\u00a0\u00a0\u00a0return [\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_declared_classes'\u00a0\u00a0 =&gt; get_declared_classes(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_declared_interfaces'=&gt; get_declared_interfaces(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_declared_traits'\u00a0\u00a0\u00a0 =&gt; get_declared_traits(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_defined_constants'\u00a0 =&gt; get_defined_constants(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_defined_functions'\u00a0 =&gt; get_defined_functions(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_defined_vars'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 =&gt; get_defined_vars(),\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'get_included_files'\u00a0\u00a0\u00a0\u00a0 =&gt; get_included_files()\n\u00a0\u00a0\u00a0\u00a0];\n}\n\n$initial_array = get_all();\ndefine('SHORTINIT', true);\nrequire_once( __DIR__ . '\/wp-load.php' );\n$current_array = get_all();<\/pre>\n<\/div>\n<p>and <strong>WinMerge<\/strong> to compare the results.<\/p>\n<p>RESULTS for initial call (before WP load)\u00a0&#8211;&gt; <a href=\"https:\/\/pastebin.com\/39A1eQzv\">https:\/\/pastebin.com\/39A1eQzv<\/a><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<div class=\"default-content-clss excerpt_3859 type_post \"><p>Remember short-link to MUST-HAVE WP plugins: puvox.software\/wordpress&nbsp; There is almost no documentation about WordPress\u00a0SHORTINIT\u00a0constant. It is mainly used when people need to load wp-core minimally (SHORTINIT\u00a0is being checked in wp-settings.php)<a class=\"excerpt-read-more\" href=\"https:\/\/puvox.software\/blog\/available-functions-class-during-shortinit-wp\/\">(Continue Reading)<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":3864,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17,8],"tags":[],"class_list":["post-3859","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","category-wordpress"],"_links":{"self":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/comments?post=3859"}],"version-history":[{"count":0,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3859\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media\/3864"}],"wp:attachment":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media?parent=3859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/categories?post=3859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/tags?post=3859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}