Skip to content

Commit

Permalink
Merge branch 'release/1.19.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Jun 22, 2022
2 parents a48fea5 + 44628ef commit 5c1f670
Show file tree
Hide file tree
Showing 43 changed files with 342 additions and 295 deletions.
4 changes: 2 additions & 2 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
);
?>
</h2>

<?php
$args = array(
'prev_text' => esc_html__( '&larr; Older Comments', 'vantage' ),
'next_text' => esc_html__( 'Newer Comments &rarr;', 'vantage' )
);
the_comments_navigation( $args );
?>

<ol class="commentlist">
<?php wp_list_comments( array( 'callback' => 'vantage_comment' ) ); ?>
</ol><!-- .commentlist -->
Expand Down
10 changes: 7 additions & 3 deletions css/woocommerce.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@
margin-right: 0;
}
.woocommerce #page-wrapper .product .cart .qty {
text-align: left;
max-width: 60px;
margin-top: 4px;
margin-right: 5px;
margin-top: 0;
max-width: 60px;
padding: 11px 12px 10px;
text-align: left;
width: auto;
}
.woocommerce #page-wrapper .product .variations_form td {
Expand Down Expand Up @@ -205,6 +206,9 @@
background: -o-linear-gradient(#0fc0ff, #00b5fa);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0fc0ff', endColorstr='#00b5fa', GradientType=0);
}
.woocommerce a.added_to_cart {
margin-left: 10px;
}
.woocommerce .shop_table .quantity .qty {
width: 4.5em;
}
Expand Down
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

</div><!-- #page-wrapper -->

<?php do_action('vantage_after_page_wrapper') ?>
<?php do_action( 'vantage_after_page_wrapper' ) ?>

<?php wp_footer(); ?>

