Dashboard menu missing

The problem was in the names of the meta keys of the wpAA_users table: instead of using wp_capabilities and wp_user_level I should have used the actual prefix, that is wpAA_capabilities and wpAA_user_level. With these modifications I can now access the site as administrator.

Admin pages, edit notes of the title of posts and pages

Welcome! Those areas you have marked with a red border is called Post states. In order to modify post states you can use display_post_states filter. The following example adds the post id to states. function my_custom_display_post_states( $states, $post ) { // Add post id. $states[‘my_custom_state’] = $post->ID; return $states; } add_filter( ‘display_post_states’, ‘my_custom_display_post_states’, 10, 2 … Read more

Trigger a custom function when option are saved in admin area

Here is the solution: update_option_{option_name}: Runs after the option with name “option_name” has been updated. For example, for the option with name “foo”: add_action(‘update_option_foo’, ‘my_custom_function’, 10, 2); update_option: Runs before an option gets updated. Example: add_action(‘update_option’, ‘my_custom_function’, 10, 3); updated_option: Runs after an an option has been updated. Example: add_action(‘updated_option’, ‘my_custom_function’, 10, 3);