到目前为止,这个解决方案似乎有效。
add_filter(\'screen_layout_columns\', \'one_column_on_screen_options\');
function one_column_on_screen_options($columns) {
$columns[\'post\'] = 1;
return $columns;
}
// Ignore user preferences stored in DB, and serve only one column layout
add_filter(\'get_user_option_screen_layout_post\', \'one_column_layout\');
function one_column_layout($option) {
return 1;
}
add_action( \'add_meta_boxes_sliding_panel\', \'sds_do_meta_boxes\', 0, 1 );
function sds_do_meta_boxes( $post )
{
remove_meta_box( \'submitdiv\', \'sliding_panel\', \'side\' );
add_meta_box( \'submitdiv\', __( \'Publish\' ), \'post_submit_meta_box\', \'sliding_panel\', \'normal\', \'high\', null );
}
function translate_publish( $translated_text, $untranslated_text, $domain ) {
if( stripos( $untranslated_text, \'Publish\' ) !== FALSE ) {
$translated_text = str_ireplace( \'Publish\', \'Save\', $untranslated_text ) ;
}
return $translated_text;
}
if(is_admin()){
add_filter( \'gettext\', \'translate_publish\', 99, 3 );
}