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

Change to allow multiple calls to gutenberg_ramp_load_gutenberg() #74

Closed brettshumaker closed 5 years ago

brettshumaker commented 5 years ago

Allows multiple function calls to gutenberg_ramp_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 gutenberg_ramp_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 gutenberg_ramp_load_gutenberg() using the load parameter will override anything set in post_ids or post_types.