Skip to content

Commit

Permalink
Merge branch 'release/1.1.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Hemberger committed Dec 28, 2017
2 parents 14e6fa7 + e56f2d3 commit 5c7f38a
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 30 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
### Changelog

#### 1.1.12 (12/28/17)
* Added: Slider max-width set in CSS so layout isn't totally broken on initial page load before Slick is initialized.
* Changed: Better docblock for template loader function.
* Fixed: Slashes being added to header and footer script metabox content when saving via Theme Settings.
* Fixed: Slider arrows were cut off by browser window on full width layout at certain browser widths.
* Fixed: Logo didn't remain centered when no header left or right content and no mobile menu assigned.
* Fixed: Woo reviews styling issue.
* Fixed: Issue with PHP 5.4 though we don't officially support PHP that low, but it was an easy fix.

#### 1.1.11 (12/21/17)
* Changed: [grid] Move 'mai_flex_entry_content' filter before more-link.
* Fixed: [grid] bg-image link not working correctly when displaying taxonomy terms.
Expand Down
35 changes: 17 additions & 18 deletions assets/css/mai-pro.css
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,6 @@ td {
-ms-flex-direction: column;-webkit-box-orient: vertical;-webkit-box-direction: normal;flex-direction: column;
/* forces footer to bottom when not enough content to fill the window */
min-height: 100vh;
/* keeps mai-slider in check */
overflow: hidden;
}

