Automattic / gutenberg-ramp

Control conditions under which Gutenberg loads - either from your theme code or from a UI
https://wordpress.org/plugins/gutenberg-ramp/
76 stars 15 forks source link

Issue 33 allow multiple calls to rfg #45

Closed brettshumaker closed 5 years ago

brettshumaker commented 6 years ago

33

Change to allow multiple calls to ramp_for_gutenberg_load_gutenberg()

Allows multiple function calls to ramp_for_gutenberg_load_gutenberg() and merges the criteria before saving to the database. Works by storing each set of criteria in a class variable, merging as they come in and then saves to the database during admin_init.

The last value for load that is passed into ramp_for_gutenberg_load_gutenberg() will be the one that's used. This means that while post_ids and post_types values will be merged, any call to ramp_for_gutenberg_load_gutenberg() using the load parameter will override anything set in post_ids or post_types.

mattoperry commented 6 years ago

This now needs to be rebased and further tested a bit ... so let's hold off until the next release. Looks generally okay to me, however.

brettshumaker commented 5 years ago

Close in favor of #74