prakai / wcms-_modern_settings

Replace a new look of WonderCMS settings
0 stars 1 forks source link

Preparing for 2.0.3 #1

Open robiso opened 7 years ago

robiso commented 7 years ago

The upcoming version of WonderCMS will have priorities for hooks.

All you other plugins will not need to be updated, except for Modern settings needs changing on line 230:

if(($k = array_search('displayModernSettings', wCMS::$_listeners['settings'])) !== false) {
            unset(wCMS::$_listeners['settings'][$k]);
        }

should be updated to

if(($k = array_search('displayModernSettings', wCMS::$_listeners['settings'][10])) !== false) {
            unset(wCMS::$_listeners['settings'][10][$k]);
        }

You can read more about this incoming feature here: https://github.com/robiso/wondercms/pull/24

robiso commented 7 years ago

To add to my previous comment, this is just to avoid any conflicts. You can also set the priority for the plugin to 1 in this case because you'd need it.