.admin-bar .site-container {
Expand Down Expand Up @@ -1431,6 +1429,19 @@ body:not(.mai-sections) .breadcrumb ~ .content-sidebar-wrap {
margin-bottom: 0;
}

.mai-slider[data-slidestoscroll="2"] .mai-slide {
max-width: 50%;
}
.mai-slider[data-slidestoscroll="3"] .mai-slide {
max-width: 33.33333333%;
}
.mai-slider[data-slidestoscroll="4"] .mai-slide {
max-width: 25%;
}
.mai-slider[data-slidestoscroll="6"] .mai-slide {
max-width: 16.66666667%;
}

.mai-slider .slick-list {
-ms-flex: 1 1 100%;-webkit-box-flex: 1;flex: 1 1 100%;
max-width: 100%;
Expand Down Expand Up @@ -1649,7 +1660,7 @@ body:not(.mai-sections) .breadcrumb ~ .content-sidebar-wrap {
outline: none;
cursor: pointer;
opacity: .75;
z-index: 1;
z-index: 9;
}

.slick-prev::before,
Expand Down Expand Up @@ -1699,31 +1710,19 @@ body:not(.mai-sections) .breadcrumb ~ .content-sidebar-wrap {
}

.content-no-sidebars .slick-prev {
margin-left: calc(-50vw + 50%);
margin-left: calc( -50vw + 50% );
}

.content-no-sidebars .slick-next {
margin-right: calc(-50vw + 50%);
}

.slick-slide.testimonial {
/* padding: 20px; */
/* border: none; */
margin-right: calc( -50vw + 50% );
}

.slick-slide.testimonial .entry-header {
-ms-flex-order: 2;-webkit-box-ordinal-group: 3;order: 2;
/* padding-top: 12px; */
}

.slick-slide.testimonial .entry-content {
-ms-flex-pack: end;-webkit-box-pack: end;justify-content: flex-end;
/* padding-bottom: 0; */
}

.slick-slide.testimonial .entry-content,
.slick-slide.testimonial .entry-content p:last-of-type {
/* margin-bottom: 0; */
}

@media only screen and (min-width: 545px) {
Expand Down Expand Up @@ -1768,7 +1767,7 @@ body:not(.mai-sections) .breadcrumb ~ .content-sidebar-wrap {

}

@media only screen and (min-width: 1201px) {
@media only screen and (min-width: 1401px) {

.full-width-content .slick-prev {
left: -5%;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/mai-pro.min.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions assets/css/mai-woocommerce.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
font-size: 14px;
}

.woocommerce #reviews #comments ol.commentlist li {
list-style-type: none;
}

/* ### Tabs
--------------------------------------------- */

Expand Down
2 changes: 1 addition & 1 deletion assets/css/mai-woocommerce.min.css

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion lib/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function mai_admin_enqueue_scripts() {
*/
add_filter( 'category_description', 'mai_limit_term_description' );
function mai_limit_term_description( $desc ) {
if ( ! is_admin() ) {
return $desc;
}
return wp_trim_words( strip_tags( $desc ), 24, '...' );
}

Expand Down Expand Up @@ -113,7 +116,19 @@ function mai_login_logo_css() {

// Add our own inline logo.
add_action( 'login_message', function() use ( $logo_id ) {
printf( '<h2 class="mai-login-logo">%s</h2>', wp_get_attachment_image( $logo_id, 'medium' ) );
// From WP core.
if ( is_multisite() ) {
$login_header_url = network_home_url();
$login_header_title = get_network()->site_name;
} else {
$login_header_url = __( 'https://wordpress.org/' );
$login_header_title = __( 'Powered by WordPress' );
}
printf( '<h2 class="mai-login-logo"><a href="%s" title="%s" tabindex="-1">%s</a></h2>',
esc_url( apply_filters( 'login_headerurl', $login_header_url ) ),
esc_attr( apply_filters( 'login_headertitle', $login_header_title ) ),
wp_get_attachment_image( $logo_id, 'medium' )
);
});

}
Expand Down
8 changes: 7 additions & 1 deletion lib/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ function mai_enforce_custom_genesis_settings( $new_value, $old_value ) {
if ( isset( $_POST[ 'genesis-settings' ] ) || ! empty( $_POST[ 'genesis-settings' ] ) ) {
// New value is the only genesis settings left in the form.
$new_value = $_POST[ 'genesis-settings' ];
// Fix slashes getting added to scripts. Argh.
if ( isset( $new_value['header_scripts'] ) ) {
$new_value['header_scripts'] = stripslashes( $new_value['header_scripts'] );
}
if ( isset( $new_value['footer_scripts'] ) ) {
$new_value['footer_scripts'] = stripslashes( $new_value['footer_scripts'] );
}
}
}

// Make sure we don't lose old settings that don't exist in the $new_value array.
$new_value = wp_parse_args( $new_value, $old_value );

Expand Down
5 changes: 3 additions & 2 deletions lib/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1351,8 +1351,9 @@ function add_entry_align_classes( $classes, $atts, $context = 'grid' ) {
// Align text
if ( ! empty( $atts['align_text'] ) ) {

// Column.
if ( ! empty( array_intersect( array( 'top', 'middle', 'bottom' ), $atts['align_text'] ) ) ) {
// Column. Save as variable first cause php 5.4 broke, and not sure I care to support that but WTH.
$vertical_align = array_intersect( array( 'top', 'middle', 'bottom' ), $atts['align_text'] );
if ( ! empty( $vertical_align ) ) {
$classes .= ' column';
}

Expand Down
9 changes: 6 additions & 3 deletions lib/structure/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,13 @@ function mai_do_header() {
}

// Default classes.
$row['class'] = 'site-header-row row middle-xs between-xs';
$row['class'] = 'site-header-row row middle-xs';

// Justification.
$row['class'] .= ( ! $left || $right ) ? ' around-md' : '';
// Alignment.
$row['class'] .= $mobile ? ' between-xs' : ' around-xs';

// Justification. If no left or right, and we have mobile. If no mobile we already have around-xs.
$row['class'] .= ( ! ( $left || $right ) && $mobile ) ? ' around-md' : '';

// Output with row open.
$output = $before . $output . sprintf( '<div %s>', genesis_attr( 'site-header-row', $row ) );
Expand Down
2 changes: 1 addition & 1 deletion lib/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Add page templates.
* Override by copying files from /mai-pro-engine/templates/{filename}.php
* Override all but sections template by copying files from /mai-pro-engine/templates/{filename}.php
* and putting in /{child-theme-name}/templates/{filename}.php
*
* @since 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions mai-pro-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin URI: https://maipro.io/
* Description: The Mai Pro Engine plugin
*
* Version: 1.1.11
* Version: 1.1.12
*
* GitHub URI: maiprowp/mai-pro-engine
*
Expand Down Expand Up @@ -91,7 +91,7 @@ public function __wakeup() {
private function setup_constants() {

// Plugin version.
define( 'MAI_PRO_ENGINE_VERSION', '1.1.11' );
define( 'MAI_PRO_ENGINE_VERSION', '1.1.12' );

// DB version.
define( 'MAI_PRO_ENGINE_DB_VERSION', '1161' );
Expand Down

0 comments on commit 5c7f38a

Please sign in to comment.