Admin
3 years ago
Builder
3 years ago
Helpers
3 years ago
CFF_Autolink.php
3 years ago
CFF_Blocks.php
3 years ago
CFF_Cache.php
3 years ago
CFF_Education.php
3 years ago
CFF_Elementor_Base.php
3 years ago
CFF_Elementor_Widget.php
3 years ago
CFF_Error_Reporter.php
3 years ago
CFF_FB_Settings.php
3 years ago
CFF_Feed_Elementor_Control.php
3 years ago
CFF_Feed_Locator.php
3 years ago
CFF_Feed_Pro.php
3 years ago
CFF_GDPR_Integrations.php
3 years ago
CFF_Group_Posts.php
3 years ago
CFF_HTTP_Request.php
3 years ago
CFF_Oembed.php
3 years ago
CFF_Parse.php
3 years ago
CFF_Resizer.php
3 years ago
CFF_Response.php
3 years ago
CFF_Shortcode.php
3 years ago
CFF_Shortcode_Display.php
3 years ago
CFF_SiteHealth.php
3 years ago
CFF_Utils.php
3 years ago
CFF_View.php
3 years ago
Custom_Facebook_Feed.php
3 years ago
SB_Facebook_Data_Encryption.php
3 years ago
SB_Facebook_Data_Manager.php
3 years ago
CFF_Response.php
26 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Class CFF_Response |
| 4 | * |
| 5 | * Sends back ajax response to client end |
| 6 | * |
| 7 | * @since 4.0 |
| 8 | */ |
| 9 | namespace CustomFacebookFeed; |
| 10 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 11 | |
| 12 | class CFF_Response { |
| 13 | /** |
| 14 | * Response constructor. |
| 15 | * |
| 16 | * @param $is_success |
| 17 | * @param $data |
| 18 | * |
| 19 | * @throws \Exception |
| 20 | */ |
| 21 | public function __construct( $is_success, $data ) { |
| 22 | $is_success ? wp_send_json_success( $data ) : wp_send_json_error( $data ); |
| 23 | wp_die(); |
| 24 | } |
| 25 | } |
| 26 |