return $data['pro_widgets'];
}
/**
* Get templates data.
*
* Retrieve the templates data from a remote server.
*
* @since 2.0.0
* @access public
* @static
*
* @param bool $force_update Optional. Whether to force the data update or
* not. Default is false.
*
* @return array The templates data.
*/
public static function get_library_data( $force_update = false ) {
self::get_info_data( $force_update );
$library_data = get_option( self::LIBRARY_OPTION_KEY );
if ( empty( $library_data ) ) {
return [];
}
return $library_data;
}
/**
* Get feed data.
*
* Retrieve the feed info data from remote elementor server.
*
* @since 1.9.0
* @access public
* @static
*
* @param bool $force_update Optional. Whether to force the data update or
* not. Default is false.
*
* @return array Feed data.
*/
public static function get_feed_data( $force_update = false ) {
self::get_info_data( $force_update );
$feed = get_option( self::FEED_OPTION_KEY );
if ( empty( $feed ) ) {
return [];
}
return $feed;
}
public static function get_deactivation_data() {
$data = self::get_info_data( true, 'deactivated' );
if ( empty( $data['deactivate_data'] ) ) {
return false;
}
return $data['deactivate_data'];
}
public static function get_uninstalled_data() {
$data = self::get_info_data( true, 'uninstalled' );
if ( empty( $data['uninstall_data'] ) ) {
return false;
}
return $data['uninstall_data'];
}
/**
* Get template content.
*
* Retrieve the templates content received from a remote server.
*
* @since 1.0.0
* @access public
* @static
*
* @param int $template_id The template ID.
*
* @return object|\WP_Error The template content.
*/
public static function get_template_content( $template_id ) {
/** @var Library $library */
$library = Plugin::$instance->common->get_component( 'connect' )->get_app( 'library' );
return $library->get_template_content( $template_id );
}
/**
* Send Feedback.
*
* Fires a request to Elementor server with the feedback data.
*
* @since 1.0.0
* @access public
* @static
*
* @param string $feedback_key Feedback key.
* @param string $feedback_text Feedback text.
*
* @return array The response of the request.
*/
public static function send_feedback( $feedback_key, $feedback_text ) {
return wp_remote_post( self::$api_feedback_url, [
'timeout' => 30,
'body' => [
'api_version' => ELEMENTOR_VERSION,
'site_lang' => get_bloginfo( 'language' ),
'feedback_key' => $feedback_key,
'feedback' => $feedback_text,
],
] );
}
/**
* Ajax reset API data.
*
* Reset Elementor library API data using an ajax call.
*
* @since 1.0.0
* @access public
* @static
*/
public static function ajax_reset_api_data() {
check_ajax_referer( 'elementor_reset_library', '_nonce' );
if ( ! current_user_can( 'manage_options' ) ) {
wp_send_json_error( 'Permission denied' );
}
self::get_info_data( true );
wp_send_json_success();
}
/**
* Init.
*
* Initialize Elementor API.
*
* @since 1.0.0
* @access public
* @static
*/
public static function init() {
add_action( 'wp_ajax_elementor_reset_library', [ __CLASS__, 'ajax_reset_api_data' ] );
}
}
Fatal error: Uncaught Error: Class 'Elementor\Api' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php:769
Stack trace:
#0 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php(673): Elementor\Plugin->init_components()
#1 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('')
#2 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /var/www/html/dportilho.com.br/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /var/www/html/dportilho.com.br/web/wp-settings.php(704): do_action('init')
#5 /var/www/html/dportilho.com.br/web/wp-config.php(126): require_once('/var/www/html/d...')
#6 /var/www/html/dportilho.com.br/web/wp-load.php(50): require_once('/var/www/html/d...')
#7 /var/www/html/dportilho.com.br/web/wp-blog-header.php(13): require_once('/var/www/html/d...')
#8 /var/www/html/dportilho.com.br/web/index.php(17): require('/var/www/html/d...' in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php on line 769