🎯 Need Help?

Get Premium Support

Priority assistance from the developer

⬆️ Upgrade

Unlock all features

More from ANWP

AnWP Club Kit

7 ready-made club site designs for Football Leagues

Learn more →

Sports API Hub

Live sports data integration for WordPress

Learn more →

Tennis API Hub

Live tennis and table tennis data for WordPress

Learn more →

Sports Leagues Premium

Multi-sport league management with advanced statistics

Learn more →

Migration V0 19 1


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.

HookWhat it didNow
anwpfl/cmb2_tabs_content/matchExtra fields in the CMB2 game boxThe game editor’s fields live in its Vue sections. No replacement filter.
anwpfl/cmb2_tabs_content/playerExtra fields in the CMB2 player boxUse anwpfl/player/editor_data to change the editor payload (below)
anwpfl/cmb2_tabs_content/staff, .../referee, .../stadiumExtra fields in those CMB2 boxesUse anwpfl/people/editor_data (below)
anwpfl/competition/before_tutorial_metabox, anwpfl/competition/after_tutorial_metaboxOutput around the competition editor’s Tutorials boxThe 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

HookTypeUse
anwpfl/player/editor_datafilterThe player editor payload (window._anwpPlayerEdit). Args: $editor_data, $post
anwpfl/people/editor_datafilterThe staff, referee and stadium editor payload (window._anwpPeopleEdit, see its kind). Args: $editor_data, $post
anwpfl/match/before_player_statistics_saveactionFires on the admin game save right before player statistics are saved. Args: $post_id, $post_data
anwpfl/match/player_stats_events_modefilterHow goals, assists and cards reach player statistics: sync (default, counted from game events), auto or manual. Args: $mode, $match_data
anwpfl/standing/setup_datafilterInsert-only defaults of a new standing row (a clone keeps its own values). Args: $setup_data, $post_id
anwpfl/db/unknown_columnsactionFires 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)

HookTypeUse
anwpfl/stadium/map_tile_urlfilterTile URL template in Leaflet format ({z}, {x}, {y}, optional {s}, {r}). Default: the Settings value, else OpenStreetMap
anwpfl/stadium/map_attributionfilterAttribution HTML (links only). Keep “© OpenStreetMap contributors” for OSM-based tiles
anwpfl/stadium/geocode_endpointfilterAddress search endpoint for the stadium editor. Any Nominatim-compatible /search URL

Multilingual

HookTypeUse
anwpfl/ml/providerfilterpolylang, polyglotter or none. Return none to switch the integration off
anwpfl/ml/shared_post_typesfilterFootball Leagues post types served under every language prefix
anwpfl/ml/shared_taxonomiesfilterTaxonomies 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 – return true to 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 in includes/class-anwpfl-sp-*.php.
  • anwpfl/support/fields – the fields on the Support page copy and in the Site Health section (build entries with AnWPFL_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() on AnWPFL_Player, AnWPFL_Staff, AnWPFL_Referee, AnWPFL_Stadium and AnWPFL_League, their cmb2_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_function notice when WP_DEBUG is 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.