get_option('proofing_send_email' ) === 'off' ){ return; } $album_title = get_the_title($album_id); $album_link = get_permalink($album_id); $to = $apollo13framework_a13->get_option( 'proofing_email' ); if( empty( $to ) || ! is_email( $to ) ){ $to = get_option('admin_email'); } $subject = sprintf( __('Album %s is marked as finished in photo proofing process', 'a13_framework_cpt'), $album_title ); /** @noinspection HtmlUnknownTarget */ $message = sprintf( __('Your client have marked %2$s album as finished in photo proofing process. Visit it to check what is selected.', 'a13_framework_cpt'), esc_url($album_link), esc_html($album_title) ); //try to send e-mail a13fe_album_send_admin_mail( $to, $subject, $message ); }