* @since 4.5.5 * @return array */ $args = apply_filters( 'avf_customize_heading_settings', $args, __CLASS__, $extra_args ); $heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading; $css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : $meta['heading_class']; // used by e.g. events countdown - prepare output string if( is_array( $title ) ) { if( isset( $title['top'] ) && ! empty( $title['top'] ) ) { $title['top'] = "<{$heading}><{$tags[0]} class='av-countdown-timer-title av-countdown-timer-title-top {$css}'>{$title['top']}"; } else { unset( $title['top'] ); } if( isset( $title['bottom'] ) && ! empty( $title['bottom'] ) ) { $title['bottom'] = "<{$heading}><{$tags[0]} class='av-countdown-timer-title av-countdown-timer-title-bottom {$css}'>{$title['bottom']}"; } else { unset( $title['bottom'] ); } } $style_tag = $element_styling->get_style_tag( $element_id ); $container_class = $element_styling->get_class_string( 'container' ); $output = ''; $output .= $style_tag; $output .= "
"; if( is_array( $title ) && isset( $title['top'] ) ) { $output .= $title['top']; } $output .= "<{$tags[0]} class='av-countdown-timer-inner'>"; foreach( array_reverse( $current_time_array ) as $key => $number ) { if( $number >= $min && $number <= $max ) { $class = $this->full_time_array[ $number ]['class']; $single = $this->full_time_array[ $number ]['label']; $multi = $this->full_time_array[ $number ]['label_multi']; $output .= ""; $output .= ""; $output .= "0"; $output .= "{$multi}"; $output .= ''; $output .= ''; } } $output .= ""; if( is_array( $title ) && isset( $title['bottom'] ) ) { $output .= $title['bottom']; } $output .= '
'; return $output; } /** * Remove week/month/year depending on setting for "Smallest time unit" and "Largest time unit" * Make sure that $atts['min'] <= $atts['max'] before calling this function * * @since 4.8 * @param array $atts * @return array */ protected function clean_up_time_array( array &$atts ) { // fallback if( $atts['min'] > $atts['max'] ) { $atts['min'] = $atts['max']; } $current = array_flip( $this->time_array ); if( $atts['max'] == 5 ) { unset( $current[6] ); unset( $current[7] ); } else if( in_array( $atts['max'], array( 6, 7 ) ) ) { if( $atts['min'] == 5 ) { $atts['min'] = 6; } unset( $current[5] ); } return array_flip( $current ); } } } {"version":"1.0","provider_name":"Stichting Collot Zien en Beleven","provider_url":"https:\/\/www.collotzienenbeleven.nl","author_name":"Stichting Collot Zien en Beleven","author_url":"https:\/\/www.collotzienenbeleven.nl","title":"Testament Free Play Demo","type":"rich","width":600,"height":338,"html":"
Testament Free Play Demo<\/a><\/blockquote>