René's URL Explorer Experiment


Title: Docs say "before_wp_load" but everything is loaded already? · Issue #78 · wp-cli/eval-command · GitHub

Open Graph Title: Docs say "before_wp_load" but everything is loaded already? · Issue #78 · wp-cli/eval-command

X Title: Docs say "before_wp_load" but everything is loaded already? · Issue #78 · wp-cli/eval-command

Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior https://developer.wordpress.org/cli/commands/eval-file/ Thi...

Open Graph Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior https://developer.w...

X Description: Bug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior https://developer.w...

Opengraph URL: https://github.com/wp-cli/eval-command/issues/78

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Docs say \"before_wp_load\" but everything is loaded already?","articleBody":"## Bug Report\r\n\r\n- [x] Yes, I reviewed the [contribution guidelines](https://make.wordpress.org/cli/handbook/contributing/).\r\n- [x] Yes, more specifically, I reviewed the guidelines on [how to write clear bug reports](https://make.wordpress.org/cli/handbook/bug-reports/).\r\n\r\n**Describe the current, buggy behavior**\r\n\r\nhttps://developer.wordpress.org/cli/commands/eval-file/ \r\n>This command runs on the before_wp_load hook, just before the WP load process begins\r\n\r\nIn my layman understanding I'd assumed that this means that hooks like \"init\", \"plugins_loaded\",... haven't run yet when the code in the \"eval-file\" is executed.\r\nTurns out this is wrong. All plugins and the theme have been loaded already, \"plugins_loaded\" hook is done,...\r\n\r\nBasically everything except any CLI things hooked to `after_wp_load` are done (to also have that available, one would have to pipe to `wp shell`) \r\n\r\nThis is especially confusing since https://make.wordpress.org/cli/handbook/references/internal-api/wp-cli-add-hook/#notes shows e.g. `before_wp_config_load` after `before_wp_load` however wp-config.php has long been loaded already when the \"eval-file\" is run\r\n\r\nIs this expected or a bug?\r\nIf this is expected - would it be possible to change the description to make clear what exactly is meant with \"just before the WP load process begins\"?\r\n\r\n**Describe how other contributors can replicate this bug**\r\n\r\n`wp eval-file /foo.php --use-include`\r\n\r\nwhere foo.php contains:\r\n\r\n```\r\n\u003c?php\r\nvar_dump( did_action( 'plugins_loaded' ) );\r\n\r\n// WooCommerce is installed in the environment and active\r\nvar_dump( function_exists( 'WC' ) );\r\n```\r\n\r\n**Describe what you would expect as the correct outcome**\r\n\r\nThe current behavior is ok and changing it would probably break tons of people's scripts/code. A clarification in the docs is needed though?\r\n\r\nI also wanted to ask:\r\nhttps://make.wordpress.org/cli/handbook/references/config/\r\n--require=\r\n\r\nWhen using that, I assume that code runs actually on `before_wp_load` - so no WP code is loaded at all, when that file is executed?\r\n\r\n","author":{"url":"https://github.com/kkmuffme","@type":"Person","name":"kkmuffme"},"datePublished":"2024-11-28T13:07:33Z","url":"https://github.com/wp-cli/eval-command/issues/78"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:772b0f30-ad3d-811b-614e-596037b4942b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9850:2833F1:1113C14:1759C26:6AFB6884
html-safe-nonceece6bf6a65f6a92bc7eea3a37bfc415904f1e1a06a1a42e1018d568e09cfc002
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODUwOjI4MzNGMToxMTEzQzE0OjE3NTlDMjY6NkFGQjY4ODQiLCJ2aXNpdG9yX2lkIjoiNDM2MzQ1MjUwMDIxODYxNTA4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaccfefe45040991c7868f221b8ab2af3c10a3a7fb9c32b2b868ea5caceae343524
hovercard-subject-tagissue:2702097662
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/wp-cli/eval-command/78/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8e225f2b9a4efc107055ebc7a9ee19495d1b81827665079b1d16e6221ef01c5d/wp-cli/eval-command/issues/78
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8e225f2b9a4efc107055ebc7a9ee19495d1b81827665079b1d16e6221ef01c5d/wp-cli/eval-command/issues/78
og:image:altBug Report Yes, I reviewed the contribution guidelines. Yes, more specifically, I reviewed the guidelines on how to write clear bug reports. Describe the current, buggy behavior https://developer.w...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekkmuffme
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
turbo-cache-controlno-preview
go-importgithub.com/wp-cli/eval-command git https://github.com/wp-cli/eval-command.git
octolytics-dimension-user_id1570774
octolytics-dimension-user_loginwp-cli
octolytics-dimension-repository_id85580543
octolytics-dimension-repository_nwowp-cli/eval-command
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id85580543
octolytics-dimension-repository_network_root_nwowp-cli/eval-command
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/wp-cli/eval-command/issues/78#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Feval-command%2Fissues%2F78
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwp-cli%2Feval-command%2Fissues%2F78
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=wp-cli%2Feval-command
Reloadhttps://github.com/wp-cli/eval-command/issues/78
Reloadhttps://github.com/wp-cli/eval-command/issues/78
Reloadhttps://github.com/wp-cli/eval-command/issues/78
wp-clihttps://github.com/wp-cli
eval-commandhttps://github.com/wp-cli/eval-command
Codehttps://github.com/wp-cli/eval-command
Issueshttps://github.com/wp-cli/eval-command/issues
Pull requestshttps://github.com/wp-cli/eval-command/pulls
Actionshttps://github.com/wp-cli/eval-command/actions
Security and qualityhttps://github.com/wp-cli/eval-command/security
Insightshttps://github.com/wp-cli/eval-command/pulse
https://github.com/wp-cli/eval-command
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/eval-command/issues/78
New issuehttps://github.com/login?return_to=https://github.com/wp-cli/eval-command/issues/78
#84https://github.com/wp-cli/eval-command/pull/84
Docs say "before_wp_load" but everything is loaded already?https://github.com/wp-cli/eval-command/issues/78#top
#84https://github.com/wp-cli/eval-command/pull/84
scope:documentationRelated to documentationhttps://github.com/wp-cli/eval-command/issues?q=state%3Aopen%20label%3A%22scope%3Adocumentation%22
https://github.com/kkmuffme
kkmuffmehttps://github.com/kkmuffme
on Nov 28, 2024https://github.com/wp-cli/eval-command/issues/78#issue-2702097662
contribution guidelineshttps://make.wordpress.org/cli/handbook/contributing/
how to write clear bug reportshttps://make.wordpress.org/cli/handbook/bug-reports/
https://developer.wordpress.org/cli/commands/eval-file/https://developer.wordpress.org/cli/commands/eval-file/
https://make.wordpress.org/cli/handbook/references/internal-api/wp-cli-add-hook/#noteshttps://make.wordpress.org/cli/handbook/references/internal-api/wp-cli-add-hook/#notes
https://make.wordpress.org/cli/handbook/references/config/https://make.wordpress.org/cli/handbook/references/config/
https://github.com/swissspidy
swissspidyhttps://github.com/swissspidy
on Feb 18, 2025https://github.com/wp-cli/eval-command/issues/78#issuecomment-2665676860
eval-command/src/EvalFile_Command.phphttps://github.com/wp-cli/eval-command/blob/20ec428a7b9bc604fab0bd33ee8fa20662650455/src/EvalFile_Command.php#L55-L59
20ec428https://github.com/wp-cli/eval-command/commit/20ec428a7b9bc604fab0bd33ee8fa20662650455
swissspidyhttps://github.com/swissspidy
scope:documentationRelated to documentationhttps://github.com/wp-cli/eval-command/issues?q=state%3Aopen%20label%3A%22scope%3Adocumentation%22
on Feb 18, 2025https://github.com/wp-cli/eval-command/issues/78#event-16348120970
swissspidyhttps://github.com/swissspidy
Add --hook flag to defer eval execution to WordPress lifecycle hooks #84https://github.com/wp-cli/eval-command/pull/84
on Feb 2, 2026https://github.com/wp-cli/eval-command/issues/78#event-22466567164
swissspidyhttps://github.com/swissspidy
completedhttps://github.com/wp-cli/eval-command/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#84https://github.com/wp-cli/eval-command/pull/84
on Feb 5, 2026https://github.com/wp-cli/eval-command/issues/78#event-22562243511
Sign up for freehttps://github.com/signup?return_to=https://github.com/wp-cli/eval-command/issues/78
Sign in to commenthttps://github.com/login?return_to=https://github.com/wp-cli/eval-command/issues/78
scope:documentationRelated to documentationhttps://github.com/wp-cli/eval-command/issues?q=state%3Aopen%20label%3A%22scope%3Adocumentation%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.