Skip to content

Commit

Permalink
FIX: conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
cheh committed Jun 13, 2017
2 parents d729181 + 82b0d25 commit 7d8e3b2
Show file tree
Hide file tree
Showing 108 changed files with 1,586 additions and 534 deletions.
1 change: 1 addition & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"modules/cherry-ui-elements/inc/ui-elements/ui-collection/assets/js/ui-collection.js",
"modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/jquery-iconpicker.js",
"modules/cherry-interface-builder/inc/assets/cherry-interface-builder.js",
"modules/cherry5-assets-loader/assets/var.js"
]
}
4 changes: 3 additions & 1 deletion .jshintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ modules/cherry-ui-elements/inc/ui-elements/ui-iconpicker/assets/jquery-iconpicke

#Cherry Framework
modules/cherry-ui-elements/inc/ui-elements/ui-media/assets/ui-media.js
modules/cherry-js-core/assets/js/cherry-js-core.js
modules/cherry-js-core/assets/js/cherry-js-core.js
modules/cherry5-assets-loader/assets/var.js
modules/cherry5-assets-loader/assets/append.js
129 changes: 65 additions & 64 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ language: php

# Declare versions of PHP to use. Use one decimal max.
php:
- "5.6"
- "5.5"
- "5.4"
- "5.3"
# Current $required_php_version for WordPress: 5.2.4
- "5.2"
- "7"
- "5.6"
- "5.5"
- "5.4"
- "5.3"
# Current $required_php_version for WordPress: 5.2.4
- "5.2"

# Ditch sudo and use containers.
# @link http://docs.travis-ci.com/user/migrating-from-legacy/#Why-migrate-to-container-based-infrastructure%3F
Expand All @@ -25,71 +26,71 @@ sudo: false
# Declare which versions of WordPress to test against.
# Also declare whether or not to test in Multisite.
env:
# Trunk (current version in development is 4.4)
# @link https://github.com/WordPress/WordPress
- WP_VERSION=master WP_MULTISITE=0
# Trunk (current version in development is 4.4)
# @link https://github.com/WordPress/WordPress
- WP_VERSION=master WP_MULTISITE=0

# Use this to prepare your build for testing.
# e.g. copy database configurations, environment variables, etc.
# Failures in this section will result in build status 'errored'.
before_script:
# Set up WordPress installation.
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
# Use the Git mirror of WordPress.
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
# Set up Twenty Sixteen theme information.
- theme_slug=$(basename $(pwd))
- theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug
- cd ..
- mv $theme_slug $theme_dir
# Set up WordPress configuration.
- cd $WP_DEVELOP_DIR
- echo $WP_DEVELOP_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
# Create WordPress database.
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
# Install CodeSniffer for WordPress Coding Standards checks.
- mkdir php-codesniffer && curl -L https://github.com/squizlabs/PHP_CodeSniffer/archive/master.tar.gz | tar xz --strip-components=1 -C php-codesniffer
# Install WordPress Coding Standards.
- mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
# Hop into CodeSniffer directory.
- cd php-codesniffer
# Set install path for WordPress Coding Standards
# @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941
- scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
# Hop into themes directory.
- cd $theme_dir
# After CodeSniffer install you should refresh your path.
- phpenv rehash
# Install JSCS: JavaScript Code Style checker
# @link http://jscs.info/
- npm install -g jscs
# Install JSHint, a JavaScript Code Quality Tool
# @link http://jshint.com/docs/
- npm install -g jshint
- wget https://develop.svn.wordpress.org/trunk/.jshintrc
# Set up WordPress installation.
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
# Use the Git mirror of WordPress.
- git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
# Set up Twenty Sixteen theme information.
- theme_slug=$(basename $(pwd))
- theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug
- cd ..
- mv $theme_slug $theme_dir
# Set up WordPress configuration.
- cd $WP_DEVELOP_DIR
- echo $WP_DEVELOP_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
# Create WordPress database.
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
# Install CodeSniffer for WordPress Coding Standards checks.
- mkdir php-codesniffer && curl -L https://github.com/squizlabs/PHP_CodeSniffer/archive/master.tar.gz | tar xz --strip-components=1 -C php-codesniffer
# Install WordPress Coding Standards.
- mkdir wordpress-coding-standards && curl -L https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/archive/master.tar.gz | tar xz --strip-components=1 -C wordpress-coding-standards
# Hop into CodeSniffer directory.
- cd php-codesniffer
# Set install path for WordPress Coding Standards
# @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941
- scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
# Hop into themes directory.
- cd $theme_dir
# After CodeSniffer install you should refresh your path.
- phpenv rehash
# Install JSCS: JavaScript Code Style checker
# @link http://jscs.info/
- npm install -g jscs
# Install JSHint, a JavaScript Code Quality Tool
# @link http://jshint.com/docs/
- npm install -g jshint
- wget https://develop.svn.wordpress.org/trunk/.jshintrc

# Run test script commands.
# Default is specific to project language.
# All commands must exit with code 0 on success. Anything else is considered failure.
script:
# Search theme for PHP syntax errors.
- find . \( -name '*.php' \) -exec php -lf {} \;
# Run the theme through JSHint
- jshint .
# Run the theme through JavaScript Code Style checker
- jscs .
# WordPress Coding Standards
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
# -p flag: Show progress of the run.
# -s flag: Show sniff codes in all reports.
# -v flag: Print verbose output.
# -n flag: Do not print warnings (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php
# Search theme for PHP syntax errors.
- find . \( -name '*.php' \) -exec php -lf {} \;
# Run the theme through JSHint
- jshint .
# Run the theme through JavaScript Code Style checker
- jscs .
# WordPress Coding Standards
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
# -p flag: Show progress of the run.
# -s flag: Show sniff codes in all reports.
# -v flag: Print verbose output.
# -n flag: Do not print warnings (shortcut for --warning-severity=0)
# --standard: Use WordPress as the standard.
# --extensions: Only sniff PHP files.
- $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php
102 changes: 102 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,108 @@ Module system.
* [@Sargas](https://github.com/SargasTM) - **Developer**
* [@Shin](https://github.com/shinTM) - **Developer**

## Changelog

### v1.4.3

* ADD: new module - `cherry5-assets-loader`
* ADD: lock-option feature
* ADD: 3rd parameter `$this` for `cherry_breadcrumbs_items` filter
* ADD: new property - module version (using in register/enqueue css and js files)
* ADD: `dropdown-pages` control in `cherry-customizer` module
* UPD: style for widgets
* UPD: use `cherry-interface-builder` in widget form
* UPD: remove deprecated methods in `cherry-widget-factory` module
* UPD: added check for AJAX-handlers in `cherry-handler` module
* UPD: copyright years
* FIX: `cherry-handler` module
* FIX: placeholder attribute in `UI-select`
* FIX: allow home link in breadcrumbs inherit main page title
* FIX: function `get_terms_array()` in `cherry-utility` module
* FIX: HTML validation for `UI-elements`

### v1.4.2

* HOTFIX: `iconpicker` control for `cherry-customizer` module

### v1.4.1

* ADD: allow to filter CSS reserved words while parsing functions
* ADD: async query in `cherry-handler` module
* UPD: UI-kit styles (UI-button, UI-text, UI-textarea, UI-stepper, UI-colorpicker, UI-switcher, UI-select, UI-media)
* UPD: use `wp_add_inline_style` instead of `wp_head` for printing inline CSS
* UPD: UI-button class prefix
* UPD: `cherry5-insert-shortcode` module styles
* UPD: allow to use description argument in iconpicker
* FIX: UI-repeater, UI-radio master and slave bug
* FIX: `cherry-template-manager` module
* FIX: change `meta_key` in `cherry-utility` module - #149

### v1.4.0

* ADD: new modules - `cherry5-insert-shortcode`, `cherry-db-udpates`
* ADD: text-domain
* FIX: compatibility with WordPress 4.7
* FIX: sanitization method in `cherry-utility` - #141
* FIX: duplicate argument in UI-button - #126
* UPD: license link in php-file headers

### v1.3.1

* ADD: macros filter into `cherry-template-manager` module
* ADD: function `bg-image()` into `cherry-dynamic-css` module
* UPD: `cherry-interface-builder` module styles
* UPD: Google fonts json-file
* FIX: Issues [#124](https://github.com/CherryFramework/cherry-framework/issues/124)
* FIX: Issues [#123](https://github.com/CherryFramework/cherry-framework/issues/123)
* FIX: Issues [#120](https://github.com/CherryFramework/cherry-framework/issues/120)
* FIX: Issues [#118](https://github.com/CherryFramework/cherry-framework/issues/118)
* FIX: Issues [#116](https://github.com/CherryFramework/cherry-framework/issues/116)
* FIX: Issues [#115](https://github.com/CherryFramework/cherry-framework/issues/115)
* FIX: UI-media button
* DEL: system notices in `cherry-handler` module

### v1.3.0

* ADD: UI-button
* ADD: new modules - `cherry-handler`, `cherry-template-manager`
* ADD: dynamic CSS collector
* UPD: re-factoring methods calling in `cherry-post-meta` module
* FIX: replace `file_get_contents` to prevent validation errors
* FIX: post meta saving
* FIX: [#81](https://github.com/CherryFramework/cherry-framework/issues/81)
* FIX: [#96](https://github.com/CherryFramework/cherry-framework/issues/96)
* FIX: [#100](https://github.com/CherryFramework/cherry-framework/issues/100)
* FIX: [#102](https://github.com/CherryFramework/cherry-framework/issues/102)
* FIX: [#109](https://github.com/CherryFramework/cherry-framework/issues/109)
* DEL: `cherry-page-builder` module

### v1.2.0

* ADD: new module: `cherry-interface-builder`
* UPD: `cherry-utility` module:
1) fix for the `cut_text` method
2) added `get_placeholder_url` method
* UPD: UI-elements:
1) added an option to disable ui_kit for the repeater element
2) updated master/salve js logic in UI-elements
3) updated HTML markup for UI-switcher, `input type="hiden"` replaced with double `input type="radio"`
* UPD: `cherry-customizer` module: file system method replaced with native WordPress method
* UPD: `cherry-post-meta` module:
1) added data processing procedure before saving to the database
2) added an option to add columns to the post listing page in the admin panel.
* FIX: PHP-errors in `cherry-post-format-api`
* DEL: remove unnecessary modules: `cherry-taxonomies`, `cherry-post-types`, `cherry-creator`

### v1.1.0

* FIX: saving process in `cherry-post-meta` module

### v1.0.0

* Init stable version


## Help
Found a bug? Feature requests? [Create an issue - Thanks!](https://github.com/CherryFramework/cherry-framework/issues/new)

Expand Down
16 changes: 11 additions & 5 deletions cherry-core.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Class Cherry Core
* Version: 1.4.2
* Version: 1.4.3
*
* @package Cherry_Framework
* @subpackage Class
Expand Down Expand Up @@ -122,9 +122,11 @@ private function run_collector() {
$path = $this->get_module_path( $module );

if ( ! array_key_exists( $module, self::$all_modules ) ) {
self::$all_modules[ $module ] = array( $priority => $path );
} else {
self::$all_modules[ $module ] = array(
$priority => $path,
);

} else {
$old_priority = array_keys( self::$all_modules[ $module ] );

if ( ! is_array( $old_priority ) || ! isset( $old_priority[0] ) ) {
Expand All @@ -137,7 +139,9 @@ private function run_collector() {
continue;
}

self::$all_modules[ $module ] = array( $priority => $path );
self::$all_modules[ $module ] = array(
$priority => $path,
);
}
}

Expand Down Expand Up @@ -304,7 +308,9 @@ public function get_module_instance( $module, $args = array() ) {
return false;
}

return $this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );
$this->modules[ $module ] = call_user_func( array( $class_name, 'get_instance' ), $this, $args );

return $this->modules[ $module ];
}

/**
Expand Down
35 changes: 19 additions & 16 deletions codesniffer.ruleset.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
<?xml version="1.0"?>
<ruleset name="WordPress Theme Coding Standards">
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->

<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description>
<!-- Set a description for this ruleset. -->
<description>A custom set of code standard rules to check for WordPress themes.</description>

<!-- Include the WordPress ruleset, with space for exclusions if necessary. -->
<rule ref="WordPress-Core">
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<!-- Include the WordPress ruleset, with space for exclusions if necessary. -->
<rule ref="WordPress-Core">
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />

<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />

<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
</rule>
<rule ref="WordPress-Docs">
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
<exclude name="Squiz.Commenting.LongConditionClosingComment.Missing" />

</rule>
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<rule ref="WordPress-Docs">

</rule>
</ruleset>
Loading

0 comments on commit 7d8e3b2

Please sign in to comment.