Skip to content

What's new in 1.0

Version 1.0 is a big step for the plugin. The editor is new, there are more field types, and your values can now be used on the website without code.

A new editor

The editor is completely new. It feels familiar from the first click, with smart details that save you time:

  • add a field with the + button and pick one of 21 field types;
  • drag pages and fields, or move them with the keyboard;
  • see a problem (a duplicate field name, a missing title) before you save.

Nine new field types

Email, Link, Password, Date, Time, Date and time, Range, Button group and File. See Field types for all 21 types.

Values on the website

A field can now be shown with the shortcode [aop_option] or bound to a block with Block Bindings. See Shortcode and blocks.

Import and export

Export the menus you choose, with the values of their fields, and import them on the same or another site. You first see what would happen, and nothing is replaced unless you choose it. See Import and export.

For developers

  • New filters to change any value after it was sanitized: aop_sanitized_option and aop_sanitized_option_<field name>. See Hooks and filters.
  • A stable Field Types API to register your own field types. See Custom field types.

Upgrading from 0.9

Version 1.0 requires PHP 8.1 and WordPress 6.9 or later. WordPress will not activate the update on an older site.

Your menus, pages, fields and values are kept. The first time 1.0 runs, it converts the stored pages to a new format automatically. As a safety net, a copy in the old format is kept in the database for 90 days. Exports made with 0.9 can still be imported.

A field stored before 1.0 has Use in shortcode and blocks switched off, so nothing appears on your website until you switch it on.

Before you update, make an export in Options Pages → Import / Export and a backup of your database.

Going back to 0.9.11

You can go back from 1.0 to version 0.9.11, the last version before 1.0. Version 0.9.11 cannot read the new format of 1.0, so your pages have to be put back in the old format first. This only works with the backup that 1.0 made at the upgrade.

The backup

The first time 1.0 runs, it keeps the pages it converts, in the old format, in the option aop_backup_before_json. That backup is removed after 90 days, and when you delete the plugin. Developers can keep it longer with the filter aop_backup_days.

Put the pages back, then install 0.9.11

You need WP-CLI, and the order matters: put the pages back while 1.0 is still installed, because the code that does it is part of 1.0.

  1. Put the pages back as they were at the upgrade:

    wp eval 'echo AOP\App\Database\Upgrader::restoreBackup();'
    

    It prints the number of pages that were put back. 0 means there is no backup, for example because the 90 days are over: stop here, 0.9.11 would not be able to read your pages.

    Do not save a menu in the editor or import a file between this step and the next: both store the new format again, which 0.9.11 cannot read.

  2. Install 0.9.11 over 1.0:

    wp plugin install admin-options-pages --version=0.9.11 --force
    

    Without WP-CLI: download 0.9.11 under Advanced View on the plugin page on WordPress.org and upload it on Plugins → Add New Plugin → Upload Plugin.

Putting the pages back replaces all pages of the plugin. Pages you made or changed after the upgrade to 1.0 are lost.

What changes in 0.9.11

  • The values of your options stay as they are, and get_option() keeps working.
  • The shortcode [aop_option …] does not exist in 0.9.11: it is shown as plain text in your content.
  • Blocks bound to a field with Block Bindings show their own content again.