Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #112 from Codeinwp/development
Browse files Browse the repository at this point in the history
Added filters and hooks to improve child themes creation
Rearange upsells in customize
Added Grunt tasks and fixed all grunt issues
  • Loading branch information
rodica-andronache authored Nov 4, 2016
2 parents eb9fe92 + c6ee3c8 commit 390334e
Show file tree
Hide file tree
Showing 55 changed files with 1,550 additions and 1,845 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ php:
sudo: false
env:
- WP_VERSION=master WP_MULTISITE=0
install:
- . $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
- npm install
- npm install grunt-cli -g
before_script:
## Install the wordpress latest version
- export WP_DEVELOP_DIR=/tmp/wordpress/
Expand All @@ -34,7 +40,6 @@ before_script:
- phpcs --config-set installed_paths $WP_DEVELOP_DIR/wordpress-coding-standards
- phpenv rehash
- cd $theme_dir
- npm install

script:
grunt travis
63 changes: 4 additions & 59 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,63 +1,8 @@
/* jshint node:true */
/* global require, process */
var timeGrunt = require('time-grunt');
var path = require('path');
var loadGruntConfig = require('load-grunt-config');

module.exports = function (grunt) {
module.exports = function( grunt ) {
'use strict';

timeGrunt(grunt);

var project = {
paths: {
get config() {
return this.grunt;
},
css: 'css/',
grunt: 'grunt/',
images: 'images/',
js: 'js/',
languages: 'languages/',
logs: 'logs/'
},
files: {
css: [
'css/*.css',
'!css/*.min.css',
'!css/vendor/*.css'
],
js: [
'*.js',
'grunt/**/*.js',
'js/**/*.js',
'js/**/*.js',
'!js/**/*.min.js',
'!js/vendor/*.js'
],
php: [
'**/*.php',
'!node_modules/**/*.php',
'!inc/admin/**/*.php',
'!class-tgm-plugin-activation.php'
],
get config() {
return project.paths.config + '*.js';
},
grunt: 'Gruntfile.js'
},
pkg: grunt.file.readJSON('package.json')
};

loadGruntConfig(grunt, {
configPath: path.join(process.cwd(), project.paths.config),
data: project,
jitGrunt: {
staticMappings: {
wpcss: 'grunt-wp-css',
addtextdomain: 'grunt-wp-i18n',
makepot: 'grunt-wp-i18n'
}
}
});
var loader = require( 'load-project-config' ),
config = require( 'grunt-theme-fleet' );
loader( grunt, config ).init();
};
10 changes: 5 additions & 5 deletions class-tgm-plugin-activation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3597,15 +3597,15 @@ protected static function emulate_filter_bool( $value ) {

if ( is_bool( $value ) ) {
return $value;
} else if ( is_int( $value ) && ( 0 === $value || 1 === $value ) ) {
} elseif ( is_int( $value ) && ( 0 === $value || 1 === $value ) ) {
return (bool) $value;
} else if ( ( is_float( $value ) && ! is_nan( $value ) ) && ( (float) 0 === $value || (float) 1 === $value ) ) {
} elseif ( ( is_float( $value ) && ! is_nan( $value ) ) && ( (float) 0 === $value || (float) 1 === $value ) ) {
return (bool) $value;
} else if ( is_string( $value ) ) {
} elseif ( is_string( $value ) ) {
$value = trim( $value );
if ( in_array( $value, $true, true ) ) {
return true;
} else if ( in_array( $value, $false, true ) ) {
} elseif ( in_array( $value, $false, true ) ) {
return false;
} else {
return false;
Expand All @@ -3615,4 +3615,4 @@ protected static function emulate_filter_bool( $value ) {
return false;
}
} // End of class TGMPA_Utils
} // End of class_exists wrapper
} // End of class_exists wrapper
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'themotion' ) ),
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'llorix-one-lite' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
); ?>
Expand Down
28 changes: 10 additions & 18 deletions css/admin-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ button.llorix_one_lite_general_control_remove_field:hover {
height: 40px;
padding: 0 10px !important;
border: 1px solid #dfdfdf;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #00a0d2;
background: #f9f9f9;
Expand Down Expand Up @@ -113,7 +112,6 @@ button.llorix_one_lite_general_control_remove_field:hover {
width: 100%;
height: 24px;
padding: 0;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color: #fff;
background-image: url(../images/transparency-grid.png);
Expand All @@ -128,7 +126,6 @@ button.llorix_one_lite_general_control_remove_field:hover {
margin-top: -2px;
padding: 3px;
border: 1px solid #aaa;
-webkit-border-radius: 4px;
border-radius: 4px;
opacity: 0.9;
color: #777;
Expand Down Expand Up @@ -165,21 +162,16 @@ button.llorix_one_lite_general_control_remove_field:hover {
border-bottom: none;
}

#accordion-section-llorix_one_lite_shop_section .accordion-section-title,
#accordion-section-llorix_one_lite_sections_order .accordion-section-title,
#accordion-section-llorix_one_lite_features_ribbon_section .accordion-section-title,
#accordion-section-llorix_one_lite_portfolio_section .accordion-section-title,
#accordion-section-llorix_one_lite_shortcodes_section .accordion-section-title,
#accordion-section-llorix_one_lite_new_features .accordion-section-title {
background-image: url(../images/gray-lines.png);
background-repeat: repeat;
#customize-control-llorix_one_lite_new_color,
#customize-control-llorix_one_lite_portfolio_text {
text-align: center;
}

#customize-control-llorix_one_lite_new_color:after {
font: 400 20px/1 dashicons;
content: "\f540";
}

#accordion-section-llorix_one_lite_shop_section .accordion-section-title:after,
#accordion-section-llorix_one_lite_sections_order .accordion-section-title:after,
#accordion-section-llorix_one_lite_features_ribbon_section .accordion-section-title:after,
#accordion-section-llorix_one_lite_portfolio_section .accordion-section-title:after,
#accordion-section-llorix_one_lite_shortcodes_section .accordion-section-title:after,
#accordion-section-llorix_one_lite_new_features .accordion-section-title:after {
content: "\f160";
.frontpage-sections-upsell {
padding: 10px 10px 11px 14px;
}
1 change: 0 additions & 1 deletion css/font-awesome.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
.fa-border {
padding: 0.2em 0.25em 0.15em;
border: solid 0.08em #eee;
-webkit-border-radius: 0.1em;
border-radius: 0.1em;
}

Expand Down
53 changes: 19 additions & 34 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,40 +83,25 @@
echo '</div>';
/* SOCIAL ICONS */

$llorix_one_lite_social_icons = get_theme_mod('llorix_one_lite_social_icons',
json_encode(array(
array( 'icon_value' => 'fa-facebook' , 'link' => '#', 'id' => 'llorix_one_lite_56d069b78cb6e' ),
array( 'icon_value' => 'fa-twitter' , 'link' => '#', 'id' => 'llorix_one_lite_56d450842cb39' ),
array( 'icon_value' => 'fa-google-plus-square' , 'link' => '#', 'id' => 'llorix_one_lite_56d450512cb38' ),
)
));

if ( ! empty( $llorix_one_lite_social_icons ) ) {

$llorix_one_lite_social_icons_decoded = json_decode( $llorix_one_lite_social_icons );

if ( ! empty( $llorix_one_lite_social_icons_decoded ) ) {

echo '<ul class="social-icons">';

foreach ( $llorix_one_lite_social_icons_decoded as $llorix_one_lite_social_icon ) {
if ( ! empty( $llorix_one_lite_social_icon->icon_value ) && ($llorix_one_lite_social_icon->icon_value != 'No Icon') ) {
explode( '-',$llorix_one_lite_social_icon->icon_value );
if ( ! empty( $llorix_one_lite_social_icon->icon_value[2] ) ) {
if ( function_exists( 'icl_t' ) ) {
echo '<li><a href="' . esc_url( icl_t( 'Footer Social Link',$llorix_one_lite_social_icon->id . '_footer_social_link', $llorix_one_lite_social_icon->link ) ) . '"><i class="fa llorix-one-lite-footer-icons ' . icl_t( 'Footer Social Icon',$llorix_one_lite_social_icon->id . '_footer_social_icon',esc_attr( $llorix_one_lite_social_icon->icon_value ) ) . ' transparent-text-dark" aria-hidden="true"></i><span class="screen-reader-text">' . esc_attr( $llorix_one_lite_social_icon->icon_value[2] ) . '</span></a></li>';
} else {
echo '<li><a href="' . esc_url( $llorix_one_lite_social_icon->link ) . '"><i class="fa llorix-one-lite-footer-icons ' . esc_attr( $llorix_one_lite_social_icon->icon_value ) . ' transparent-text-dark" aria-hidden="true"></i><span class="screen-reader-text">' . esc_attr( $llorix_one_lite_social_icon->icon_value[2] ) . '</span></a></li>';
}
}
}
}

echo '</ul>';

}
}
?>
$llorix_one_lite_social_icons = get_theme_mod('llorix_one_lite_social_icons', json_encode( array(
array(
'icon_value' => 'fa-facebook',
'link' => '#',
'id' => 'llorix_one_lite_56d069b78cb6e',
),
array(
'icon_value' => 'fa-twitter',
'link' => '#',
'id' => 'llorix_one_lite_56d450842cb39',
),
array(
'icon_value' => 'fa-google-plus-square',
'link' => '#',
'id' => 'llorix_one_lite_56d450512cb38',
),
) )
);
llorix_one_lite_social_icons( $llorix_one_lite_social_icons, true ); ?>

</div><!-- .footer-bottom-wrap -->

Expand Down
Loading

0 comments on commit 390334e

Please sign in to comment.