Skip to content

Instantly share code, notes, and snippets.

@contemplate
Created November 11, 2022 23:53
Show Gist options
  • Save contemplate/e69abfadcee9bc2eea6729ac80f4163b to your computer and use it in GitHub Desktop.
Save contemplate/e69abfadcee9bc2eea6729ac80f4163b to your computer and use it in GitHub Desktop.
MyBookTable get_user performance enhancement
<?php foreach( get_users( array( 'role__in' => array( 'administrator', 'editor', 'author', 'contributor' ) ) ) as $author) { ?>
@contemplate
Copy link
Author

contemplate commented Nov 11, 2022

FILE: mybooktable/includes/metaboxes.php
Replace line 140:
<?php foreach( get_users( ) as $author) { ?>

Then Line 32
Add the following line to the function: mbt_add_metaboxes()
add_filter( ‘update_user_metadata_cache’, ‘__return_false’ );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment