Change the text on the Publish button

If you look into /wp-admin/edit-form-advanced.php, you will find the meta box: add_meta_box(‘submitdiv’, __(‘Publish’), ‘post_submit_meta_box’, $post_type, ‘side’, ‘core’); Note the __(‘Publish’) – the function __() leads to translate() where you get the filter ‘gettext’. There are two ways to handle your problem: 1. Address the string in a single specialized function (be sure to match the … Read more

How to add an admin notice upon post save/update

The reason this doesn’t work is because there is a redirection happening after the save_post action. One way you can acheive want you want is by implementing a quick work around using query vars. Here is a sample class to demonstrate: class My_Awesome_Plugin { public function __construct(){ add_action( ‘save_post’, array( $this, ‘save_post’ ) ); add_action( … Read more

How to use “menu_order” field for posts?

Apparently it’s as easy as: add_action( ‘admin_init’, ‘posts_order_wpse_91866’ ); function posts_order_wpse_91866() { add_post_type_support( ‘post’, ‘page-attributes’ ); } And then doing the query: $order_posts = new WP_Query(array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ) );

Changing the Order of Admin Menu Sections?

Hi @BinaryBit: It’s no wonder you are a bit frustrated; the admin menu is one of the most obtuse and frustrating implementations through WordPress core. Honestly, I don’t know what they were thinking when they designed it that way. @EAMann did an excellent job of explaining how the admin menus work in WordPress (I wish … Read more

adding custom stylesheet to wp-admin

According to WordPress Codex (here): admin_enqueue_scripts is the first action hooked into the admin scripts actions. Example Loading a CSS or JS files for all admin area: //from functions.php //First solution : one file //If you’re using a child theme you could use: // get_stylesheet_directory_uri() instead of get_template_directory_uri() add_action( ‘admin_enqueue_scripts’, ‘load_admin_style’ ); function load_admin_style() { … Read more

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