Skip to content

Commit 0057389

Browse files
Merge pull request #233 from MachoThemes/master
Update to 1.2.0
2 parents e3b90a9 + f62cd2d commit 0057389

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2924
-1318
lines changed

.standard.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"404.php":[],"archive-jetpack-portfolio.php":[],"archive.php":[],"attachment.php":[],"comments.php":[],"footer.php":[],"functions.php":[],"header.php":[],"inc/admin/welcome-screen/class-shapely-notify-system.php":[],"inc/admin/welcome-screen/class-shapely-welcome.php":[],"inc/admin/welcome-screen/sections/actions-required.php":[],"inc/admin/welcome-screen/sections/getting-started.php":[],"inc/admin/welcome-screen/sections/recommended-plugins.php":[],"inc/admin/welcome-screen/sections/support.php":[],"inc/class-shapely-related-posts.php":[],"inc/class-wp-bootstrap-navwalker.php":[],"inc/custom-controls/class-shapely-logo-dimensions.php":[],"inc/customizer.php":[],"inc/extras.php":[],"inc/jetpack.php":[],"inc/libraries/epsilon-framework/class-epsilon-autoloader.php":[],"inc/libraries/epsilon-framework/class-epsilon-framework.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-color-coded-categories.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-color-scheme.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-content-backup.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-customizer.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-notifications.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-notify-system.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-repeater-templates.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-sanitizers.php":[],"inc/libraries/epsilon-framework/classes/class-epsilon-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-color-scheme.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-customizer-navigation.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-icon-picker.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-image.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-layouts.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-section-repeater.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-slider.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-text-editor.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-toggle.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-typography.php":[],"inc/libraries/epsilon-framework/customizer/controls/class-epsilon-control-upsell.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-pro.php":[],"inc/libraries/epsilon-framework/customizer/sections/class-epsilon-section-recommended-actions.php":[],"inc/libraries/epsilon-framework/customizer/settings/class-epsilon-setting-repeater.php":[],"inc/socialnav.php":[],"inc/template-tags.php":[],"index.php":[],"page-templates/full-width.php":[],"page-templates/no-sidebar.php":[],"page-templates/sidebar-left.php":[],"page-templates/sidebar-right.php":[],"page-templates/template-home.php":[],"page.php":[],"search.php":[],"sidebar-footer.php":[],"sidebar.php":[],"single-jetpack-portfolio.php":[],"single.php":[],"template-parts/content-attachment.php":[],"template-parts/content-grid-small.php":[],"template-parts/content-grid-wide.php":[],"template-parts/content-none.php":[],"template-parts/content-page.php":[],"template-parts/content-portfolio.php":[],"template-parts/content-search.php":[],"template-parts/content.php":[],"template-parts/layouts/blog-grid.php":[],"template-parts/layouts/blog-large-image-grid.php":[],"template-parts/layouts/blog-large-image.php":[],"woocommerce.php":[],"woocommerce/product-searchform.php":[]}

.travis.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: false
22
language: php
3+
dist: precise
34
matrix:
45
fast_finish: true
56
include:
@@ -9,16 +10,17 @@ matrix:
910
- php: '5.6'
1011
- php: '7.0'
1112
- php: '7.1'
12-
env: SNIFF=1
13-
env: DEPLOY=1
13+
env:
14+
- DEPLOY=1
15+
- SNIFF=1
1416
before_script:
1517
- export PHPCS_DIR=/tmp/phpcs
1618
- export SNIFFS_DIR=/tmp/sniffs
1719
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
1820
$PHPCS_DIR; fi
1921
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
2022
$SNIFFS_DIR; fi
21-
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git
23+
- if [[ "$SNIFF" == "1" ]]; then git clone -b 7.1.4 --depth 1 https://github.com/wimg/PHPCompatibility.git
2224
$SNIFFS_DIR/PHPCompatibility; fi
2325
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
2426
$SNIFFS_DIR; fi
@@ -51,10 +53,10 @@ script:
5153
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php;
5254
fi
5355
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php
54-
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php;
56+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php,./**/**/epsilon-framework/**/*.php;
5557
fi
5658
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
57-
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php;
59+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php,./**/**/epsilon-framework/**/**/*.php;
5860
fi
5961
notifications:
6062
email: false

archive-jetpack-portfolio.php

+62-28
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,78 @@
11
<?php
2-
get_header(); ?>
2+
get_header();
33

4-
<div id="primary" class="content-area col-md-12 mb-xs-24">
4+
$layout = get_theme_mod( 'projects_layout_view', 'mansonry' );
5+
$layout_class = shapely_get_layout_class();
6+
7+
$item_classes = 'post-snippet col-md-3 col-sm-6 project';
8+
if ( 'mansonry' == $layout ) {
9+
$item_classes .= ' masonry-item';
10+
}
11+
12+
?>
13+
<?php
14+
if ( 'sidebar-left' == $layout_class ) :
15+
get_sidebar();
16+
endif;
17+
?>
18+
<div id="primary" class="content-area col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
519
<main id="main" class="site-main" role="main">
620

721
<?php
8-
if ( have_posts() ) : ?>
9-
10-
<header>
11-
<?php
12-
echo ( get_theme_mod( 'portfolio_name' ) != '' ) ? '<h1 class="post-title">' . esc_html( get_theme_mod( 'portfolio_name' ) ) . '</h1>' : '';
13-
echo ( get_theme_mod( 'portfolio_description' ) != '' ) ? '<p>' . esc_html( get_theme_mod( 'portfolio_description' ) ) . '</p>' : '';
14-
?>
15-
</header><!-- .page-header -->
22+
if ( have_posts() ) :
23+
?>
1624

17-
<div class="masonry-loader fixed-center">
18-
<div class="col-sm-12 text-center">
19-
<div class="spinner"></div>
25+
<?php if ( 'mansonry' == $layout ) : ?>
26+
<div class="masonry-loader fixed-center">
27+
<div class="col-sm-12 text-center">
28+
<div class="spinner"></div>
29+
</div>
2030
</div>
21-
</div>
22-
<div class="masonry masonryFlyIn">
31+
<?php endif ?>
32+
33+
<div class="<?php echo 'mansonry' == $layout ? 'masonry masonryFlyIn' : ''; ?>">
2334
<?php
2435
/* Start the Loop */
25-
while ( have_posts() ) : the_post();
36+
while ( have_posts() ) :
37+
the_post();
2638
$projects_args = array(
2739
'fields' => 'names',
2840
);
2941
$project_types = wp_get_post_terms( $post->ID, 'jetpack-portfolio-type', $projects_args );
42+
43+
$thumbnail_url = get_the_post_thumbnail_url( get_the_ID(), 'full' );
44+
$item_style = '';
45+
if ( 'mansonry' != $layout ) {
46+
$item_style = 'background-image: url(' . $thumbnail_url . ')';
47+
}
3048
?>
3149

