This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function get_categories() { | |
return [ 'theme-elements' ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->start_controls_section( | |
'section_title', | |
[ | |
'label' => __( 'Section Title', 'text-domain' ), | |
'tab' => Controls_Manager::TAB_STYLE, | |
] | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Controls_Manager::add_tab( | |
'new-tab', | |
__( 'New Tab', 'text-domain' ) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_elementor_widget_categories() { | |
\Elementor\Plugin::instance()->elements_manager->add_category( | |
'theme-elements', | |
[ | |
'title' => __( 'Theme Elements', 'text-domain' ), | |
'icon' => 'fa fa-plug', | |
], | |
2 // position | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function admin_notice_minimum_php_version() { | |
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); | |
$message = sprintf( | |
/* translators: 1: Plugin Name 2: PHP 3: Required PHP version */ | |
esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'text-domain' ), | |
'<strong>' . esc_html__( 'Plugin Name', 'text-domain' ) . '</strong>', | |
'<strong>' . esc_html__( 'PHP', 'text-domain' ) . '</strong>', | |
'5.4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function admin_notice_minimum_elementor_version() { | |
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); | |
$message = sprintf( | |
/* translators: 1: Plugin Name 2: Elementor 3: Required Elementor version */ | |
esc_html__( '"%1$s" requires "%2$s" version %3$s or greater.', 'text-domain' ), | |
'<strong>' . esc_html__( 'Plugin Name', 'text-domain' ) . '</strong>', | |
'<strong>' . esc_html__( 'Elementor', 'text-domain' ) . '</strong>', | |
'2.0.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function admin_notice_missing_main_plugin() { | |
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] ); | |
$message = sprintf( | |
/* translators: 1: Plugin Name 2: Elementor */ | |
esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'text-domain' ), | |
'<strong>' . esc_html__( 'Plugin Name', 'text-domain' ) . '</strong>', | |
'<strong>' . esc_html__( 'Elementor', 'text-domain' ) . '</strong>' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Current | |
public function get_values() { | |
foreach ( $this->tabs as $tab => $settings ) { | |
foreach ( $settings['fields'] as $fields ) { | |
foreach ( (array)$fields as $f ) { | |
if ( isset( $f['name'] ) ) | |
$this->parameters[$f['name']] = $this->get_value($f); | |
elseif($f['type'] == 'selects' && isset($f['selects'])) { |