Football Leagues 0.19.1 rebuilds every admin editor (game, club, competition, standing, player, staff, referee, stadium) as one Vue app per screen, and the CMB2 plugin is no longer needed. The hooks that added fields to the old CMB2 boxes are gone, and the old box methods are now empty stubs. Front-end templates, shortcodes, blocks and the stored data are unchanged.
Who should read this
Only developers with custom code that added fields to a Football Leagues edit screen, or that hooked the competition editor’s Tutorials box. Theme template overrides and sites without custom code have nothing to change.
🎯 Removed hooks
These hooks no longer fire. A callback attached to them does nothing, with no error.
| Hook | What it did | Now |
|---|---|---|
anwpfl/cmb2_tabs_content/match | Extra fields in the CMB2 game box | The game editor’s fields live in its Vue sections. No replacement filter. |
anwpfl/cmb2_tabs_content/player | Extra fields in the CMB2 player box | Use anwpfl/player/editor_data to change the editor payload (below) |
anwpfl/cmb2_tabs_content/staff, .../referee, .../stadium | Extra fields in those CMB2 boxes | Use anwpfl/people/editor_data (below) |
anwpfl/competition/before_tutorial_metabox, anwpfl/competition/after_tutorial_metabox | Output around the competition editor’s Tutorials box | The Tutorials box is gone. No replacement hook. |
Need a field of your own on an edit screen? Register a regular WordPress meta box with add_meta_box() for the post type (anwp_match, anwp_player, …). The game, club, player, staff, referee and stadium editors list third-party boxes in their More section.
New extension hooks
Admin editors and saving
| Hook | Type | Use |
|---|---|---|
anwpfl/player/editor_data | filter | The player editor payload (window._anwpPlayerEdit). Args: $editor_data, $post |
anwpfl/people/editor_data | filter | The staff, referee and stadium editor payload (window._anwpPeopleEdit, see its kind). Args: $editor_data, $post |
anwpfl/match/before_player_statistics_save | action | Fires on the admin game save right before player statistics are saved. Args: $post_id, $post_data |
anwpfl/match/player_stats_events_mode | filter | How goals, assists and cards reach player statistics: sync (default, counted from game events), auto or manual. Args: $mode, $match_data |
anwpfl/standing/setup_data | filter | Insert-only defaults of a new standing row (a clone keeps its own values). Args: $setup_data, $post_id |
anwpfl/db/unknown_columns | action | Fires when a write to a plugin table drops keys that aren’t columns of that table. Args: $unknown, $table, $method, $row_id |
Stadium maps (OpenStreetMap)
| Hook | Type | Use |
|---|---|---|
anwpfl/stadium/map_tile_url | filter | Tile URL template in Leaflet format ({z}, {x}, {y}, optional {s}, {r}). Default: the Settings value, else OpenStreetMap |
anwpfl/stadium/map_attribution | filter | Attribution HTML (links only). Keep “© OpenStreetMap contributors” for OSM-based tiles |
anwpfl/stadium/geocode_endpoint | filter | Address search endpoint for the stadium editor. Any Nominatim-compatible /search URL |
Multilingual
| Hook | Type | Use |
|---|---|---|
anwpfl/ml/provider | filter | polylang, polyglotter or none. Return none to switch the integration off |
anwpfl/ml/shared_post_types | filter | Football Leagues post types served under every language prefix |
anwpfl/ml/shared_taxonomies | filter | Taxonomies served under every language prefix. Default: anwp_league, anwp_season |
Setup wizard, SportsPress import and support data
anwpfl/setup/batch_size– games created per setup request.anwpfl/setup/redirect_wait– returntrueto hold the first-activation redirect to the setup wizard.anwpfl/sp_import/*– 21 filters on the SportsPress importer: the run options, which records to skip, and the club, player, competition, game, standing and redirect data before it’s written. See the docblocks inincludes/class-anwpfl-sp-*.php.anwpfl/support/fields– the fields on the Support page copy and in the Site Health section (build entries withAnWPFL_Support_Data::field()).anwpfl/support/upgrade_error_options– options that record a database upgrade error.anwpfl/import_export/more_tools– links in the “More import tools” line on Import & Export.
Deprecations
- CMB2 box methods are empty stubs.
init_cmb2_metaboxes()onAnWPFL_Player,AnWPFL_Staff,AnWPFL_Referee,AnWPFL_StadiumandAnWPFL_League, theircmb2_after_metabox()/cmb2_before_metabox(), and the old Text Strings, Countries and Odds config-page methods still exist but do nothing, and log a_deprecated_functionnotice whenWP_DEBUGis on. - Old competition side boxes.
AnWPFL_Competition_Admin::render_*_metabox()and the premium status, supervisor and API unlink box renderers are stubs too – those fields moved into the competition editor. AnWPFL_Premium_Match::add_premium_metabox_options()always returns an empty array.
📚 Related
- Migration: v0.18.2 – one Settings page and the new display options.
- Migration: v0.18.0 – the postmeta-to-custom-table move for clubs, standings and competitions.