-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from codefoxes/dev
Version 2.0.0
- Loading branch information
Showing
130 changed files
with
18,755 additions
and
6,730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties" | ||
], | ||
"ignore": [ | ||
"node_modules/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "library/pro"] | ||
path = library/pro | ||
url = [email protected] | ||
[submodule "src/backend/colorwings"] | ||
path = src/backend/colorwings | ||
url = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Version 2.0.0 / Release: 25-10-2020 | ||
=================== | ||
- New: Visual CSS editor under "Extra Styles". | ||
- New: Unlimited Headers and Footers creator. | ||
- New: Individual post/page layout selector | ||
- Improvement: All visual styles are moved to "Extra Styles". | ||
- Improvement: Bootstrap update to 4.5.3. | ||
- Improvement: Show logo, title & tagline independently. | ||
- Improvement: Full-width & full-width container block support | ||
|
||
Version 1.2.4 / Release: 24-04-2020 | ||
=================== | ||
- Improvement: Remove Post meta boxes | ||
- Fix: Fix editor styles | ||
|
||
Version 1.2.1 / Release: 11-04-2020 | ||
=================== | ||
- Improvement: Removed options from the themes admin page | ||
- Improvement: Original (un-minified version) of the minified files are included | ||
- Improvement: "Disable emoji" feature is removed | ||
- Improvement: "Meta description" is removed | ||
- Improvement: All non-translatable text strings are converted into translatable strings. | ||
- Improvement: Escaping is added to untrusted data wherever appropriate. | ||
- Fix: Keyboard Navigation | ||
|
||
Version 1.2.0 / Release: 23-03-2020 | ||
=================== | ||
- New: Added presets | ||
- New: Added code customizer options | ||
- Improvement: Bundled Bootstrap with theme | ||
|
||
Version 1.1.0 / Release: 15-03-2020 | ||
=================== | ||
- New: Added Google Fonts | ||
- New: WooCommerce Support | ||
- New: Added Customizer Border | ||
- New: Added Customizer Color | ||
- New: Added Customizer Length | ||
- New: Editor Styles | ||
- New: Logo width and Height | ||
- Improvement: Better cover template selector | ||
- Improvement: Styles improvement | ||
- Improvement: Added more customizer options | ||
- Improvement: Multiple Customizer options with Hot reload | ||
- Improvement: Better CSS rendering | ||
- Improvement: Meta display options | ||
- Improvement: Better Template loader | ||
|
||
Version 1.0.0 / Release: 23-01-2020 | ||
=================== | ||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
<?php | ||
/** | ||
* Color Wings Admin Manager. | ||
* | ||
* @package ColorWings | ||
*/ | ||
|
||
namespace ColorWings; | ||
|
||
/** | ||
* Class Color Wings Admin. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
class ColorWings_Admin { | ||
/** | ||
* Holds the instances of this class. | ||
* | ||
* @since 1.0.0 | ||
* @access private | ||
* @var object | ||
*/ | ||
private static $instance; | ||
|
||
/** | ||
* Sets up Color Wings admin features. | ||
* | ||
* @since 1.0.0 | ||
* @access public | ||
* @return void | ||
*/ | ||
public function __construct() { | ||
$enable_color_wings = apply_filters( 'enable_color_wings', true ); | ||
if ( ! $enable_color_wings ) { | ||
return; | ||
} | ||
|
||
add_action( 'customize_register', array( $this, 'require_control_classes' ) ); | ||
add_action( 'customize_register', array( $this, 'register_controls' ) ); | ||
add_action( 'customize_register', array( $this, 'add_controls' ) ); | ||
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_preview_scripts' ), 20 ); | ||
} | ||
|
||
/** | ||
* Require control classes. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function require_control_classes() { | ||
require_once dirname( __FILE__ ) . '/class-control-colorwings.php'; | ||
require_once dirname( __FILE__ ) . '/class-control-link.php'; | ||
} | ||
|
||
/** | ||
* Enqueue Customizer Preview Scripts. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function enqueue_preview_scripts() { | ||
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; | ||
wp_enqueue_script( 'color-wings-preview', COLORWINGS_URL . '/js/color-wings-preview' . $min . '.js', array( 'react-dom', 'customize-preview' ), COLORWINGS_VERSION, true ); | ||
|
||
$preview_object = array( | ||
'pages' => array( | ||
'is_front_page' => is_front_page(), | ||
'is_home' => is_home(), | ||
'is_archive' => is_archive(), | ||
'is_page' => is_page(), | ||
'is_single' => is_single(), | ||
), | ||
'page' => array( | ||
'id' => get_the_ID(), | ||
'title' => get_the_title(), | ||
), | ||
); | ||
wp_localize_script( 'color-wings-preview', 'cwPreviewObject', $preview_object ); | ||
} | ||
|
||
/** | ||
* Register Custom Control. | ||
* | ||
* @since 1.0.0 | ||
* @param object $wp_customize WP_Customize_Manager. | ||
*/ | ||
public function register_controls( $wp_customize ) { | ||
$wp_customize->register_control_type( 'ColorWings\Control_ColorWings' ); | ||
$wp_customize->register_control_type( 'ColorWings\Control_Link' ); | ||
} | ||
|
||
/** | ||
* Add Custom Control. | ||
* | ||
* @since 1.0.0 | ||
* @param object $wp_customize WP_Customize_Manager. | ||
*/ | ||
public function add_controls( $wp_customize ) { | ||
$wp_customize->add_section( | ||
'extra_styles', | ||
array( | ||
'title' => __( 'Extra Styles', 'greenlet' ), | ||
'priority' => 900, | ||
'capability' => 'edit_theme_options', | ||
) | ||
); | ||
|
||
$wp_customize->add_setting( | ||
'color_wings', | ||
array( | ||
'type' => 'option', | ||
'capability' => 'edit_theme_options', | ||
'transport' => 'postMessage', | ||
'sanitize_callback' => array( $this, 'sanitize' ), | ||
'validate_callback' => array( $this, 'validate' ), | ||
) | ||
); | ||
|
||
$wp_customize->add_control( | ||
new Control_ColorWings( | ||
$wp_customize, | ||
'color_wings', | ||
array( 'section' => 'extra_styles' ) | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Sanitize ColorWings Settings. | ||
* | ||
* @since 1.0.0 | ||
* @access public | ||
* @param array $settings ColorWings Settings. | ||
* | ||
* @return array Sanitized settings. | ||
*/ | ||
public static function sanitize( $settings ) { | ||
if ( ! isset( $settings[ get_stylesheet() ] ) ) { | ||
return array(); | ||
} | ||
|
||
return $settings; | ||
} | ||
|
||
/** | ||
* Validate ColorWings Settings. | ||
* | ||
* @since 1.0.0 | ||
* @access public | ||
* @param \WP_Error $validity True if the input was validated, otherwise WP_Error. | ||
* @param array $settings ColorWings Settings. | ||
* | ||
* @return \WP_Error Validity object. | ||
*/ | ||
public static function validate( $validity, $settings ) { | ||
foreach ( $settings as $theme => $theme_data ) { | ||
foreach ( $theme_data as $type => $data ) { | ||
if ( isset( $data['styles'] ) && preg_match( '#</?\w+#', $data['styles'] ) ) { | ||
$validity->add( 'illegal_markup', __( 'Markup is not allowed in CSS.', 'greenlet' ) ); | ||
} | ||
} | ||
} | ||
|
||
return $validity; | ||
} | ||
|
||
/** | ||
* Returns the instance. | ||
* | ||
* @since 1.0.0 | ||
* @access public | ||
* @return object | ||
*/ | ||
public static function get_instance() { | ||
|
||
if ( ! self::$instance ) { | ||
self::$instance = new self(); | ||
} | ||
|
||
return self::$instance; | ||
} | ||
} |
Oops, something went wrong.