Conversation
- Implement tests for Lifecycle, Menu Highlighting, Plugin, Query, Rewrite Manager, and Settings Validator. - Enhance Api and PostType tests with data providers for better coverage. - Validate slug options and ensure rewrite rules are flushed correctly on updates. - Ensure proper handling of non-existent posts and non-public post types. - Verify caching mechanisms for page slugs and transient data. - Confirm that admin hooks and frontend hooks are registered as expected.
…rules and breadcrumbs
…g caches and ensuring indexables
… updating Polylang language setup
…ptions for SEO impact
…r in post creation
…ges and cleaning up global state in tests
…or improved reliability
…ylang integration
Closed
…lds, Autodescription, Polylang, and WordPressSeo integrations - Removed unnecessary backslashes from function calls to improve code readability and maintain consistency across the codebase. - Updated function calls in various classes including AdvancedCustomFields, Autodescription, Polylang, and WordPressSeo. - Ensured that all instances of function calls are consistent with WordPress coding standards.
…larity and maintainability
- Added "slevomat/coding-standard" to composer.json for enhanced coding standards. - Updated phpcs.xml.dist to include additional Slevomat coding rules. - Refactored code across multiple files to use fully qualified function calls (e.g., \is_string, \array_slice) for better clarity and adherence to coding standards. - Ensured consistent use of function calls and improved readability in various classes including Admin, SettingsValidator, Api, and others.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
…d improve error handling
nlemoine
marked this pull request as ready for review
March 23, 2026 22:12
--------- Co-authored-by: Luc Lapierre <luc.lapierre@libeo.com> Co-authored-by: Nicolas Lemoine <nico.lemoine@gmail.com>
The post_updated handler only flushed when the assigned page's own slug changed. It missed parent changes and slug/parent changes on ancestors, which also alter the page's URL and the CPT rewrite base when "use page slug" is enabled. Renames onSlugChange to onPageUpdated, also detects post_parent changes, and walks ancestors so updates to any page in the chain trigger a flush.
When a page is assigned as the home for a custom post type with "Use page slug as CPT base" enabled, its slug drives the URL prefix for every published item of that CPT. Changing it silently breaks all those URLs with no auto-redirect. Two warning surfaces: - Block editor: inline notice + checkbox in the document sidebar, locking the Save button until acknowledged. Reads slug state from the core/editor store so it stays accurate across saves. - Quick Edit on the pages list: native confirm() gating the AJAX save when the slug differs from the saved value. Both fire only when "use page slug" is on for the assigned CPT. Introduces a JS build pipeline via @wordpress/scripts (pnpm). Build artefacts are committed so the plugin is ready to install from a git clone or Composer pull without a build step.
Reformats with 4-space indentation and alphabetised require-dev entries. Adds the changelog field under support pointing at GitHub releases.
Adds wp-cli/i18n-command (plus the wp-cli runner) as dev dependencies for generating the translation template, with an `i18n:pot` composer script. The plugin is distributed outside wordpress.org so translation auto-loading doesn't apply; load_plugin_textdomain is wired on init, pointing at the bundled languages/ directory. The initial languages/pfcpt.pot is generated and committed so translators can submit PRs without setting up the dev tooling.
Adds a release-please-driven workflow on push to main: opens a release PR with version bumps and a generated CHANGELOG, creates the GitHub release and tag on merge, then builds a self-installable plugin zip and attaches it as a release asset. - release-please-config.json + .release-please-manifest.json track the version. plugin.php gets release-please block markers around the Version: header so the generic updater bumps it (block style rather than inline so WP's plugin header parser doesn't capture the marker into the version string). - Release zip is built via `git archive` filtered through .gitattributes (export-ignore for tests, agent docs, dev configs, etc.), with a copy of vendor/ from `composer install --no-dev --optimize-autoloader --classmap-authoritative`. - plugin.php has a `// @bundle-autoload` marker that's sed-replaced with `require_once __DIR__ . '/vendor/autoload.php';` only in the release zip, so the source stays clean for Composer-managed installs (Bedrock-style) while the zip works as a drop-in plugin for vanilla WP. - Tags are emitted without the `v` prefix.
Replaces tag references (@v2, @V3, @main) with full commit SHAs and a trailing version comment for every third-party action and reusable workflow. Mitigates tag-rewriting attacks against popular GitHub Actions. First-party actions (actions/checkout, actions/setup-node) are left at tag references since GitHub controls those repos.
Adds uninstall.php so deleting the plugin via the Plugins screen removes every option and transient it created. Walks the aggregated mapping to call delete_option / delete_transient on known per-CPT keys (cache-safe), then bulk-deletes any orphaned rows in wp_options via prepared SQL with esc_like'd LIKE patterns. Covers: - pages_for_custom_post_type (aggregated) - page_for_<cpt> and page_for_<cpt>_use_slug per CPT - page_for_<cpt>_slug transients (object cache + DB rows)
The pre-1.0 plugin always used the assigned page's slug as the CPT URL base. As of 1.0.0 it's opt-in via the per-CPT use_slug option. Without a migration, existing sites would silently switch from /<page-slug>/<post> to /<cpt-default>/<post> on upgrade — breaking every published URL. Adds a Migrator that runs once on plugins_loaded (via Plugin::init): walks the page-for-CPT mapping and enables use_slug for every CPT that doesn't already have an explicit value. Tracked through a pfcpt_db_version option so it short-circuits on subsequent loads. Cleaned up by uninstall.php.
- Document the slug-change protection (block editor + Quick Edit) - Add WPML to the integrations list - Add a manual zip-install path alongside Composer - Add an "Upgrading from 0.x" section explaining the use_slug opt-in flip and the auto-migration that preserves existing URLs - Bump the WordPress requirement to 6.0+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.