Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/elemento.../modules/checklis.../steps
File: setup-header.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Elementor\Modules\Checklist\Steps;
[2] Fix | Delete
[3] Fix | Delete
use Elementor\Core\Utils\Promotions\Filtered_Promotions_Manager;
[4] Fix | Delete
use Elementor\Utils;
[5] Fix | Delete
[6] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[7] Fix | Delete
exit; // Exit if accessed directly.
[8] Fix | Delete
}
[9] Fix | Delete
[10] Fix | Delete
class Setup_Header extends Step_Base {
[11] Fix | Delete
const STEP_ID = 'setup_header';
[12] Fix | Delete
[13] Fix | Delete
public function __construct( $module, $wordpress_adapter = null, $elementor_adapter = null, $should_promote = true ) {
[14] Fix | Delete
$promotion_data = $should_promote
[15] Fix | Delete
? $this->render_promotion()
[16] Fix | Delete
: null;
[17] Fix | Delete
[18] Fix | Delete
parent::__construct( $module, $wordpress_adapter, $elementor_adapter, $promotion_data );
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
public function get_id(): string {
[22] Fix | Delete
return self::STEP_ID;
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
public function is_visible(): bool {
[26] Fix | Delete
if ( Utils::has_pro() ) {
[27] Fix | Delete
return false;
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
return parent::is_visible();
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
public function is_absolute_completed(): bool {
[34] Fix | Delete
$args = [
[35] Fix | Delete
'post_type' => 'elementor_library',
[36] Fix | Delete
'meta_query' => [
[37] Fix | Delete
'relation' => 'AND',
[38] Fix | Delete
[
[39] Fix | Delete
'key' => '_elementor_template_type',
[40] Fix | Delete
'value' => 'header',
[41] Fix | Delete
'compare' => '=',
[42] Fix | Delete
],
[43] Fix | Delete
[
[44] Fix | Delete
'key' => '_elementor_conditions',
[45] Fix | Delete
],
[46] Fix | Delete
],
[47] Fix | Delete
'posts_per_page' => 1,
[48] Fix | Delete
'fields' => 'ids',
[49] Fix | Delete
'no_found_rows' => true,
[50] Fix | Delete
'update_post_term_cache' => false,
[51] Fix | Delete
'update_post_meta_cache' => false,
[52] Fix | Delete
];
[53] Fix | Delete
$query = $this->wordpress_adapter->get_query( $args );
[54] Fix | Delete
$header_templates = $query->posts ?? [];
[55] Fix | Delete
[56] Fix | Delete
return count( $header_templates ) >= 1;
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
public function get_title(): string {
[60] Fix | Delete
return esc_html__( 'Set up a header', 'elementor' );
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
public function get_description(): string {
[64] Fix | Delete
return esc_html__( 'This element applies across different pages, so visitors can easily navigate around your site.', 'elementor' );
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
public function get_cta_text(): string {
[68] Fix | Delete
return esc_html__( 'Add a header', 'elementor' );
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
public function get_cta_url(): string {
[72] Fix | Delete
return '';
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
public function get_image_src(): string {
[76] Fix | Delete
return 'https://assets.elementor.com/checklist/v1/images/checklist-step-4.jpg';
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
public function get_is_completion_immutable(): bool {
[80] Fix | Delete
return false;
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
public function get_learn_more_url(): string {
[84] Fix | Delete
return 'https://go.elementor.com/app-website-checklist-header-article';
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
private function render_promotion() {
[88] Fix | Delete
return Filtered_Promotions_Manager::get_filtered_promotion_data(
[89] Fix | Delete
[
[90] Fix | Delete
'url' => 'https://go.elementor.com/go-pro-website-checklist-header',
[91] Fix | Delete
'text' => esc_html__( 'Upgrade Now', 'elementor' ),
[92] Fix | Delete
'icon' => 'default',
[93] Fix | Delete
],
[94] Fix | Delete
'elementor/checklist/promotion',
[95] Fix | Delete
'upgrade_url'
[96] Fix | Delete
);
[97] Fix | Delete
}
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function