Skip to content
This repository has been archived by the owner on Aug 24, 2018. It is now read-only.

Prepare plugin for life after core merge #59

Merged
merged 9 commits into from
May 11, 2017
Merged

Conversation

westonruter
Copy link
Contributor

@westonruter westonruter commented Apr 10, 2017

Once we do the initial core merge, we should be able to continue working on the plugin which should override what is in core so that the plugin always provides the latest and greatest state of the features.

  • Figure out how to manage upgrading/overriding the PHP classes.

@westonruter westonruter changed the title Prepare plugin for life after core merge [WIP] Prepare plugin for life after core merge Apr 10, 2017
@obenland
Copy link
Contributor

Figure out how to manage upgrading/overriding the PHP classes.

We could define empty/abstract core widget classes if they don't exist and extend them with plugin-specific ones.

if ( ! class_exists( 'WP_Widget_Gallery' ) ) :
    class WP_Widget_Gallery {
        public function __construct()
    }
endif;

class WP_Widget_Gallery_4_9 extends WP_Widget_Gallery {}

@westonruter westonruter changed the title [WIP] Prepare plugin for life after core merge Prepare plugin for life after core merge Apr 11, 2017
@westonruter
Copy link
Contributor Author

@obenland I found an alternative method/hack for facilitating this plugin to continue to be developed even once the media widgets have been merged into core. I found wp_maybe_load_widgets() and realized I could replace it with our own forked version to load an old default-widgets.php and then the widget PHP classes from our plugin instead of the ones that would have been included in core.

Naturally we can wait to merge this until we're about to commit the patch to trunk.

@westonruter westonruter merged commit 1089ca3 into master May 11, 2017
@westonruter westonruter deleted the post-core-merge branch May 11, 2017 21:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants