local WAMP admin user has lost privileges

This sounds like a Folder Permissions problems – the MAMP Apache user needs to have read/write privileges on everything under your Sites/wordpress/ folder. This is easy to do from the terminal … my post on Permissions should help can i run wp as root permissions

Prevent users from changing post status

Add this code where it’s should be (plugin/functions.php/mu-plugin) – simple “hide” method using css. add_action(‘admin_print_styles-post.php’, ‘hide_publishing_block_using_css’); add_action(‘admin_print_styles-post-new.php’, ‘hide_publishing_block_using_css’); function hide_publishing_block_using_css(){ echo ‘<style>#misc-publishing-actions{display:none;}</style>’; }

TinyMCE buttons broken

Solved: It appears chrome had a corrupt cache as I attempted to visit the backend on Firefox and noticed that the issue wasn’t there. I had to delete all Chrome browsing data (cache alone wouldn’t do it).

Calculate and save an average in a meta

You can accomplish this via the save_post action: add_action( ‘save_post’, ‘wpa78558_save_average_meta’, 100 ); function wpa78558_save_average_meta( $post_id ) { if ( !wp_is_post_revision( $post_id ) ) { $graphics = get_field(‘graphics’, $post_id); $gameplay = get_field(‘game-play’, $post_id); $life = get_field(‘life’, $post_id); $sound = get_field(‘sound’, $post_id); $overall = $graphics + $gameplay + $life + $sound; $overall = $overall / 4; … Read more

loop and in admin header problem

Move the query part to a separate function that returns the data you need: function rs_get_scripts_data(){ $array = array(); // query + add stuff to array return $array; } and use it with wp_localize_script like: $array = rs_get_scripts_data(); $myscript_vars = array( ‘array’ => $array ); wp_localize_script( ‘myscript’, ‘myscript’, $myscript_vars );

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