Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Profile::merge_llms_fields_errors( WP_Error $errors )
Merge llms fields errors into the passed WP_Error
Parameters Parameters
- $errors
-
(WP_Error) (Required) Instance of WP_Error, passed by reference.
Return Return
(void)
Source Source
File: includes/admin/class-llms-admin-profile.php
* @since 5.0.0
* @todo Remove the fallback when minimum required WP version will be 5.6+.
*
* @param WP_Error $errors Instance of WP_Error, passed by reference.
* @return void
*/
private function merge_llms_fields_errors( &$errors ) {
foreach ( $this->errors->get_error_codes() as $code ) {
foreach ( $this->errors->get_error_messages( $code ) as $error_message ) {
$errors->add(
$code,
sprintf(
// Translators: %1$s = Opening strong tag; %2$s = Closing strong tag; %3$s = The error message.
esc_html__( '%1$sError%2$s: %3$s', 'lifterlms' ),
'<strong>',
'</strong>',
$error_message
)
);
}
// `WP_Error::get_all_error_data()` has been introduced in WP 5.6.0.
$error_data = method_exists( $this->errors, 'get_all_error_data' ) ?
$this->errors->get_all_error_data( $code ) : $this->errors->get_error_data( $code );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |