Change the text of the publish button to Save

Put below code into your theme functions.php and try function change_publish_button( $translation, $text ) { if ( $text == ‘Publish…’ ) // Your button text $text=”Save”; return $text; } add_filter( ‘gettext’, ‘change_publish_button’, 10, 2 ); This one is worked for me Hope it will help you!

Get publish post link?

I used URL parameters and created a specific function called at init: add_action( ‘init’, ‘publish_post_status’ ); function publish_post_status($post_id){ if (isset($_GET[‘publish’]) && current_user_can(‘publish_posts’)) { if ($_GET[‘publish’] == “true”) { $current_post = get_post( $_GET[‘post_id’], ‘ARRAY_A’ ); $current_post[‘post_status’] = ‘publish’; wp_update_post($current_post); } } if (isset($_GET[‘queue’])) { if ($_GET[‘queue’] == “true”) { $current_post = get_post( $_GET[‘post_id’], ‘ARRAY_A’ ); $current_post[‘post_status’] … Read more

Custom save button shows ‘Are you sure you want to…’ dialog

SOLVED: Found the solution. Trick is to disable the autosave. But take care to only do this on a non-ajax save. add_action( ‘admin_enqueue_scripts’, ‘my_admin_enqueue_scripts’ ); function my_admin_enqueue_scripts() { if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return false; // don’t disable if it is an auto-autosave if ( ‘POST_TYPE’ == get_post_type() ){ wp_dequeue_script( ‘autosave’ ); … Read more

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