Astra_Abilities_Response::error( string $message, string $suggestion = '' )
Create an error response.
Description
Parameters
- $message
-
(string) (Required) Error message.
- $suggestion
-
(string) (Optional) suggestion.
Default value: ''
Return
(array) Standardized error response.
Source
File: inc/abilities/class-astra-abilities-response.php
public static function error( $message, $suggestion = '' ) {
$response = array(
'success' => false,
'message' => $message,
);
if ( ! empty( $suggestion ) ) {
$response['suggestion'] = $suggestion;
}
return $response;
}
Expand full source code Collapse full source code View on Trac
Related
Used By
| Used By | Description |
|---|---|
| inc/abilities/customizer/header/transparent/class-astra-update-transparent-header.php: Astra_Update_Transparent_Header::execute() |
Execute the ability. |
| inc/abilities/customizer/header/transparent/class-astra-get-transparent-header.php: Astra_Get_Transparent_Header::execute() |
Execute the ability. |
| inc/abilities/customizer/general/scroll-to-top/class-astra-get-scroll-to-top.php: Astra_Get_Scroll_To_Top::execute() |
Execute the ability. |
| inc/abilities/customizer/general/scroll-to-top/class-astra-update-scroll-to-top.php: Astra_Update_Scroll_To_Top::execute() |
Execute the ability. |
| inc/abilities/customizer/general/sidebar/class-astra-update-sidebar-layout.php: Astra_Update_Sidebar_Layout::execute() |
Execute the ability. |
| inc/abilities/customizer/general/sidebar/class-astra-update-sidebar-width.php: Astra_Update_Sidebar_Width::execute() |
Execute the ability. |
| inc/abilities/customizer/general/sidebar/class-astra-update-sidebar-style.php: Astra_Update_Sidebar_Style::execute() |
Execute the ability. |
| inc/abilities/customizer/posttypes/blog/class-astra-update-single-page.php: Astra_Update_Single_Page::execute() |
Execute the ability. |
| inc/abilities/customizer/general/breadcrumb/class-astra-get-breadcrumb.php: Astra_Get_Breadcrumb::execute() |
Execute the ability. |
| inc/abilities/customizer/general/breadcrumb/class-astra-update-breadcrumb.php: Astra_Update_Breadcrumb::execute() |
Execute the ability. |
| inc/abilities/customizer/general/sidebar/class-astra-update-sticky-sidebar.php: Astra_Update_Sticky_Sidebar::execute() |
Execute the ability. |
| inc/abilities/customizer/general/sidebar/class-astra-update-sidebar.php: Astra_Update_Sidebar::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/typography/class-astra-toggle-underline-links.php: Astra_Toggle_Underline_Links::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/colors/class-astra-get-global-palette.php: Astra_Get_Global_Palette::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/colors/class-astra-update-global-palette.php: Astra_Update_Global_Palette::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/colors/class-astra-update-background-colors.php: Astra_Update_Background_Colors::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/colors/class-astra-update-theme-colors.php: Astra_Update_Theme_Colors::execute() |
Execute the ability. |
| inc/abilities/customizer/posttypes/blog/class-astra-update-single-post.php: Astra_Update_Single_Post::execute() |
Execute the ability. |
| inc/abilities/customizer/posttypes/blog/class-astra-update-blog-archive.php: Astra_Update_Blog_Archive::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/container/class-astra-update-container-layout.php: Astra_Update_Container_Layout::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/buttons/class-astra-update-global-buttons.php: Astra_Update_Global_Buttons::execute() |
Execute the ability. |
| inc/abilities/customizer/globals/typography/class-astra-update-paragraph-margin.php: Astra_Update_Paragraph_Margin::execute() |
Execute the ability. |
| inc/abilities/customizer/siteidentity/class-astra-update-site-title-logo.php: Astra_Update_Site_Title_Logo::execute() |
Execute the ability. |
| inc/abilities/customizer/footer/class-astra-update-footer-builder-design.php: Astra_Update_Footer_Builder_Design::execute() |
Execute the ability. |
| inc/abilities/customizer/footer/class-astra-get-footer-builder.php: Astra_Get_Footer_Builder::execute() |
Execute the ability. |
| inc/abilities/customizer/footer/class-astra-get-footer-builder-design.php: Astra_Get_Footer_Builder_Design::execute() |
Execute the ability. |
| inc/abilities/customizer/footer/class-astra-update-footer-builder.php: Astra_Update_Footer_Builder::execute() |
Execute the ability. |
| inc/abilities/customizer/header/class-astra-get-header-builder.php: Astra_Get_Header_Builder::execute() |
Execute the ability. |
| inc/abilities/customizer/header/class-astra-update-header-builder.php: Astra_Update_Header_Builder::execute() |
Execute the ability. |
| inc/abilities/customizer/header/class-astra-migrate-header-components.php: Astra_Migrate_Header_Components::execute() |
Execute the ability. |
| inc/abilities/customizer/header/class-astra-get-header-builder-design.php: Astra_Get_Header_Builder_Design::execute() |
Execute the ability. |
| inc/abilities/customizer/header/class-astra-update-header-builder-design.php: Astra_Update_Header_Builder_Design::execute() |
Execute the ability. |
| inc/abilities/class-astra-abilities-response.php: Astra_Abilities_Response::from_wp_error() |
Create an error response from WP_Error. |
| inc/abilities/admin/settings/performance/class-astra-get-preload-local-fonts.php: Astra_Get_Preload_Local_Fonts::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-get-performance.php: Astra_Get_Performance::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-update-load-google-fonts-locally.php: Astra_Update_Load_Google_Fonts_Locally::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-get-load-google-fonts-locally.php: Astra_Get_Load_Google_Fonts_Locally::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-flush-local-fonts.php: Astra_Flush_Local_Fonts::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-update-performance.php: Astra_Update_Performance::execute() |
Execute the ability. |
| inc/abilities/admin/settings/performance/class-astra-update-preload-local-fonts.php: Astra_Update_Preload_Local_Fonts::execute() |
Execute the ability. |