%s', arve_get_var_dump( $options ) ); } $show_options_debug = false; } $pre_style = '' . 'background-color: #111;' . 'color: #eee;' . 'font-size: 15px;' . 'white-space: pre-wrap;' . 'word-wrap: break-word;'; if ( ! empty( $_GET['arve-debug-attr'] ) ) { $html .= sprintf( '
attr[%s]: %s', esc_attr( $pre_style ), esc_html( $_GET['arve-debug-attr'] ), arve_get_var_dump( $atts[ $_GET['arve-debug-attr'] ] ) ); } if ( isset( $_GET['arve-debug-atts'] ) ) { $html .= sprintf( '
$atts: %s', esc_attr( $pre_style ), arve_get_var_dump( $input_atts ) ); $html .= sprintf( '
$arve: %s', esc_attr( $pre_style ), arve_get_var_dump( $atts ) ); } if ( isset( $_GET['arve-debug-html'] ) ) { $html .= sprintf( '
%s', esc_attr( $pre_style ), esc_html( $input_html ) ); } return $html; } function arve_build_meta_html( $a ) { $meta = ''; if ( ! empty( $a['sources'] ) ) { $first_source = arve_get_first_array_value( $a['sources'] ); $meta .= sprintf( '', esc_attr( $first_source['src'] ) ); } if ( ! empty( $a['iframe_src'] ) ) { $meta .= sprintf( '', esc_attr( $a['iframe_src'] ) ); } if ( ! empty( $a['upload_date'] ) ) { $meta .= sprintf( '', esc_attr( $a['upload_date'] ) ); } if ( ! empty( $a['duration'] ) ) { $meta .= sprintf( '', esc_attr( $a['duration'] ) ); } if( ! empty( $a['img_src'] ) ) : $thumbnail = sprintf( '', esc_attr( $a['img_src'] ) ); $meta .= arve_build_tag( array( 'name' => 'thumbnail', 'tag' => 'meta', 'attr' => array( 'itemprop' => 'thumbnailUrl', 'content' => $a['img_src'], ), ), $a ); endif; if ( ! empty( $a['title'] ) ) { $meta .= arve_build_tag( array( 'name' => 'title', 'tag' => 'meta', 'attr' => array( 'itemprop' => 'name', 'content' => trim( $a['title'] ), ) ), $a ); } if ( ! empty( $a['description'] ) ) { $meta .= sprintf( '%s', esc_html( trim( $a['description'] ) ) ); } return $meta; } function arve_build_tag( $args, $a ) { $args = apply_filters( "nextgenthemes/arve/{$args['name']}", $args, $a ); if ( ! empty( $args['content'] ) ) { $out = sprintf( '<%1$s%2$s>%3$s%1$s>', esc_html( $args['tag'] ), arve_attr( $args['attr'] ), $args['content'] ); } else { $out = sprintf( '<%s%s>', esc_html( $args['tag'] ), arve_attr( $args['attr'] ) ); } return $out; } function arve_build_promote_link_html( $arve_link ) { if ( $arve_link ) { return sprintf( '%s', esc_url( 'https://nextgenthemes.com/plugins/arve-pro/' ), esc_attr( __( 'Embedded with ARVE Advanced Responsive Video Embedder WordPress plugin', ARVE_SLUG) ), esc_html__( 'ARVE', ARVE_SLUG ) ); } return ''; } function arve_arve_embed_container( $html, $atts ) { $attr['class'] = 'arve-embed-container'; if ( false === $atts['aspect_ratio'] ) { $attr['style'] = 'height:auto;padding:0'; } else { $attr['style'] = sprintf( 'padding-bottom:%F%%', arve_aspect_ratio_to_percentage( $atts['aspect_ratio'] ) ); } return sprintf( '
%s %s
', __('ARVE Error:', ARVE_SLUG ), $message ); } function arve_output_errors( $atts ) { $errors = ''; foreach ( $atts as $key => $value ) { if( is_wp_error( $value ) ) { $errors .= arve_error( $value->get_error_message() ); } } return $errors; }