Skip to content

Conversation

costdev
Copy link
Member

@costdev costdev commented Jul 16, 2025

inc/compatibility/compat.php is taken from WordPress Core. We'll probably be keeping this file somewhat in sync with WordPress Core's file in the future. However, it has some changes, such as additional function_exists() checks.

This PR:

  • replaces a blanket PHPCS exclusion with targeted exclusions for:
    1. namespacing - These are polyfill functions that need to stay within the global namespace.
    2. assignment in while conditions - There's no need to change the code to facilitate this, which would require additional checks.
  • Fixes indentation, array syntax, and replaces some instances of alternate syntax for control structures (endif, etc.) that was used inconsistently in the file.

costdev added 4 commits July 16, 2025 19:51
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
@costdev costdev requested a review from afragen July 16, 2025 19:17
@costdev
Copy link
Member Author

costdev commented Jul 16, 2025

PHPCS failures are related to inc/updater/namespace.php, which isn't touched by this PR.

@afragen afragen merged commit 10ca60b into main Jul 16, 2025
45 of 46 checks passed
@afragen afragen deleted the make_compat.php_compliant_with_coding_standard branch July 16, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants