Repository navigation
2.0.0
Multipage becomes Post Chapters, a plugin of its own: new name, slug post-chapters, text domain post-chapters and code prefix pchap. The WordPress.org listing of Multipage (sgr-nextpage-titles) stays with its original author. Content and settings need no change: everything stored in the database or in the posts keeps its name.
Migrating from Multipage
- Install and activate Post Chapters. While Multipage is active, Post Chapters stays idle and shows an admin notice
- Deactivate Multipage. On the next admin page load, the 2.0 upgrade routine (database version 2000) moves a pending subpage index rebuild from the
mpp_rebuild_postmeta_batchWP-Cron event topchap_rebuild_postmeta_batch - Delete the
sgr-nextpage-titlesfolder over FTP or SSH. Do not use Delete on the Plugins screen: the uninstall routine of Multipage 1.5.15 to 1.7.1 erases the options and the_mpp_datameta that Post Chapters reuses (the uninstall routine of Post Chapters erases them too, and now also clears the old WP-Cron event)
Kept for compatibility
- The
[nextpage]shortcode and themultipage/subpageblock name (stored in the posts; the blocksave()output is unchanged) - The option names (
mpp-*,_mpp-*,_mpp_db_version, the 1.3multipageoption) and the_mpp_datapost meta - The HTML classes (
.mpp-toc-container,.mpp-toc,.mpp-post-navigation...) and thedata-mpp-titleattribute of the classic editor placeholders - Theme stylesheets named
css/multipage[-rtl][.min].css: still loaded, aftercss/post-chapters[-rtl][.min].cssin the same theme (child theme first, then parent theme) - The
wp multipageWP-CLI command, now an alias ofwp post-chapters
Changed
- Plugin name Post Chapters, main file
post-chapters.php, plugin folderpost-chapters, text domainpost-chapters,Update URI: https://github.com/PaulArgoud/post-chapters - Interface wording: subpage becomes chapter everywhere (block title "Chapter", editor buttons, settings, admin notices, WP-CLI output). The fallback title of an untitled page is "Chapter N" (was "Page N"), and the "page #" row labels of the table of contents read "Chapter #" (the stored option value is still
page). Translations updated in French, German, Italian and Spanish - Settings pages:
options-general.php?page=post-chaptersand?page=post-chapters-advanced(werempp-settingsandmpp-advanced-settings); the settings groups were renamed the same way - Object cache group
post-chapters(wasmultipage), frontend style handlepost-chapters/{theme}-post-chapters, TinyMCE pluginpostchapters, TinyMCE commandPCHAP_Subpage - Files renamed:
class-pchap.php,classes/class-pchap-*.php,inc/pchap-*.php,css/post-chapters*.css,admin/css/post-chapters-admin*.css,inc/admin/tinymce/css/post-chapters*.css,languages/post-chapters-*. Release archivepost-chapters.zip
Removed (breaking for custom code)
- Every
mpp_*/_mpp_*function, theMultipage,Multipage_Parser,MPP_Admin,Multipage_Plugin_ShortcodesandMPP_CLI_Commandclasses, themultipage()accessor and theMPP_*constants. They are renamed (pchap_*,_pchap_*,PChap,PChap_Parser,PChap_Admin,PChap_Shortcodes,PChap_CLI_Command,pchap(),PCHAP_*) without aliases: Multipage defines the old names, and both plugins can be installed side by side during the migration. The public$mpp_dataproperty of the main instance is now$pchap_data;mpp_load_multipage_textdomain()is nowpchap_load_textdomain()
Deprecated
- The
mpp_*hooks. Every hook is now fired aspchap_*(e.g.pchap_toc,pchap_the_content,pchap_get_toc_position,pchap_on_update); callbacks attached to the oldmpp_*name still run, after thepchap_*ones and with the same arguments, throughapply_filters_deprecated()/do_action_deprecated()(a notice is logged whenWP_DEBUGis on). New helperspchap_apply_filters()andpchap_do_action()
Added
- Coexistence guard:
pchap_is_multipage_active()detects an active Multipage (an existingsgr-nextpage-titles.phpin any active plugin folder, or theMultipageclass); Post Chapters then loads nothing but an admin notice telling how to switch safely - 2.0 upgrade routine
pchap_update_to_2_0()(database version 2000) - Tests for the deprecated hooks, the guard and the 1.7 to 2.0 update (401 tests)