Hello Misty,
Try following PHP snippet to customize post save confirmation messages.
/**
* Customize save post messages.
*/
function gd_snippet_200317_save_post_message( $message, $post_data ) {
if ( empty( $post_data['post_parent'] ) && $post_data['post_status'] != 'publish' ) {
$post = new stdClass();
$post->ID = $post_data['ID'];
$link = GeoDir_Post_Data::get_preview_link( $post );
} else {
$link = get_permalink( $post_data['ID'] );
}
$post_type = get_post_type( $post_data['ID'] );
if ( ! empty( $post_data['post_parent'] ) ) {
// Update post
if ( $post_data['post_status'] == 'publish' ) {
// Published
if ( $post_type == 'gd_apartments' ) {
$message = wp_sprintf( __( 'Apartment update received, your changes are now live and can be viewed %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
} elseif ( $post_type == 'gd_business' ) {
$message = wp_sprintf( __( 'Business update received, your changes are now live and can be viewed %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
}
} else {
// Pending
if ( $post_type == 'gd_apartments' ) {
$message = __( 'Apartment update received, your changes may need to be reviewed before going live.', 'geodirectory' );
} elseif ( $post_type == 'gd_business' ) {
$message = __( 'Business update received, your changes may need to be reviewed before going live.', 'geodirectory' );
}
}
} else {
// New post
if ( $post_data['post_status'] == 'publish' ) {
// Published
if ( $post_type == 'gd_apartments' ) {
$message = wp_sprintf( __( 'Apartment listing received, your apartment listing is now live and can be viewed %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
} elseif ( $post_type == 'gd_business' ) {
$message = wp_sprintf( __( 'Business listing received, your business listing is now live and can be viewed %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
}
} else {
// Pending
if ( $post_type == 'gd_apartments' ) {
$message = wp_sprintf( __( 'Apartment listing received, your apartment listing may need to be reviewed before going live, you can preview it %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
} elseif ( $post_type == 'gd_business' ) {
$message = wp_sprintf( __( 'Business listing received, your business listing may need to be reviewed before going live, you can preview it %shere%s.', 'geodirectory' ), "<a href='" . $link . "'>", "</a>" );
}
}
}
return $message;
}
add_filter( 'geodir_ajax_save_post_message', 'gd_snippet_200317_save_post_message', 20, 2 );
Regards,
Kiran