Skip to content

Instantly share code, notes, and snippets.

@pickplugins
Created December 29, 2022 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pickplugins/cc6709a6fd09f3574dc79af172531cd8 to your computer and use it in GitHub Desktop.
Save pickplugins/cc6709a6fd09f3574dc79af172531cd8 to your computer and use it in GitHub Desktop.
const { applyFilters, doAction, addFilter } = wp.hooks;
let some_option = applyFilters('some-option', [{ label: 'Some Option' }]);
addFilter('some-option', 'post-grid/post-grid/queryPrams', function (options) {
//console.log(options);
// Add another options object to the array.
//options.push({ label: 'Another Option' });
return options;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment