' . wp_kses_post($description) . ''; } } } } if ( ! function_exists( 'woocommerce_product_archive_description' ) ) { /** * Show a shop page description on product archives. * * @subpackage Archives */ function woocommerce_product_archive_description() { if ( is_post_type_archive( 'product' ) && 0 === absint( get_query_var( 'paged' ) ) ) { $shop_page = get_post( wc_get_page_id( 'shop' ) ); if ( $shop_page ) { $description = wc_format_content( $shop_page->post_content ); if ( $description ) { echo '
' . wp_kses_post($description) . '
'; } } } } } /* * Show Product Additional Information * Gallery Mode */ if (!function_exists('allstore_section_gallery_props')) { function allstore_section_gallery_props($attributes) { global $product; if (!empty($attributes)) : ?>
get_id(), $attribute['name'], array( 'fields' => 'names' ) ); echo wp_kses_post(apply_filters( 'woocommerce_attribute', wptexturize( implode( ', ', $values ) ), $attribute, $values )); } else { // Convert pipes to commas and display values $values = array_map( 'trim', explode( WC_DELIMITER, $attribute['value'] ) ); echo wp_kses_post(apply_filters( 'woocommerce_attribute', wptexturize( implode( ', ', $values ) ), $attribute, $values )); } ?>
user_email; } elseif ( is_object($id_or_email) ) { // No avatar for pingbacks or trackbacks $allowed_comment_types = apply_filters( 'get_avatar_comment_types', array( 'comment' ) ); if ( ! empty( $id_or_email->comment_type ) && ! in_array( $id_or_email->comment_type, (array) $allowed_comment_types ) ) return false; if ( !empty($id_or_email->user_id) ) { $id = (int) $id_or_email->user_id; $user = get_userdata($id); if ( $user) $email = $user->user_email; } elseif ( !empty($id_or_email->comment_author_email) ) { $email = $id_or_email->comment_author_email; } } else { $email = $id_or_email; } $hashkey = md5(strtolower(trim($email))); $uri = 'http://www.gravatar.com/avatar/' . $hashkey . '?d=404'; $data = wp_cache_get($hashkey); if (false === $data) { $response = wp_remote_head($uri); if( is_wp_error($response) ) { $data = 'not200'; } else { $data = $response['response']['code']; } wp_cache_set($hashkey, $data, $group = '', $expire = 60*5); } if ($data == '200'){ return true; } else { return false; } } } /* * Walker for Header categories list */ class Walker_Allstore_Allcatalog extends Walker_Category { /** * Starts the list before the elements are added. * * @since 2.1.0 * @access public * * @see Walker::start_lvl() * * @param string $output Used to append additional content. Passed by reference. * @param int $depth Optional. Depth of category. Used for tab indentation. Default 0. * @param array $args Optional. An array of arguments. Will only append content if style argument * value is 'list'. See wp_list_categories(). Default empty array. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( 'list' != $args['style'] ) return; $indent = str_repeat("\t", $depth); $output .= "$indent