WP Manifestindependent plugin directory
manifest / integrations / wordpress_wpmultiplane

WPMultiplane

experimental Cockpit CMS implementation as a WordPress plugin

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/raffaelj/wordpress_wpmultiplane/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin, that integrates Cockpit CMS and CpMultiplane.

This is very experimental and not fully implemented. Feedback and pull requests are very welcome.

Requirements

PHP 7+

Permalinks must not be 'plain' Go to "Settings" --> "Permalinks" and change the radio button from "Plain" to "Post name" or something else. Otherwise the generated .htaccess file doesn't rewrite urls and url bindings won't work.

Also the .htaccess file must be changed to deliver .tag files as javascript. See templates/.htaccess.dist.

changes in libs

  • lib/cockpit/bootstrap.php: $app = new LimeExtra\App($config); --> $app = new LimeWordPress\App($config);

Problems

WordPress has no output buffer, which can cause problems with sessions. I created a simple output buffer in the run() method

Priorities in add_action hooks are in reverse order, than the priority of Cockpit events. No big problem, but confusing.

add_action('init', function() {}, 0);           // fires early
add_action('init', function() {}, 100);         // fires late
cockpit()->on('admin.init', function() {}, 0)   // fires late
cockpit()->on('admin.init', function() {}, 100) // fires early

Global scope polution

New functions in global scope:

  • cockpit()
  • mp()
  • to do... print_r(get_defined_functions()['user']);

Most things are namespaced or realized with anonymous functions.

Must have:

  • disable-google-fonts
  • disable-emojis
  • disable-embeds

Eventually:

  • disable-wp-rest-api
  • disable-blog
  • disable-comments

Simple, useful, not (very) bloated:

  • redirection
  • header-and-footer-scripts
  • the-seo-framework

to do

  • [ ] mp.js enqueue script properly (currently in Privacy module)
  • [ ] rlj-blocks: functions should be in class to avoid global scope polution
  • [ ] shortcodes for collections, mp partials...
  • [ ] cleanup

build

install dependencies:

composer install --no-dev --ignore-platform-reqs

update dependencies:

composer update --no-dev --ignore-platform-reqs

Copyright 2020 Raffael Jesche under the MIT license.

See LICENSE for more information.

Credits and third party resources

libraries

modules