Ways to disable or limit WordPress postmeta caching

I don’t have full confirmation that they no longer see out of memory issues, but from logging the memory usage at shutdown it appears that this memory issue has likely been reduced by setting the following option in the get_posts call in cartflows: ‘update_post_meta_cache’ => false Obviously this isn’t ideal as a plugin update will … Read more

WordPress custom css/js version not loading correct

It’s not clear if you’re trying to load these files on frontend or backend. For the backend I usually do this: define(‘MY_PLUGIN_DIR_URL’, plugin_dir_url(__FILE__)); //LOAD ADMIN/BACKEND CSS STYLES add_action(‘admin_enqueue_scripts’, ‘my_plugin_enqueue_style_and_scripts’, 99); function my_plugin_enqueue_style_and_scripts() { $timestamp = time(); wp_enqueue_style(‘my-plugin-backend’, MY_PLUGIN_DIR_URL.’/css/style.css’, false, $timestamp, ‘all’); wp_enqueue_script( ‘my-plugin-backend’, MY_PLUGIN_DIR_URL.’/js/script.js’, array( ‘signature’ ), $timestamp, true ); } You doesn’t need to … Read more

How to clear capabilities cache?

That added the Settings menu at the left for a logged in Author. Because the author role now has the required capabilities. Then I removed the second line above and the Settings menu remains! That’s because role data is stored in dedicated tables the same way as user meta and posts. It’s not like post … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)