View hide_admin_update_msg.php
/* | |
Purpose: Remove Wordpress Update Message under Admin Bar(Top Menu Bar) | |
Version Tested: 3.6 | |
Reference: | |
http://www.wpbeginner.com/wp-tutorials/how-to-hide-the-wordpress-upgrade-message-in-the-dashboard/ | |
http://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices | |
*/ | |
function wp_custom_admin_hide_update() { | |
remove_action( 'admin_notices', 'update_nag', 3 ); |
View remove_post_edit_field
/* | |
Purpose: Remove edit field in post edit page, example is "title" and "editor" | |
Version Tested: 3.8 | |
Original Reference: | |
http://wordpress.org/support/topic/remove-title-and-edit-box-from-edit-post-screen?replies=6 | |
*/ | |
function wp_remove_input_field() | |
{ | |
remove_post_type_support('post', 'title'); |
View wp_disable_metabox_order_save.php
/* | |
Purpose: Disable metabox dragging order save to DB | |
Version Tested: 3.8 | |
Original Reference: | |
1 http://wordpress.stackexchange.com/questions/2025/removing-metabox-for-slug-without-removing-functionality | |
2 http://wordpress.stackexchange.com/questions/2474/disable-dragging-of-meta-boxes | |
3 http://stackoverflow.com/questions/3399851/how-do-i-stop-wordpress-dashboard-widgets-from-being-dragged/3477209#3477209 | |
*/ | |
function wp_prevent_meta_box_order_save($action) |
View wp_modify_text
/* | |
Purpose: modify text, it modify the output from the translated text pool | |
Version Tested: 3.8 | |
Original Reference: | |
http://botcrawl.com/how-to-change-the-posts-menu-title-to-articles-in-the-wordpress-dashboard/ | |
*/ | |
function change_post_to_article($translated) { | |
$translated = str_ireplace('Post', 'Article', $translated); |
View wp_custom_edit_post_column.php
/* | |
Version Tested: 3.6, 3.8 | |
*/ | |
/* Display custom column */ | |
function display_posts_stickiness( $column, $post_id ) { | |
the_author(); | |
} | |
add_action( 'manage_posts_custom_column' , 'display_posts_stickiness', 10, 2 ); |
View add_custom_column_to_edit_tag.php
/* | |
Purpose: add custom column header and custom column content to respective custom header in Manage Category Editing Page | |
Version Tested: 3.8 | |
Story: | |
Because I found no explanation nor documents in Wordpress.org, I tried to trace the code in wp-admin folder | |
after understanding the operation of apply_filter(), add_action() and add_filter() | |
Logic: | |
The table list in edit_tag.php is based on |
View wp_custom_admin_bar
/* | |
top admin toolbar aka admin bar | |
remove unnecessary admin toolbar items | |
Version Tested: 3.6, 3.8 | |
Reference: | |
http://wordpress.stackexchange.com/questions/47824/modify-admin-bar-link | |
*/ | |
function custom_admin_bar_link() { | |
global $wp_admin_bar; |
View wp_mysql_queries.sql
Reset positions of metaboxes in admin | |
SELECT * | |
FROM `wp_usermeta` | |
WHERE `user_id` =1 | |
AND `meta_key` LIKE '%meta-box%' |
View common_mysql.sql
#Select desired table and create "drop table" command for the them | |
SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) | |
AS statement FROM information_schema.tables WHERE table_schema = 'SCHEMA_NAME' and table_name LIKE 'SOMETHING%'; | |
Then copy and paste the result to use. | |
### | |
View wp_custom_admin_dashboard.php
/* | |
Custom admin dashboard | |
remove unnecessary admin dashboard panel | |
remove welcome panel | |
remove help tab | |
remove screen optons tab | |
remove color scheme picker | |
redirect after login | |
add custom widgets | |
with capabilities check example |
OlderNewer