32-
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-snippet col-md-3 col-sm-6 masonry-item project' ); ?>>
33-
<div class="image-tile inner-title hover-reveal text-center"><?php
34-
if ( has_post_thumbnail() ) { ?>
35-
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
36-
<?php the_post_thumbnail( 'medium' ); ?>
37-
<div class="title"><?php
50+
<article id="post-<?php the_ID(); ?>" <?php post_class( $item_classes ); ?>>
51+
<div class="image-tile inner-title hover-reveal text-center" style="<?php echo $item_style; ?>">
52+
<?php
53+
if ( has_post_thumbnail() ) {
54+
?>
55+
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
56+
<?php
57+
if ( 'mansonry' == $layout ) {
58+
the_post_thumbnail( 'medium' );
59+
}
60+
?>
61+
<div class="title">
62+
<?php
3863
the_title( '<h5 class="mb0">', '</h5>' );
3964
if ( ! empty( $project_types ) ) {
4065
echo '<span>' . implode( ' / ', $project_types ) . '</span>';
41-
} ?>
66+
}
67+
?>
4268
</div>
43-
</a><?php
44-
} ?>
69+
</a>
70+
<?php
71+
}
72+
?>
4573
</div>
46-
</article><!-- #post-## --><?php
74+
</article><!-- #post-## -->
75+
<?php
4776

4877
endwhile;
4978

@@ -53,10 +82,15 @@
5382

5483
get_template_part( 'template-parts/content', 'none' );
5584

56-
endif; ?>
85+
endif;
86+
?>
5787

5888
</main><!-- #main -->
5989
</div><!-- #primary -->
60-
90+
<?php
91+
if ( 'sidebar-right' == $layout_class ) :
92+
get_sidebar();
93+
endif;
94+
?>
6195
<?php
6296
get_footer();

archive.php

+17-13
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,43 @@
77
* @package Shapely
88
*/
99
get_header(); ?>
10-
<?php $layout_class = shapely_get_layout_class();?>
10+
<?php $layout_class = shapely_get_layout_class(); ?>
1111
<div class="row">
1212
<?php
1313
if ( 'sidebar-left' == $layout_class ) :
1414
get_sidebar();
1515
endif;
1616
?>
17-
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
18-
if ( have_posts() ) :
17+
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
18+
<?php
19+
if ( have_posts() ) :
1920

20-
if ( is_home() && ! is_front_page() ) : ?>
21-
<header>
22-
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
21+
if ( is_home() && ! is_front_page() ) :
22+
?>
23+
<header>
24+
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
2325
</header>
2426

2527
<?php
26-
endif;
28+
endif;
2729

28-
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
29-
$layout_type = str_replace( '_', '-', $layout_type );
30+
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
31+
$layout_type = str_replace( '_', '-', $layout_type );
3032

31-
get_template_part( 'template-parts/layouts/blog', $layout_type );
33+
get_template_part( 'template-parts/layouts/blog', $layout_type );
3234

33-
shapely_pagination();
35+
shapely_pagination();
3436
else :
3537
get_template_part( 'template-parts/content', 'none' );
3638

37-
endif; ?>
39+
endif;
40+
?>
3841
</div><!-- #primary -->
3942
<?php
4043
if ( 'sidebar-right' == $layout_class ) :
4144
get_sidebar();
42-
endif; ?>
45+
endif;
46+
?>
4347
</div>
4448
<?php
4549
get_footer();

assets/js/customizer-preview.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
(function( $ ) {// jscs:ignore validateLineBreaks
2+
3+
if ( 'undefined' !== typeof( wp ) ) {
4+
if ( 'undefined' !== typeof( wp.customize ) ) {
5+
wp.customize.bind( 'preview-ready', function() {
6+
wp.customize.preview.bind( 'update-inline-css', function( object ) {
7+
var data = {
8+
'action': object.action,
9+
'args': object.data,
10+
'id': object.id
11+
};
12+
13+
jQuery.ajax({
14+
dataType: 'json',
15+
type: 'POST',
16+
url: WPUrls.ajaxurl,
17+
data: data,
18+
complete: function( json ) {
19+
var sufix = object.action + object.id;
20+
var style = $( '#shapely-style-' + sufix );
21+
22+
if ( ! style.length ) {
23+
style = $( 'head' ).append( '<style type="text/css" id="shapely-style-' + sufix + '" />' ).find( '#shapely-style-' + sufix );
24+
}
25+
26+
style.html( json.responseText );
27+
}
28+
});
29+
});
30+
});
31+
}
32+
}
33+
34+
})( jQuery );

0 commit comments

Comments
 (0)