Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/elemento.../app/modules/kit-libr.../data
File: base-controller.php
<?php
[0] Fix | Delete
namespace Elementor\App\Modules\KitLibrary\Data;
[1] Fix | Delete
[2] Fix | Delete
use Elementor\Plugin;
[3] Fix | Delete
use Elementor\Data\V2\Base\Controller;
[4] Fix | Delete
use Elementor\Core\Utils\Collection;
[5] Fix | Delete
use Elementor\Modules\Library\User_Favorites;
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit; // Exit if accessed directly.
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
abstract class Base_Controller extends Controller {
[12] Fix | Delete
/**
[13] Fix | Delete
* @var Repository
[14] Fix | Delete
*/
[15] Fix | Delete
private $repository;
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* @return Repository
[19] Fix | Delete
*/
[20] Fix | Delete
public function get_repository() {
[21] Fix | Delete
if ( ! $this->repository ) {
[22] Fix | Delete
/** @var \Elementor\Core\Common\Modules\Connect\Module $connect */
[23] Fix | Delete
$connect = Plugin::$instance->common->get_component( 'connect' );
[24] Fix | Delete
[25] Fix | Delete
$subscription_plans = ( new Collection( $connect->get_subscription_plans() ) )
[26] Fix | Delete
->map( function ( $value ) {
[27] Fix | Delete
return $value['label'];
[28] Fix | Delete
} );
[29] Fix | Delete
[30] Fix | Delete
$this->repository = new Repository(
[31] Fix | Delete
$connect->get_app( 'kit-library' ),
[32] Fix | Delete
new User_Favorites( get_current_user_id() ),
[33] Fix | Delete
$subscription_plans
[34] Fix | Delete
);
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
return $this->repository;
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function