Inventory_Presser_Admin_Customize_Dashboard::change_post_updated_messages( array $msgs )
change_post_updated_messages
Contents
Description Description
Changes the messages shown to users in the editor when changes are made to the post object.
Parameters Parameters
- $msgs
-
(array) (Required)
Return Return
(array)
Source Source
File: includes/admin/class-admin-customize-dashboard.php
function change_post_updated_messages( $msgs ) { global $post; $view_link = sprintf( '<a href="%1$s">%2$s</a>', esc_url( get_permalink( $post->ID ) ), __( 'View vehicle', 'inventory-presser' ) ); $preview_link = sprintf( '<a target="_blank" href="%1$s">%2$s</a>', esc_url( get_preview_post_link( $post->ID ) ), __( 'Preview vehicle', 'inventory-presser' ) ); $scheduled_date = date_i18n( __( 'M j, Y @ H:i', 'inventory-presser' ), strtotime( $post->post_date ) ); $msgs[ INVP::POST_TYPE ] = array( 0 => '', 1 => __( 'Vehicle updated. ', 'inventory-presser' ) . $view_link, 2 => __( 'Custom field updated.', 'inventory-presser' ), 3 => __( 'Custom field updated.', 'inventory-presser' ), 4 => __( 'Vehicle updated.', 'inventory-presser' ), 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Vehicle restored to revision from %s.', 'inventory-presser' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 6 => __( 'Vehicle published. ', 'inventory-presser' ) . $view_link, 7 => __( 'Vehicle saved.', 'inventory-presser' ), 8 => __( 'Vehicle submitted. ', 'inventory-presser' ) . $preview_link, 9 => sprintf( __( 'Vehicle scheduled to list on <strong>%s</strong>. ', 'inventory-presser' ), $scheduled_date ) . $preview_link, 10 => __( 'Vehicle draft updated. ', 'inventory-presser' ) . $preview_link, ); return $msgs; }
Expand full source code Collapse full source code View on Github