Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
rami-elementor committed Sep 27, 2023
1 parent 37e49da commit 2340e52
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,62 +217,17 @@ function hello_elementor_settings_panel() {
* @return bool
*/
function hello_elementor_check_hide_title( $val ) {
if ( 'off' === get_theme_mod( 'page_title' ) ) {
$val = false;
}

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' );

if ( ! function_exists( 'hello_elementor_check_skip_link' ) ) {
/**
* Check whether to add a link to main content for screen-reader users.
*
* @param bool $val default value.
*
* @return bool
*/
function hello_elementor_check_skip_link( $val ) {
if ( 'off' === get_theme_mod( 'skip_link' ) ) {
$val = false;
}

return $val;
}
}
add_filter( 'hello_elementor_enable_skip_link', 'hello_elementor_check_skip_link' );

if ( ! function_exists( 'hello_elementor_check_description_meta_tag' ) ) {
/**
* Check whether to add the description meta tag.
*
* @param bool $val default value.
*
* @return bool
*/
function hello_elementor_check_description_meta_tag( $val ) {
if ( ! get_theme_mod( 'description_meta_tag' ) ) {
$val = false;
}

if ( 'off' === get_theme_mod( 'description_meta_tag' ) ) {
$val = false;
}

return $val;
}
}
add_filter( 'hello_elementor_description_meta_tag', 'hello_elementor_check_description_meta_tag' );

/**
* BC:
* In v2.7.0 the theme removed the `hello_elementor_body_open()` from `header.php` replacing it with `wp_body_open()`.
Expand Down

0 comments on commit 2340e52

Please sign in to comment.