includes/elementor-functions.php 0000644 00000015570 15237733363 0013107 0 ustar 00 register_tab( 'hello-settings-header', HelloElementor\Includes\Settings\Settings_Header::class );
$kit->register_tab( 'hello-settings-footer', HelloElementor\Includes\Settings\Settings_Footer::class );
}, 1, 40 );
}
}
/**
* Helper function to return a setting.
*
* Saves 2 lines to get kit, then get setting. Also caches the kit and setting.
*
* @param string $setting_id
* @return string|array same as the Elementor internal function does.
*/
function hello_elementor_get_setting( $setting_id ) {
global $hello_elementor_settings;
$return = '';
if ( ! isset( $hello_elementor_settings['kit_settings'] ) ) {
$kit = \Elementor\Plugin::$instance->kits_manager->get_active_kit();
$hello_elementor_settings['kit_settings'] = $kit->get_settings();
}
if ( isset( $hello_elementor_settings['kit_settings'][ $setting_id ] ) ) {
$return = $hello_elementor_settings['kit_settings'][ $setting_id ];
}
return apply_filters( 'hello_elementor_' . $setting_id, $return );
}
/**
* Helper function to show/hide elements
*
* This works with switches, if the setting ID that has been passed is toggled on, we'll return show, otherwise we'll return hide
*
* @param string $setting_id
* @return string|array same as the Elementor internal function does.
*/
function hello_show_or_hide( $setting_id ) {
return ( 'yes' === hello_elementor_get_setting( $setting_id ) ? 'show' : 'hide' );
}
/**
* Helper function to translate the header layout setting into a class name.
*
* @return string
*/
function hello_get_header_layout_class() {
$layout_classes = [];
$header_layout = hello_elementor_get_setting( 'hello_header_layout' );
if ( 'inverted' === $header_layout ) {
$layout_classes[] = 'header-inverted';
} elseif ( 'stacked' === $header_layout ) {
$layout_classes[] = 'header-stacked';
}
$header_width = hello_elementor_get_setting( 'hello_header_width' );
if ( 'full-width' === $header_width ) {
$layout_classes[] = 'header-full-width';
}
$header_menu_dropdown = hello_elementor_get_setting( 'hello_header_menu_dropdown' );
if ( 'tablet' === $header_menu_dropdown ) {
$layout_classes[] = 'menu-dropdown-tablet';
} elseif ( 'mobile' === $header_menu_dropdown ) {
$layout_classes[] = 'menu-dropdown-mobile';
} elseif ( 'none' === $header_menu_dropdown ) {
$layout_classes[] = 'menu-dropdown-none';
}
$hello_header_menu_layout = hello_elementor_get_setting( 'hello_header_menu_layout' );
if ( 'dropdown' === $hello_header_menu_layout ) {
$layout_classes[] = 'menu-layout-dropdown';
}
return implode( ' ', $layout_classes );
}
/**
* Helper function to translate the footer layout setting into a class name.
*
* @return string
*/
function hello_get_footer_layout_class() {
$footer_layout = hello_elementor_get_setting( 'hello_footer_layout' );
$layout_classes = [];
if ( 'inverted' === $footer_layout ) {
$layout_classes[] = 'footer-inverted';
} elseif ( 'stacked' === $footer_layout ) {
$layout_classes[] = 'footer-stacked';
}
$footer_width = hello_elementor_get_setting( 'hello_footer_width' );
if ( 'full-width' === $footer_width ) {
$layout_classes[] = 'footer-full-width';
}
if ( hello_elementor_get_setting( 'hello_footer_copyright_display' ) && '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) ) {
$layout_classes[] = 'footer-has-copyright';
}
return implode( ' ', $layout_classes );
}
add_action( 'elementor/editor/after_enqueue_scripts', function() {
if ( hello_header_footer_experiment_active() ) {
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script(
'hello-theme-editor',
get_template_directory_uri() . '/assets/js/hello-editor' . $suffix . '.js',
[ 'jquery', 'elementor-editor' ],
HELLO_ELEMENTOR_VERSION,
true
);
wp_enqueue_style(
'hello-editor',
get_template_directory_uri() . '/editor' . $suffix . '.css',
[],
HELLO_ELEMENTOR_VERSION
);
}
} );
add_action( 'wp_enqueue_scripts', function() {
if ( ! hello_header_footer_experiment_active() ) {
return;
}
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_enqueue_script(
'hello-theme-frontend',
get_template_directory_uri() . '/assets/js/hello-frontend' . $suffix . '.js',
[ 'jquery' ],
'1.0.0',
true
);
\Elementor\Plugin::$instance->kits_manager->frontend_before_enqueue_styles();
} );
/**
* Helper function to decide whether to output the header template.
*
* @return bool
*/
function hello_get_header_display() {
$is_editor = isset( $_GET['elementor-preview'] );
return (
$is_editor
|| hello_elementor_get_setting( 'hello_header_logo_display' )
|| hello_elementor_get_setting( 'hello_header_tagline_display' )
|| hello_elementor_get_setting( 'hello_header_menu_display' )
);
}
/**
* Helper function to decide whether to output the footer template.
*
* @return bool
*/
function hello_get_footer_display() {
$is_editor = isset( $_GET['elementor-preview'] );
return (
$is_editor
|| hello_elementor_get_setting( 'hello_footer_logo_display' )
|| hello_elementor_get_setting( 'hello_footer_tagline_display' )
|| hello_elementor_get_setting( 'hello_footer_menu_display' )
|| hello_elementor_get_setting( 'hello_footer_copyright_display' )
);
}
/**
* Add Hello Elementor theme Header & Footer to Experiments.
*/
add_action( 'elementor/experiments/default-features-registered', function( \Elementor\Core\Experiments\Manager $experiments_manager ) {
$experiments_manager->add_feature( [
'name' => 'hello-theme-header-footer',
'title' => esc_html__( 'Hello Theme Header & Footer', 'hello-elementor' ),
'description' => sprintf( __( 'Use this experiment to design header and footer using Elementor Site Settings. Learn More', 'hello-elementor' ), 'https://go.elementor.com/wp-dash-header-footer' ),
'release_status' => $experiments_manager::RELEASE_STATUS_STABLE,
'new_site' => [
'minimum_installation_version' => '3.3.0',
'default_active' => $experiments_manager::STATE_ACTIVE,
],
] );
} );
/**
* Helper function to check if Header & Footer Experiment is Active/Inactive
*/
function hello_header_footer_experiment_active() {
// If Elementor is not active, return false
if ( ! did_action( 'elementor/loaded' ) ) {
return false;
}
// Backwards compat.
if ( ! method_exists( \Elementor\Plugin::$instance->experiments, 'is_feature_active' ) ) {
return false;
}
return (bool) ( \Elementor\Plugin::$instance->experiments->is_feature_active( 'hello-theme-header-footer' ) );
}
includes/settings-functions.php 0000644 00000007112 15237733363 0012746 0 ustar 00
'_description_meta_tag',
'SKIP_LINK' => '_skip_link',
'PAGE_TITLE' => '_page_title',
'HELLO_STYLE' => '_hello_style',
'HELLO_THEME' => '_hello_theme',
];
hello_elementor_register_settings( $settings_group, $settings );
hello_elementor_render_tweaks( $settings_group, $settings );
}
/**
* Register theme settings.
*/
function hello_elementor_register_settings( $settings_group, $settings ) {
foreach ( $settings as $setting_key => $setting_value ) {
register_setting(
$settings_group,
$settings_group . $setting_value,
[
'default' => '',
'show_in_rest' => true,
'type' => 'string',
]
);
}
}
/**
* Run a tweek only if the user requested it.
*/
function hello_elementor_do_tweak( $setting, $tweak_callback ) {
$option = get_option( $setting );
if ( isset( $option ) && ( 'true' === $option ) && is_callable( $tweak_callback ) ) {
$tweak_callback();
}
}
/**
* Render theme tweaks.
*/
function hello_elementor_render_tweaks( $settings_group, $settings ) {
hello_elementor_do_tweak( $settings_group . $settings['DESCRIPTION_META_TAG'], function() {
remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
} );
hello_elementor_do_tweak( $settings_group . $settings['SKIP_LINK'], function() {
add_filter( 'hello_elementor_enable_skip_link', '__return_false' );
} );
hello_elementor_do_tweak( $settings_group . $settings['PAGE_TITLE'], function() {
add_filter( 'hello_elementor_page_title', '__return_false' );
} );
hello_elementor_do_tweak( $settings_group . $settings['HELLO_STYLE'], function() {
add_filter( 'hello_elementor_enqueue_style', '__return_false' );
} );
hello_elementor_do_tweak( $settings_group . $settings['HELLO_THEME'], function() {
add_filter( 'hello_elementor_enqueue_theme_style', '__return_false' );
} );
}
includes/admin-functions.php 0000644 00000012651 15237733363 0012202 0 ustar 00 parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
return;
}
if ( 'true' === get_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true ) ) {
return;
}
$plugin = 'elementor/elementor.php';
$installed_plugins = get_plugins();
$is_elementor_installed = isset( $installed_plugins[ $plugin ] );
if ( $is_elementor_installed ) {
if ( ! current_user_can( 'activate_plugins' ) ) {
return;
}
$message = esc_html__( 'The Hello Theme is a lightweight starter theme that works perfectly with the Elementor award-winning page builder plugin. Once you activate the plugin, you are only 1 click away from building an amazing website.', 'hello-elementor' );
$button_text = esc_html__( 'Activate Elementor', 'hello-elementor' );
$button_link = wp_nonce_url( 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin );
} else {
if ( ! current_user_can( 'install_plugins' ) ) {
return;
}
$message = esc_html__( 'The Hello Theme is a lightweight starter theme that works perfectly with the Elementor award-winning page builder plugin. Once you download and activate the plugin, you are only 1 click away from building an amazing website.', 'hello-elementor' );
$button_text = esc_html__( 'Install Elementor', 'hello-elementor' );
$button_link = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=elementor' ), 'install-plugin_elementor' );
}
?>
start_controls_section(
'hello_header_section',
[
'tab' => 'hello-settings-header',
'label' => esc_html__( 'Header', 'hello-elementor' ),
]
);
$this->add_control(
'hello_header_logo_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
]
);
$this->add_control(
'hello_header_tagline_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
]
);
$this->add_control(
'hello_header_menu_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
]
);
$this->add_control(
'hello_header_layout',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Layout', 'hello-elementor' ),
'options' => [
'default' => esc_html__( 'Default', 'hello-elementor' ),
'inverted' => esc_html__( 'Inverted', 'hello-elementor' ),
'stacked' => esc_html__( 'Centered', 'hello-elementor' ),
],
'selector' => '.site-header',
'default' => 'default',
]
);
$this->add_control(
'hello_header_width',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Width', 'hello-elementor' ),
'options' => [
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
],
'selector' => '.site-header',
'default' => 'boxed',
]
);
$this->add_responsive_control(
'hello_header_custom_width',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
'range' => [
'px' => [
'max' => 2000,
],
'em' => [
'max' => 100,
],
'rem' => [
'max' => 100,
],
],
'condition' => [
'hello_header_width' => 'boxed',
],
'selectors' => [
'.site-header .header-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
],
]
);
$this->add_responsive_control(
'hello_header_gap',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Gap', 'hello-elementor' ),
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
'default' => [
'size' => '0',
],
'range' => [
'px' => [
'max' => 100,
],
'em' => [
'max' => 5,
],
'rem' => [
'max' => 5,
],
],
'selectors' => [
'.site-header' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
],
'conditions' => [
'relation' => 'and',
'terms' => [
[
'name' => 'hello_header_layout',
'operator' => '!=',
'value' => 'stacked',
],
],
],
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'hello_header_background',
'label' => esc_html__( 'Background', 'hello-elementor' ),
'types' => [ 'classic', 'gradient' ],
'selector' => '.site-header',
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_header_logo_section',
[
'tab' => 'hello-settings-header',
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
'conditions' => [
'relation' => 'and',
'terms' => [
[
'name' => 'hello_header_logo_display',
'operator' => '=',
'value' => 'yes',
],
],
],
]
);
$this->add_control(
'hello_header_logo_type',
[
'label' => esc_html__( 'Type', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'default' => ( has_custom_logo() ? 'logo' : 'title' ),
'options' => [
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
'title' => esc_html__( 'Title', 'hello-elementor' ),
],
'frontend_available' => true,
]
);
$this->add_responsive_control(
'hello_header_logo_width',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
'description' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s logo', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
'range' => [
'px' => [
'max' => 1000,
],
'em' => [
'max' => 100,
],
'rem' => [
'max' => 100,
],
],
'condition' => [
'hello_header_logo_display' => 'yes',
'hello_header_logo_type' => 'logo',
],
'selectors' => [
'.site-header .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'hello_header_title_color',
[
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_header_logo_display' => 'yes',
'hello_header_logo_type' => 'title',
],
'selectors' => [
'.site-header h1.site-title a' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_header_title_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'description' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s title', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'condition' => [
'hello_header_logo_display' => 'yes',
'hello_header_logo_type' => 'title',
],
'selector' => '.site-header h1.site-title',
]
);
$this->add_control(
'hello_header_title_link',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s title', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'content_classes' => 'elementor-control-field-description',
'condition' => [
'hello_header_logo_display' => 'yes',
'hello_header_logo_type' => 'title',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_header_tagline',
[
'tab' => 'hello-settings-header',
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
'conditions' => [
'relation' => 'and',
'terms' => [
[
'name' => 'hello_header_tagline_display',
'operator' => '=',
'value' => 'yes',
],
],
],
]
);
$this->add_control(
'hello_header_tagline_color',
[
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_header_tagline_display' => 'yes',
],
'selectors' => [
'.site-header .site-description' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_header_tagline_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'condition' => [
'hello_header_tagline_display' => 'yes',
],
'selector' => '.site-header .site-description',
]
);
$this->add_control(
'hello_header_tagline_link',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s tagline', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'content_classes' => 'elementor-control-field-description',
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_header_menu_tab',
[
'tab' => 'hello-settings-header',
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'conditions' => [
'relation' => 'and',
'terms' => [
[
'name' => 'hello_header_menu_display',
'operator' => '=',
'value' => 'yes',
],
],
],
]
);
$available_menus = wp_get_nav_menus();
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
foreach ( $available_menus as $available_menu ) {
$menus[ $available_menu->term_id ] = $available_menu->name;
}
if ( 1 === count( $menus ) ) {
$this->add_control(
'hello_header_menu_notice',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => '' . esc_html__( 'There are no menus in your site.', 'hello-elementor' ) . '
' . sprintf( __( 'Go to Menus screen to create one.', 'hello-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
'separator' => 'after',
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);
} else {
$this->add_control(
'hello_header_menu',
[
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'options' => $menus,
'default' => array_keys( $menus )[0],
'description' => sprintf( __( 'Go to the Menus screen to manage your menus.', 'hello-elementor' ), admin_url( 'nav-menus.php' ) ),
]
);
$this->add_control(
'hello_header_menu_warning',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => esc_html__( 'Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);
$this->add_control(
'hello_header_menu_layout',
[
'label' => esc_html__( 'Menu Layout', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'default' => 'horizontal',
'options' => [
'horizontal' => esc_html__( 'Horizontal', 'hello-elementor' ),
'dropdown' => esc_html__( 'Dropdown', 'hello-elementor' ),
],
'frontend_available' => true,
]
);
$breakpoints = Responsive::get_breakpoints();
$this->add_control(
'hello_header_menu_dropdown',
[
'label' => esc_html__( 'Breakpoint', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'default' => 'tablet',
'options' => [
/* translators: %d: Breakpoint number. */
'mobile' => sprintf( esc_html__( 'Mobile (< %dpx)', 'hello-elementor' ), $breakpoints['md'] ),
/* translators: %d: Breakpoint number. */
'tablet' => sprintf( esc_html__( 'Tablet (< %dpx)', 'hello-elementor' ), $breakpoints['lg'] ),
'none' => esc_html__( 'None', 'hello-elementor' ),
],
'selector' => '.site-header',
'condition' => [
'hello_header_menu_layout!' => 'dropdown',
],
]
);
$this->add_control(
'hello_header_menu_color',
[
'label' => esc_html__( 'Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_header_menu_display' => 'yes',
],
'selectors' => [
'.site-header .site-navigation ul.menu li a' => 'color: {{VALUE}};',
],
]
);
$this->add_control(
'hello_header_menu_toggle_color',
[
'label' => esc_html__( 'Toggle Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_header_menu_display' => 'yes',
],
'selectors' => [
'.site-header .site-navigation-toggle i' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_header_menu_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'condition' => [
'hello_header_menu_display' => 'yes',
],
'selector' => '.site-header .site-navigation .menu li',
]
);
}
$this->end_controls_section();
}
public function on_save( $data ) {
// Save chosen header menu to the WP settings.
if ( isset( $data['settings']['hello_header_menu'] ) ) {
$menu_id = $data['settings']['hello_header_menu'];
$locations = get_theme_mod( 'nav_menu_locations' );
$locations['menu-1'] = (int) $menu_id;
set_theme_mod( 'nav_menu_locations', $locations );
}
}
public function get_additional_tab_content() {
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
return sprintf( '
',
esc_html__( 'Create a custom header with multiple options', 'hello-elementor' ),
esc_html__( 'Upgrade to Elementor Pro and enjoy free design and many more features', 'hello-elementor' ),
esc_html__( 'Upgrade', 'hello-elementor' ),
get_template_directory_uri() . '/assets/images/go-pro.svg'
);
} else {
return sprintf( '
',
esc_html__( 'Create a custom header with the new Theme Builder', 'hello-elementor' ),
esc_html__( 'With the new Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
esc_html__( 'Create Header', 'hello-elementor' ),
get_template_directory_uri() . '/assets/images/go-pro.svg',
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/header' )
);
}
}
}
includes/settings/settings-footer.php 0000644 00000034215 15237733363 0014100 0 ustar 00 start_controls_section(
'hello_footer_section',
[
'tab' => 'hello-settings-footer',
'label' => esc_html__( 'Footer', 'hello-elementor' ),
]
);
$this->add_control(
'hello_footer_logo_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
'selector' => '.site-footer .site-branding',
]
);
$this->add_control(
'hello_footer_tagline_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
'selector' => '.site-footer .site-description',
]
);
$this->add_control(
'hello_footer_menu_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
'selector' => '.site-footer .site-navigation',
]
);
$this->add_control(
'hello_footer_copyright_display',
[
'type' => Controls_Manager::SWITCHER,
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
'default' => 'yes',
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
'selector' => '.site-footer .copyright',
]
);
$this->add_control(
'hello_footer_layout',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Layout', 'hello-elementor' ),
'options' => [
'default' => esc_html__( 'Default', 'hello-elementor' ),
'inverted' => esc_html__( 'Inverted', 'hello-elementor' ),
'stacked' => esc_html__( 'Centered', 'hello-elementor' ),
],
'selector' => '.site-footer',
'default' => 'default',
]
);
$this->add_control(
'hello_footer_width',
[
'type' => Controls_Manager::SELECT,
'label' => esc_html__( 'Width', 'hello-elementor' ),
'options' => [
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
],
'selector' => '.site-footer',
'default' => 'boxed',
]
);
$this->add_responsive_control(
'hello_footer_custom_width',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
'range' => [
'px' => [
'max' => 2000,
],
'em' => [
'max' => 100,
],
'rem' => [
'max' => 100,
],
],
'condition' => [
'hello_footer_width' => 'boxed',
],
'selectors' => [
'.site-footer .footer-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
],
]
);
$this->add_responsive_control(
'hello_footer_gap',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Gap', 'hello-elementor' ),
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
'range' => [
'px' => [
'max' => 100,
],
'em' => [
'max' => 5,
],
'rem' => [
'max' => 5,
],
],
'selectors' => [
'.site-footer' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
],
'condition' => [
'hello_footer_layout!' => 'stacked',
],
]
);
$this->add_group_control(
Group_Control_Background::get_type(),
[
'name' => 'hello_footer_background',
'label' => esc_html__( 'Background', 'hello-elementor' ),
'types' => [ 'classic', 'gradient' ],
'selector' => '.site-footer',
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_footer_logo_section',
[
'tab' => 'hello-settings-footer',
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
'condition' => [
'hello_footer_logo_display!' => '',
],
]
);
$this->add_control(
'hello_footer_logo_type',
[
'label' => esc_html__( 'Type', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'default' => 'logo',
'options' => [
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
'title' => esc_html__( 'Title', 'hello-elementor' ),
],
'frontend_available' => true,
]
);
$this->add_responsive_control(
'hello_footer_logo_width',
[
'type' => Controls_Manager::SLIDER,
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
'description' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s logo', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
'range' => [
'px' => [
'max' => 1000,
],
'em' => [
'max' => 100,
],
'rem' => [
'max' => 100,
],
],
'condition' => [
'hello_footer_logo_display' => 'yes',
'hello_footer_logo_type' => 'logo',
],
'selectors' => [
'.site-footer .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
],
]
);
$this->add_control(
'hello_footer_title_color',
[
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_footer_logo_display' => 'yes',
'hello_footer_logo_type' => 'title',
],
'selectors' => [
'.site-footer h4.site-title a' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_footer_title_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'condition' => [
'hello_footer_logo_display' => 'yes',
'hello_footer_logo_type' => 'title',
],
'selector' => '.site-footer h4.site-title',
]
);
$this->add_control(
'hello_footer_title_link',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s title', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'content_classes' => 'elementor-control-field-description',
'condition' => [
'hello_footer_logo_display' => 'yes',
'hello_footer_logo_type' => 'title',
],
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_footer_tagline',
[
'tab' => 'hello-settings-footer',
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
'condition' => [
'hello_footer_tagline_display' => 'yes',
],
]
);
$this->add_control(
'hello_footer_tagline_color',
[
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_footer_tagline_display' => 'yes',
],
'selectors' => [
'.site-footer .site-description' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_footer_tagline_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'condition' => [
'hello_footer_tagline_display' => 'yes',
],
'selector' => '.site-footer .site-description',
]
);
$this->add_control(
'hello_footer_tagline_link',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => sprintf(
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
__( 'Go to Site Identity to manage your site\'s tagline', 'hello-elementor' ),
"javascript:\$e.route('panel/global/settings-site-identity')"
),
'content_classes' => 'elementor-control-field-description',
]
);
$this->end_controls_section();
$this->start_controls_section(
'hello_footer_menu_tab',
[
'tab' => 'hello-settings-footer',
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'condition' => [
'hello_footer_menu_display' => 'yes',
],
]
);
$available_menus = wp_get_nav_menus();
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
foreach ( $available_menus as $available_menu ) {
$menus[ $available_menu->term_id ] = $available_menu->name;
}
if ( 1 === count( $menus ) ) {
$this->add_control(
'hello_footer_menu_notice',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => '' . esc_html__( 'There are no menus in your site.', 'hello-elementor' ) . '
' . sprintf( __( 'Go to Menus screen to create one.', 'hello-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
'separator' => 'after',
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);
} else {
$this->add_control(
'hello_footer_menu',
[
'label' => esc_html__( 'Menu', 'hello-elementor' ),
'type' => Controls_Manager::SELECT,
'options' => $menus,
'default' => array_keys( $menus )[0],
'description' => sprintf( __( 'Go to the Menus screen to manage your menus.', 'hello-elementor' ), admin_url( 'nav-menus.php' ) ),
]
);
$this->add_control(
'hello_footer_menu_warning',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => esc_html__( 'Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
]
);
$this->add_control(
'hello_footer_menu_color',
[
'label' => esc_html__( 'Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'selectors' => [
'footer .footer-inner .site-navigation a' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_footer_menu_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'selector' => 'footer .footer-inner .site-navigation a',
]
);
}
$this->end_controls_section();
$this->start_controls_section(
'hello_footer_copyright_section',
[
'tab' => 'hello-settings-footer',
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
'conditions' => [
'relation' => 'and',
'terms' => [
[
'name' => 'hello_footer_copyright_display',
'operator' => '=',
'value' => 'yes',
],
],
],
]
);
$this->add_control(
'hello_footer_copyright_text',
[
'type' => Controls_Manager::TEXTAREA,
'default' => esc_html__( 'All rights reserved', 'hello-elementor' ),
]
);
$this->add_control(
'hello_footer_copyright_color',
[
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
'type' => Controls_Manager::COLOR,
'condition' => [
'hello_footer_copyright_display' => 'yes',
],
'selectors' => [
'.site-footer .copyright p' => 'color: {{VALUE}};',
],
]
);
$this->add_group_control(
Group_Control_Typography::get_type(),
[
'name' => 'hello_footer_copyright_typography',
'label' => esc_html__( 'Typography', 'hello-elementor' ),
'condition' => [
'hello_footer_copyright_display' => 'yes',
],
'selector' => '.site-footer .copyright p',
]
);
$this->end_controls_section();
}
public function on_save( $data ) {
// Save chosen footer menu to the WP settings.
if ( isset( $data['settings']['hello_footer_menu'] ) ) {
$menu_id = $data['settings']['hello_footer_menu'];
$locations = get_theme_mod( 'nav_menu_locations' );
$locations['menu-2'] = (int) $menu_id;
set_theme_mod( 'nav_menu_locations', $locations );
}
}
public function get_additional_tab_content() {
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
return sprintf( '
',
esc_html__( 'Create a custom footer with multiple options', 'hello-elementor' ),
esc_html__( 'Upgrade to Elementor Pro and enjoy free design and many more features', 'hello-elementor' ),
esc_html__( 'Upgrade', 'hello-elementor' ),
get_template_directory_uri() . '/assets/images/go-pro.svg'
);
} else {
return sprintf( '
',
esc_html__( 'Create a custom footer with the new Theme Builder', 'hello-elementor' ),
esc_html__( 'With the new Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
esc_html__( 'Create Footer', 'hello-elementor' ),
get_template_directory_uri() . '/assets/images/go-pro.svg',
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/footer' )
);
}
}
}
template-parts/footer.php 0000644 00000001131 15237733363 0011525 0 ustar 00 'menu-2',
'fallback_cb' => false,
'echo' => false,
] );
?>
template-parts/404.php 0000644 00000001143 15237733363 0010541 0 ustar 00
template-parts/single.php 0000644 00000001452 15237733363 0011516 0 ustar 00
>
' . esc_html__( 'Tagged ', 'hello-elementor' ), null, '' ); ?>
'menu-1',
'fallback_cb' => false,
'echo' => false,
] );
?>
template-parts/dynamic-header.php 0000644 00000005343 15237733363 0013112 0 ustar 00 'menu-1',
'fallback_cb' => false,
'echo' => false,
] );
?>
template-parts/archive.php 0000644 00000002755 15237733363 0011665 0 ustar 00
%s', 'entry-title', esc_url( $post_link ), wp_kses_post( get_the_title() ) );
if ( has_post_thumbnail() ) {
printf( '%s', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
}
the_excerpt();
?>
max_num_pages > 1 ) :
?>
template-parts/dynamic-footer.php 0000644 00000004606 15237733363 0013161 0 ustar 00 'menu-2',
'fallback_cb' => false,
'echo' => false,
] );
?>
template-parts/search.php 0000644 00000003315 15237733363 0011502 0 ustar 00
%s', 'entry-title', esc_url( $post_link ), wp_kses_post( get_the_title() ) );
if ( has_post_thumbnail() ) {
printf( '%s', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
}
the_excerpt();
?>
max_num_pages > 1 ) :
?>
index.php 0000644 00000001750 15237733363 0006403 0 ustar 00 ul {
display: block;
}
.site-navigation ul.menu li ul {
background: #fff;
display: none;
min-width: 150px;
position: absolute;
z-index: 2;
left: 0;
top: 100%;
}
.site-navigation ul.menu li ul li {
border-block-end: #eeeeee 1px solid;
}
.site-navigation ul.menu li ul li:last-child {
border-block-end: none;
}
.site-navigation ul.menu li ul li.menu-item-has-children a {
flex-grow: 1;
}
.site-navigation ul.menu li ul li.menu-item-has-children:after {
transform: translateY(-50%) rotate(-90deg);
}
.site-navigation ul.menu li ul ul {
left: 100%;
top: 0;
}
.site-navigation ul.menu li:hover > ul {
display: block;
}
footer .site-navigation ul.menu li ul {
top: auto;
bottom: 100%;
}
footer .site-navigation ul.menu li ul ul {
bottom: 0;
}
footer .site-navigation ul.menu a {
padding: 5px 15px;
}
.site-navigation-dropdown {
margin-block-start: 10px;
transition: max-height 0.3s, transform 0.3s;
transform-origin: top;
position: absolute;
bottom: 0;
left: 0;
z-index: 10000;
width: 100%;
}
.site-navigation-toggle-holder:not(.elementor-active) + .site-navigation-dropdown {
transform: scaleY(0);
max-height: 0;
}
.site-navigation-toggle-holder.elementor-active + .site-navigation-dropdown {
transform: scaleY(1);
max-height: 100vh;
}
.site-navigation-dropdown ul {
padding: 0;
}
.site-navigation-dropdown ul.menu {
position: absolute;
width: 100%;
padding: 0;
margin: 0;
background: white;
}
.site-navigation-dropdown ul.menu li {
display: block;
width: 100%;
position: relative;
}
.site-navigation-dropdown ul.menu li a {
display: block;
padding: 20px;
background: #ffffff;
color: #55595c;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1019607843);
}
.site-navigation-dropdown ul.menu li.current-menu-item a {
color: white;
background: #55595c;
}
.site-navigation-dropdown ul.menu > li li {
transition: max-height 0.3s, transform 0.3s;
transform-origin: top;
transform: scaleY(0);
max-height: 0;
}
.site-navigation-dropdown ul.menu li.elementor-active > ul > li {
transform: scaleY(1);
max-height: 100vh;
}
@media (max-width: 576px) {
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation {
display: none !important;
}
}
@media (min-width: 768px) {
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
display: none !important;
}
}
@media (min-width: 576px) and (max-width: 767px) {
.site-header.menu-dropdown-mobile:not(.menu-layout-dropdown) .site-navigation {
display: none !important;
}
}
@media (min-width: 992px) {
.site-header.menu-dropdown-tablet:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
display: none !important;
}
}
@media (max-width: 992px) {
.site-header.menu-dropdown-tablet:not(.menu-layout-dropdown) .site-navigation {
display: none !important;
}
}
.site-header.menu-dropdown-none:not(.menu-layout-dropdown) .site-navigation-toggle-holder {
display: none !important;
}
/**
* Responsive layouts
*/
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
margin-inline-start: auto;
margin-inline-end: auto;
width: 100%;
}
@media (max-width: 575px) {
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
padding-inline-start: 10px;
padding-inline-end: 10px;
}
}
@media (min-width: 576px) {
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
max-width: 500px;
}
.site-header.header-full-width .header-inner {
max-width: 100%;
}
.site-footer.footer-full-width .footer-inner {
max-width: 100%;
}
}
@media (min-width: 768px) {
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
max-width: 600px;
}
.site-header.header-full-width {
max-width: 100%;
}
.site-footer.footer-full-width {
max-width: 100%;
}
}
@media (min-width: 992px) {
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
max-width: 800px;
}
.site-header.header-full-width {
max-width: 100%;
}
.site-footer.footer-full-width {
max-width: 100%;
}
}
@media (min-width: 1200px) {
.site-header .header-inner, .site-header:not(.dynamic-header), .site-footer .footer-inner, .site-footer:not(.dynamic-footer), body:not([class*=elementor-page-]) .site-main, .page-header .entry-title {
max-width: 1140px;
}
.site-header.header-full-width {
max-width: 100%;
}
.site-footer.footer-full-width {
max-width: 100%;
}
}
.site-header + .elementor {
min-height: calc(100vh - 320px);
} classic-editor.css 0000644 00000001364 15237733363 0010203 0 ustar 00 /**
* Classic editor styling
*/
/**
* DO NOT CHANGE THIS FILE!
* To override any of the settings in this section, add your styling code in the custom directory.
* Loading first in the style.scss & classic-editor.scss
*/
p {
margin-block-end: 0.75rem;
}
img {
max-width: 100%;
height: auto;
vertical-align: middle;
border-style: none;
}
pre {
font-family: monospace;
font-size: 1em;
white-space: pre-wrap;
}
code,
kbd,
pre,
samp {
font-size: 1rem;
}
code,
kbd,
pre,
samp {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
}
blockquote {
font-style: italic;
} functions.php.bak.1786730367 0000644 00000014047 15237733363 0011141 0 ustar 00 esc_html__( 'Header', 'hello-elementor' ) ] );
register_nav_menus( [ 'menu-2' => esc_html__( 'Footer', 'hello-elementor' ) ] );
}
if ( apply_filters( 'hello_elementor_post_type_support', true ) ) {
add_post_type_support( 'page', 'excerpt' );
}
if ( apply_filters( 'hello_elementor_add_theme_support', true ) ) {
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'title-tag' );
add_theme_support(
'html5',
[
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'script',
'style',
]
);
add_theme_support(
'custom-logo',
[
'height' => 100,
'width' => 350,
'flex-height' => true,
'flex-width' => true,
]
);
/*
* Editor Style.
*/
add_editor_style( 'classic-editor.css' );
/*
* Gutenberg wide images.
*/
add_theme_support( 'align-wide' );
/*
* WooCommerce.
*/
if ( apply_filters( 'hello_elementor_add_woocommerce_support', true ) ) {
// WooCommerce in general.
add_theme_support( 'woocommerce' );
// Enabling WooCommerce product gallery features (are off by default since WC 3.0.0).
// zoom.
add_theme_support( 'wc-product-gallery-zoom' );
// lightbox.
add_theme_support( 'wc-product-gallery-lightbox' );
// swipe.
add_theme_support( 'wc-product-gallery-slider' );
}
}
}
}
add_action( 'after_setup_theme', 'hello_elementor_setup' );
function hello_maybe_update_theme_version_in_db() {
$theme_version_option_name = 'hello_theme_version';
// The theme version saved in the database.
$hello_theme_db_version = get_option( $theme_version_option_name );
// If the 'hello_theme_version' option does not exist in the DB, or the version needs to be updated, do the update.
if ( ! $hello_theme_db_version || version_compare( $hello_theme_db_version, HELLO_ELEMENTOR_VERSION, '<' ) ) {
update_option( $theme_version_option_name, HELLO_ELEMENTOR_VERSION );
}
}
if ( ! function_exists( 'hello_elementor_scripts_styles' ) ) {
/**
* Theme Scripts & Styles.
*
* @return void
*/
function hello_elementor_scripts_styles() {
$min_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if ( apply_filters( 'hello_elementor_enqueue_style', true ) ) {
wp_enqueue_style(
'hello-elementor',
get_template_directory_uri() . '/style' . $min_suffix . '.css',
[],
HELLO_ELEMENTOR_VERSION
);
}
if ( apply_filters( 'hello_elementor_enqueue_theme_style', true ) ) {
wp_enqueue_style(
'hello-elementor-theme-style',
get_template_directory_uri() . '/theme' . $min_suffix . '.css',
[],
HELLO_ELEMENTOR_VERSION
);
}
}
}
add_action( 'wp_enqueue_scripts', 'hello_elementor_scripts_styles' );
if ( ! function_exists( 'hello_elementor_register_elementor_locations' ) ) {
/**
* Register Elementor Locations.
*
* @param ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager $elementor_theme_manager theme manager.
*
* @return void
*/
function hello_elementor_register_elementor_locations( $elementor_theme_manager ) {
if ( apply_filters( 'hello_elementor_register_elementor_locations', true ) ) {
$elementor_theme_manager->register_all_core_location();
}
}
}
add_action( 'elementor/theme/register_locations', 'hello_elementor_register_elementor_locations' );
if ( ! function_exists( 'hello_elementor_content_width' ) ) {
/**
* Set default content width.
*
* @return void
*/
function hello_elementor_content_width() {
$GLOBALS['content_width'] = apply_filters( 'hello_elementor_content_width', 800 );
}
}
add_action( 'after_setup_theme', 'hello_elementor_content_width', 0 );
if ( ! function_exists( 'hello_elementor_add_description_meta_tag' ) ) {
/**
* Add description meta tag with excerpt text.
*
* @return void
*/
function hello_elementor_add_description_meta_tag() {
if ( ! apply_filters( 'hello_elementor_description_meta_tag', true ) ) {
return;
}
if ( ! is_singular() ) {
return;
}
$post = get_queried_object();
if ( empty( $post->post_excerpt ) ) {
return;
}
echo '' . "\n";
}
}
add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
// Admin notice
if ( is_admin() ) {
require get_template_directory() . '/includes/admin-functions.php';
}
// Settings page
require get_template_directory() . '/includes/settings-functions.php';
// Allow active/inactive via the Experiments
require get_template_directory() . '/includes/elementor-functions.php';
if ( ! function_exists( 'hello_elementor_check_hide_title' ) ) {
/**
* Check whether to display the page title.
*
* @param bool $val default value.
*
* @return bool
*/
function hello_elementor_check_hide_title( $val ) {
if ( defined( 'ELEMENTOR_VERSION' ) ) {
$current_doc = Elementor\Plugin::instance()->documents->get( get_the_ID() );
if ( $current_doc && 'yes' === $current_doc->get_settings( 'hide_title' ) ) {
$val = false;
}
}
return $val;
}
}
add_filter( 'hello_elementor_page_title', 'hello_elementor_check_hide_title' );
/**
* BC:
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
* The following code prevents fatal errors in child themes that still use this function.
*/
if ( ! function_exists( 'hello_elementor_body_open' ) ) {
function hello_elementor_body_open() {
wp_body_open();
}
}
paqe.php 0000644 00000000054 15237733363 0006216 0 ustar 00
tr:nth-child(odd) > td,
table tbody > tr:nth-child(odd) > th {
background-color: rgba(128, 128, 128, 0.0705882353);
}
table tbody tr:hover > td,
table tbody tr:hover > th {
background-color: rgba(128, 128, 128, 0.1019607843);
}
table tbody + tbody {
border-block-start: 2px solid rgba(128, 128, 128, 0.5019607843);
}
@media (max-width: 767px) {
table table {
font-size: 0.8em;
}
table table th,
table table td {
padding: 7px;
line-height: 1.3;
}
table table th {
font-weight: 400;
}
}
/**
* List styling
* DO NOT CHANGE THIS FILE!
* To override any of the settings in this section, add your styling code in the custom directory.
*/
dl,
dt,
dd,
ol,
ul,
li {
margin-block-start: 0;
margin-block-end: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
} footer.php 0000644 00000001056 15237733363 0006571 0 ustar 00