Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .standard.json
Original file line number Diff line number Diff line change
@@ -0,0 +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":[]}
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo: false
language: php
dist: precise
matrix:
fast_finish: true
include:
Expand All @@ -9,16 +10,17 @@ matrix:
- php: '5.6'
- php: '7.0'
- php: '7.1'
env: SNIFF=1
env: DEPLOY=1
env:
- DEPLOY=1
- SNIFF=1
before_script:
- export PHPCS_DIR=/tmp/phpcs
- export SNIFFS_DIR=/tmp/sniffs
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
$PHPCS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
$SNIFFS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git
- if [[ "$SNIFF" == "1" ]]; then git clone -b 7.1.4 --depth 1 https://github.com/wimg/PHPCompatibility.git
$SNIFFS_DIR/PHPCompatibility; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
$SNIFFS_DIR; fi
Expand Down Expand Up @@ -51,10 +53,10 @@ script:
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php;
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php,./**/**/epsilon-framework/**/*.php;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php;
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php,./**/**/epsilon-framework/**/**/*.php;
fi
notifications:
email: false
Expand Down
90 changes: 62 additions & 28 deletions archive-jetpack-portfolio.php
Original file line number Diff line number Diff line change
@@ -1,49 +1,78 @@
<?php
get_header(); ?>
get_header();

<div id="primary" class="content-area col-md-12 mb-xs-24">
$layout = get_theme_mod( 'projects_layout_view', 'mansonry' );
$layout_class = shapely_get_layout_class();

$item_classes = 'post-snippet col-md-3 col-sm-6 project';
if ( 'mansonry' == $layout ) {
$item_classes .= ' masonry-item';
}

?>
<?php
if ( 'sidebar-left' == $layout_class ) :
get_sidebar();
endif;
?>
<div id="primary" class="content-area col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
<main id="main" class="site-main" role="main">

<?php
if ( have_posts() ) : ?>

<header>
<?php
echo ( get_theme_mod( 'portfolio_name' ) != '' ) ? '<h1 class="post-title">' . esc_html( get_theme_mod( 'portfolio_name' ) ) . '</h1>' : '';
echo ( get_theme_mod( 'portfolio_description' ) != '' ) ? '<p>' . esc_html( get_theme_mod( 'portfolio_description' ) ) . '</p>' : '';
?>
</header><!-- .page-header -->
if ( have_posts() ) :
?>

<div class="masonry-loader fixed-center">
<div class="col-sm-12 text-center">
<div class="spinner"></div>
<?php if ( 'mansonry' == $layout ) : ?>
<div class="masonry-loader fixed-center">
<div class="col-sm-12 text-center">
<div class="spinner"></div>
</div>
</div>
</div>
<div class="masonry masonryFlyIn">
<?php endif ?>

<div class="<?php echo 'mansonry' == $layout ? 'masonry masonryFlyIn' : ''; ?>">
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
while ( have_posts() ) :
the_post();
$projects_args = array(
'fields' => 'names',
);
$project_types = wp_get_post_terms( $post->ID, 'jetpack-portfolio-type', $projects_args );

$thumbnail_url = get_the_post_thumbnail_url( get_the_ID(), 'full' );
$item_style = '';
if ( 'mansonry' != $layout ) {
$item_style = 'background-image: url(' . $thumbnail_url . ')';
}
?>

<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-snippet col-md-3 col-sm-6 masonry-item project' ); ?>>
<div class="image-tile inner-title hover-reveal text-center"><?php
if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail( 'medium' ); ?>
<div class="title"><?php
<article id="post-<?php the_ID(); ?>" <?php post_class( $item_classes ); ?>>
<div class="image-tile inner-title hover-reveal text-center" style="<?php echo $item_style; ?>">
<?php
if ( has_post_thumbnail() ) {
?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php
if ( 'mansonry' == $layout ) {
the_post_thumbnail( 'medium' );
}
?>
<div class="title">
<?php
the_title( '<h5 class="mb0">', '</h5>' );
if ( ! empty( $project_types ) ) {
echo '<span>' . implode( ' / ', $project_types ) . '</span>';
} ?>
}
?>
</div>
</a><?php
} ?>
</a>
<?php
}
?>
</div>
</article><!-- #post-## --><?php
</article><!-- #post-## -->
<?php

endwhile;

Expand All @@ -53,10 +82,15 @@

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

endif; ?>
endif;
?>

</main><!-- #main -->
</div><!-- #primary -->

<?php
if ( 'sidebar-right' == $layout_class ) :
get_sidebar();
endif;
?>
<?php
get_footer();
30 changes: 17 additions & 13 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,43 @@
* @package Shapely
*/
get_header(); ?>
<?php $layout_class = shapely_get_layout_class();?>
<?php $layout_class = shapely_get_layout_class(); ?>
<div class="row">
<?php
if ( 'sidebar-left' == $layout_class ) :
get_sidebar();
endif;
?>
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
if ( have_posts() ) :
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>">
<?php
if ( have_posts() ) :

if ( is_home() && ! is_front_page() ) : ?>
<header>
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
if ( is_home() && ! is_front_page() ) :
?>
<header>
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
</header>

<?php
endif;
endif;

$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
$layout_type = str_replace( '_', '-', $layout_type );
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
$layout_type = str_replace( '_', '-', $layout_type );

get_template_part( 'template-parts/layouts/blog', $layout_type );
get_template_part( 'template-parts/layouts/blog', $layout_type );

shapely_pagination();
shapely_pagination();
else :
get_template_part( 'template-parts/content', 'none' );

endif; ?>
endif;
?>
</div><!-- #primary -->
<?php
if ( 'sidebar-right' == $layout_class ) :
get_sidebar();
endif; ?>
endif;
?>
</div>
<?php
get_footer();
34 changes: 34 additions & 0 deletions assets/js/customizer-preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(function( $ ) {// jscs:ignore validateLineBreaks

if ( 'undefined' !== typeof( wp ) ) {
if ( 'undefined' !== typeof( wp.customize ) ) {
wp.customize.bind( 'preview-ready', function() {
wp.customize.preview.bind( 'update-inline-css', function( object ) {
var data = {
'action': object.action,
'args': object.data,
'id': object.id
};

jQuery.ajax({
dataType: 'json',
type: 'POST',
url: WPUrls.ajaxurl,
data: data,
complete: function( json ) {
var sufix = object.action + object.id;
var style = $( '#shapely-style-' + sufix );

if ( ! style.length ) {
style = $( 'head' ).append( '<style type="text/css" id="shapely-style-' + sufix + '" />' ).find( '#shapely-style-' + sufix );
}

style.html( json.responseText );
}
});
});
});
}
}

})( jQuery );
Loading