currentlayout ) ) hoot_main_layout(''); $attr['class'] .= ( !empty( $hoot_theme->currentlayout['layout'] ) ) ? ' layout-'. $hoot_theme->currentlayout['layout'] : ''; return $attr; } /** * Main content container of the page attributes when a page template is being displayed * * @since 1.0 * @access public * @param array $attr * @param string $context * @return array */ function hoot_theme_page_template_content( $attr, $context ) { if ( is_page_template() && $context == 'none' ) { $attr['id'] = 'content'; $attr['class'] = 'content sidebar-none'; $attr['role'] = 'main'; $attr['itemprop'] = 'mainContentOfPage'; $template_slug = basename( get_page_template(), '.php' ); $attr['class'] .= ' ' . sanitize_html_class( 'content-' . $template_slug ); } elseif ( function_exists( 'hoot_attr_content' ) ) { // Get page attributes for main content container of a non-template regular page $attr = apply_filters( "hoot_attr_content", $attr, $context ); } return $attr; } /** * Widgetized Template Area * * @since 1.0 * @access public * @param array $attr * @param string $context * @return array */ function hoot_theme_attr_widgetized_template_area( $attr, $context ) { $key = $context; $attr['class'] = ( empty( $attr['class'] ) ) ? '' : $attr['class']; $module_bg = hoot_get_mod( "widgetized_template_sectionbg_{$key}-type", 'none' ); if ( $module_bg == 'image' ) { $module_bg_img = hoot_get_mod( "widgetized_template_sectionbg_{$key}-image", '' ); if ( !empty( $module_bg_img ) ) { $module_bg_parallax = hoot_get_mod( "widgetized_template_sectionbg_{$key}-parallax", 0 ); $attr['class'] .= ( $module_bg_parallax ) ? ' bg-fixed' : ' bg-scroll'; if ( $module_bg_parallax ) { $attr['data-parallax'] = 'scroll'; // $attr['data-speed'] = '0.4'; // Default is 0.2 :: range [0-1] $attr['data-image-src'] = esc_url($module_bg_img); } else { $attr['style'] = 'background:url(' . esc_attr($module_bg_img) . ');'; } } } return $attr; } /** * Social Icons Widget - Icons * * @since 1.0 * @access public * @param array $attr * @param string $context * @return array */ function hoot_theme_attr_social_icons_icon( $attr, $context ) { $attr['class'] = ( empty( $attr['class'] ) ) ? '' : $attr['class']; $attr['class'] .= ' social-icons-icon'; if ( $context != 'fa-envelope' ) $attr['target'] = '_blank'; return $attr; } /** * Page wrapper attributes for external plugins * * @since 1.0 * @access public * @param array $attr * @return array */ function hoot_theme_attr_page_wrapper_plugins( $attr ) { $attr['class'] = ( empty( $attr['class'] ) ) ? '' : $attr['class']; $classes = apply_filters( 'hoot_theme_attr_page_wrapper_plugins', array( 'hoot-cf7-style', 'hoot-mapp-style', 'hoot-jetpack-style' ) ); $classes = array_map( 'sanitize_html_class', $classes ); foreach ( $classes as $class ) { $attr['class'] .= ' ' . $class; } return $attr; }