Skip to content

Remove unneeded function_exists checks#378

Merged
dkotter merged 3 commits intoWordPress:developfrom
dkotter:fix/remove-unneeded-checks
Apr 9, 2026
Merged

Remove unneeded function_exists checks#378
dkotter merged 3 commits intoWordPress:developfrom
dkotter:fix/remove-unneeded-checks

Conversation

@dkotter
Copy link
Copy Markdown
Collaborator

@dkotter dkotter commented Apr 8, 2026

What?

Remove unneeded function_exists checks

Why?

As mentioned here, we have some function_exists checks that aren't technically needed since the functions we check for are in versions of WordPress that match or exceed our minimum (6.9 and 7.0).

How?

For any core WordPress functions that we know are always available in WordPress 7.0 (our minimum) remove function_exists checks

Use of AI Tools

None

Testing Instructions

Not a lot needed here other than ensuring tests pass. Could also test the Abilities Explorer experiment to ensure it still works as expected

Open WordPress Playground Preview

@dkotter dkotter added this to the 0.7.0 milestone Apr 8, 2026
@dkotter dkotter self-assigned this Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.89%. Comparing base (aa6409b) to head (b63f9d7).
⚠️ Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
includes/bootstrap.php 0.00% 1 Missing ⚠️
includes/helpers.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #378      +/-   ##
=============================================
+ Coverage      63.81%   63.89%   +0.08%     
+ Complexity       684      680       -4     
=============================================
  Files             49       49              
  Lines           3529     3518      -11     
=============================================
- Hits            2252     2248       -4     
+ Misses          1277     1270       -7     
Flag Coverage Δ
unit 63.89% <50.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter changed the title Remove any unneeded function_exists checks Remove unneeded function_exists checks Apr 8, 2026
@jeffpaul jeffpaul self-requested a review April 8, 2026 15:30
Copy link
Copy Markdown
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested via Playground, OAI, and Title Gen worked as expected

@dkotter dkotter merged commit f83fa57 into WordPress:develop Apr 9, 2026
16 of 17 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in WordPress AI Planning & Roadmap Apr 9, 2026
@dkotter dkotter deleted the fix/remove-unneeded-checks branch April 9, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants