WP Manifestindependent plugin directory
manifest / integrations / wordpress_wpmultiplane

WPMultiplane

experimental Cockpit CMS implementation as a WordPress plugin

by Raffael Jesche · github.com/raffaelj/wordpress_wpmultiplane

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/raffaelj/wordpress_wpmultiplane/archive/refs/heads/master.zip

Readme

WPMultiplane

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.

Recommended WP addons

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 and License

Copyright 2020 Raffael Jesche under the MIT license.

See LICENSE for more information.

Credits and third party resources

libraries

modules

Read the full README on GitHub →