Expand Down
10 changes: 5 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function vantage_setup() {
$wrapper = false;
$posts_per_page = 6;
}
else if ( siteorigin_setting( 'blog_archive_layout' ) == 'grid' ) {
elseif ( siteorigin_setting( 'blog_archive_layout' ) == 'grid' ) {
$container = 'vantage-grid-loop';
$render_function = 'vantage_infinite_scroll_render';
$wrapper = false;
Expand Down Expand Up @@ -267,7 +267,7 @@ function vantage_widgets_init() {
'after_title' => '</h3>',
) );

if( vantage_is_woocommerce_active() ) {
if ( vantage_is_woocommerce_active() ) {
register_sidebar( array(
'name' => __( 'Shop', 'vantage' ),
'id' => 'shop',
Expand Down Expand Up @@ -407,7 +407,7 @@ function vantage_top_text_area() {
* Display the scroll to top link.
*/
function vantage_back_to_top() {
if ( ! siteorigin_setting('navigation_display_scroll_to_top' ) && ! siteorigin_setting( 'navigation_mobile_navigation' ) ) return;
if ( ! siteorigin_setting( 'navigation_display_scroll_to_top' ) && ! siteorigin_setting( 'navigation_mobile_navigation' ) ) return;
$scroll_to_top = siteorigin_setting( 'navigation_display_scroll_to_top' ) ? 'scroll-to-top' : '';
?><a href="#" id="scroll-to-top" class="<?php echo $scroll_to_top; ?>" title="<?php esc_attr_e( 'Back To Top', 'vantage' ) ?>"><span class="vantage-icon-arrow-up"></span></a><?php
}
Expand All @@ -421,8 +421,8 @@ function vantage_back_to_top() {
function vantage_get_query_variables() {
global $wp_query;
$vars = $wp_query->query_vars;
foreach( $vars as $k => $v ) {
if(empty($vars[$k])) unset ($vars[$k]);
foreach ( $vars as $k => $v ) {
if ( empty( $vars[ $k ] ) ) unset( $vars[ $k ]);
}
unset( $vars['update_post_term_cache'] );
unset( $vars['update_post_meta_cache'] );
Expand Down
4 changes: 2 additions & 2 deletions home-panels.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
the_post();
the_content();
}
else if ( function_exists( 'siteorigin_panels_render' ) ) echo siteorigin_panels_render( 'home' );
elseif ( function_exists( 'siteorigin_panels_render' ) ) echo siteorigin_panels_render( 'home' );
else echo siteorigin_panels_lite_home_render();
?>
</div>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->

<?php get_footer(); ?>
<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion image.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@

</div><!-- #primary .content-area .image-attachment -->

<?php get_footer(); ?>
<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion inc/breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function vantage_display_breadcrumbs() {
}
endif;

// Support for deprecated function vantage_display_yoast_seo_breadcrumbs
// Support for deprecated function vantage_display_yoast_seo_breadcrumbs.
if ( !function_exists('vantage_display_yoast_seo_breadcrumbs') ) {
add_filter('vantage_main_top', 'vantage_display_breadcrumbs');
} else {
Expand Down
41 changes: 21 additions & 20 deletions inc/customizer/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
*/
class SiteOrigin_Customize_Fonts_Control extends WP_Customize_Control {
function __construct( $manager, $id, $args = array() ) {
// Let other themes and plugins process the web fonts array
$google_web_fonts = include ( dirname(__FILE__) . '/google-fonts.php' );

// Add the default fonts
$choices = array(
$choices = apply_filters( 'vantage_websafe', array(
'Arial' => 'Arial',
'Courier New' => 'Courier New',
'Georgia' => 'Georgia',
Expand All @@ -19,7 +18,7 @@ function __construct( $manager, $id, $args = array() ) {
'Tahoma' => 'Tahoma',
'Trebuchet MS' => 'Trebuchet MS',
'Verdana' => 'Verdana',
);
) );

foreach ( $google_web_fonts as $font => $variants ) {
foreach ( $variants as $variant ) {
Expand Down Expand Up @@ -64,23 +63,24 @@ class SiteOrigin_Customizer_CSS_Builder {
private $raw_css;
private $fonts;
private $defaults;
private $web_safe;

// These are web safe fonts
static $web_safe = array(
'Arial' => 'Arial, Helvetica, sans-serif',
'Courier New' => 'Courier, mono',
'Georgia' => '"Times New Roman", Times, serif',
'Helvetica Neue' => 'Arial, Helvetica, Geneva, sans-serif',
'Lucida Grande' => 'Lucida, Verdana, sans-serif',
'Tahoma' => 'Tahoma, Verdana, Segoe, sans-serif',
'Trebuchet MS' => 'Trebuchet MS, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Tahoma, sans-serif',
'Verdana' => 'Verdana, Geneva, sans-serif',
);

function __construct($defaults) {
$this->css = array();
$this->raw_css = '';
$this->google_fonts = array();
$this->web_safe = apply_filters( 'vantage_websafe_fallback', array(
'Arial' => 'Arial, Helvetica, sans-serif',
'Courier New' => 'Courier, mono',
'Georgia' => '"Times New Roman", Times, serif',
'Helvetica Neue' => 'Arial, Helvetica, Geneva, sans-serif',
'Lucida Grande' => 'Lucida, Verdana, sans-serif',
'Tahoma' => 'Tahoma, Verdana, Segoe, sans-serif',
'Trebuchet MS' => 'Trebuchet MS, Lucida Grande, Lucida Sans Unicode, Lucida Sans, Tahoma, sans-serif',
'Verdana' => 'Verdana, Geneva, sans-serif',
) );
$this->defaults = $defaults;
}

Expand Down Expand Up @@ -120,7 +120,6 @@ function css() {
*/
function add_css( $selector, $property, $value ) {
if ( empty( $value ) ) return;

$selector = preg_replace( '/\s+/m', ' ', $selector );

if ( $property == 'font' ) {
Expand All @@ -130,8 +129,9 @@ function add_css( $selector, $property, $value ) {
$variant = 400;
}

if ( !empty( self::$web_safe[ $family ] ) ) $family = '"' . $family . '", ' . self::$web_safe[ $family ];
else {
if ( ! empty( $this->web_safe[ $family ] ) ) {
$family = '"' . $family . '", ' . $this->web_safe[ $family ];
} else {
$this->google_fonts[ ] = array( $family, $variant );
$family = '"' . $family . '"';
}
Expand Down Expand Up @@ -174,8 +174,9 @@ function add_web_font( $selector, $mod ) {
$family = $font;
}

if ( !empty( self::$web_safe[ $family ] ) ) $family = '"' . $family . '", ' . self::$web_safe[ $family ];
else {
if ( ! empty( $this->web_safe[ $family ] ) ) {
$family = '"' . $family . '", ' . $this->web_safe[ $family ];
} else {
$this->google_fonts[ ] = array( $family, $variant );
$family = '"' . $family . '"';
}
Expand Down Expand Up @@ -276,7 +277,7 @@ static function hex2rgb($hex) {
function siteorigin_customizer_sanitize_google_font($font){

// Check the default fonts too.
$default_fonts = array(
$default_fonts = apply_filters( 'vantage_websafe', array(
'Arial' => 'Arial',
'Courier New' => 'Courier New',
'Georgia' => 'Georgia',
Expand All @@ -285,7 +286,7 @@ function siteorigin_customizer_sanitize_google_font($font){
'Tahoma' => 'Tahoma',
'Trebuchet MS' => 'Trebuchet MS',
'Verdana' => 'Verdana',
);
) );

$google_fonts = include( dirname(__FILE__).'/google-fonts.php' );
$font_name_parts = explode( ':', $font, 2 );
Expand Down
23 changes: 11 additions & 12 deletions inc/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @return string
*/
function vantage_gallery($contents, $attr){
if(empty($attr['type']) || $attr['type'] != 'slider') return $contents;
if ( empty( $attr['type']) || $attr['type'] != 'slider' ) return $contents;

global $post;

Expand Down Expand Up @@ -57,16 +57,16 @@ function vantage_gallery($contents, $attr){
'exclude' => '',
'wp_default' => false,
'target_blank' => false,
), $attr));
), $attr) );

// This gallery has requested to use the WordPress default gallery
// This gallery has requested to use the WordPress default gallery.
if($wp_default) return $contents;

$id = intval($id);
if ( 'RAND' == $order )
$orderby = 'none';

if ( !empty($include) ) {
if ( ! empty($include) ) {
$include = preg_replace( '/[^0-9,]+/', '', $include );
$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );

Expand All @@ -83,7 +83,7 @@ function vantage_gallery($contents, $attr){
$attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
}

if ( empty($attachments) ) return '';
if ( empty( $attachments ) ) return '';

// This is the custom stuff

Expand All @@ -92,11 +92,11 @@ function vantage_gallery($contents, $attr){
$return .= '<div class="flexslider-wrapper">';
$return .= '<div class="flexslider">';
$return .= '<ul class="slides">';
foreach($attachments as $attachment){
foreach ( $attachments as $attachment ) {
$return .= '<li>';
$return .= apply_filters('vantage_slide_before', '', $attachment);
$return .= wp_get_attachment_image($attachment->ID, $size, false, array('class' => 'slide-image'));
if($attachment->post_excerpt){
$return .= apply_filters( 'vantage_slide_before', '', $attachment );
$return .= wp_get_attachment_image($attachment->ID, $size, false, array( 'class' => 'slide-image' ) );
if ( $attachment->post_excerpt ) {
$return .= '<div class="flex-caption">' . $attachment->post_excerpt . '</div>';
}
$return .= apply_filters('vantage_slide_after', '', $attachment);
Expand All @@ -109,10 +109,9 @@ function vantage_gallery($contents, $attr){
return $return;
}
endif;
add_filter('post_gallery', 'vantage_gallery', 10, 2);
add_filter( 'post_gallery', 'vantage_gallery', 10, 2 );


if ( !function_exists( 'vantage_gallery_types' ) ) :
if ( ! function_exists( 'vantage_gallery_types' ) ) :
/**
* Add our fancy slider gallery to the list of gallery types.
*
Expand Down
Loading

0 comments on commit 5c1f670

Please sign in to comment.