├── includes
├── index.php
├── class-colorlib-login-customizer-autoloader.php
├── lib
│ ├── controls
│ │ ├── class-colorlib-login-customizer-background-control.php
│ │ ├── class-colorlib-login-customizer-control-color-picker.php
│ │ ├── class-colorlib-login-customizer-column-width.php
│ │ ├── class-colorlib-login-customizer-range-slider-control.php
│ │ ├── class-colorlib-login-customizer-control-toggle.php
│ │ ├── class-colorlib-login-customizer-button-group-control.php
│ │ └── class-colorlib-login-customizer-template-control.php
│ └── class-colorlib-login-customizer-settings.php
├── class-colorlib-login-customizer-backwards-compatibility.php
├── class-colorlib-login-customizer-review.php
├── login-template.php
└── class-colorlib-login-customizer.php
├── .jshintignore
├── .jscsrc
├── assets
├── img
│ ├── default.jpg
│ ├── tpl-03
│ │ ├── bg.jpg
│ │ └── screen.jpg
│ ├── background-1.jpg
│ ├── background.jpg
│ ├── four-column.png
│ ├── one-column.png
│ ├── template-01.jpg
│ ├── template-02.jpg
│ ├── three-column.png
│ ├── two-column.png
│ ├── form-align-top.jpg
│ ├── tpl-04
│ │ └── screen.jpg
│ ├── form-align-bottom.jpg
│ ├── form-align-left.jpg
│ ├── form-align-right.jpg
│ ├── form-vertical-align-top.png
│ ├── form-horizontal-align-left.png
│ ├── form-horizontal-align-right.png
│ ├── form-vertical-align-bottom.png
│ ├── form-vertical-align-middle.png
│ └── minicolors
│ │ └── jquery.minicolors.png
├── css
│ ├── clc-customizer-previewer.css
│ ├── jquery.minicolors.css
│ └── clc-customizer.css
└── js
│ ├── clc-preview.js
│ ├── jquery.minicolors.min.js
│ └── clc-customizer.js
├── .gitignore
├── uninstall.php
├── .jshintrc
├── package.json
├── phpcs.ruleset.xml
├── set_tags.sh
├── colorlib-login-customizer.php
├── .travis.yml
├── Gruntfile.js
├── readme.txt
├── languages
└── colorlib-login-customizer.po
└── LICENSE.txt
/includes/index.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | A custom set of code standard rules to check for WordPress themes and plugins.
8 |
9 |
10 |
11 |
12 | */node_modules/*
13 | */woocommerce/*
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/set_tags.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | BRANCH="master"
3 |
4 | # Are we on the right branch?
5 | if [ "$TRAVIS_BRANCH" = "$BRANCH" ]; then
6 |
7 | # Is this not a Pull Request?
8 | if [ "$TRAVIS_PULL_REQUEST" = false ]; then
9 |
10 | # Is this not a build which was triggered by setting a new tag?
11 | if [ -z "$TRAVIS_TAG" ]; then
12 | echo -e "Starting to tag commit.\n"
13 | PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
14 |
15 | git config --global user.email "travis@travis-ci.org"
16 | git config --global user.name "Travis"
17 |
18 | # Add tag and push to master.
19 | git tag -a v${PACKAGE_VERSION} -m "Travis build $PACKAGE_VERSION pushed a tag."
20 | git push origin --tags
21 | git fetch origin
22 |
23 | echo -e "Done magic with tags.\n"
24 | fi
25 | fi
26 | fi
--------------------------------------------------------------------------------
/assets/css/clc-customizer-previewer.css:
--------------------------------------------------------------------------------
1 | .clc-general-actions {
2 | position: absolute;
3 | top: 10px;
4 | left: 10px;
5 | z-index: 99;
6 | }
7 |
8 | .clc-preview-event {
9 | cursor: pointer;
10 | background-color: #008ec2;
11 | border-radius: 100%;
12 | color: #fff;
13 | width: 30px;
14 | height: 30px;
15 | text-align: center;
16 | border: 2px solid #fff;
17 | box-shadow: 0 2px 1px rgba(46,68,83,.15);
18 | }
19 | .clc-preview-event > span {
20 | margin-top: 5px;
21 | }
22 |
23 | .clc-general-actions > .clc-preview-event {
24 | display: inline-block;
25 | }
26 | .login h1 a {
27 | text-indent: initial;
28 | position: relative;
29 | overflow: visible;
30 | }
31 | .login h1 a .clc-preview-event {
32 | position: absolute;
33 | left: -15px;
34 | top: -15px;
35 | }
36 | .login:not(.clc-both-logo) h1 a #logo-text {
37 | display: none;
38 | }
39 | .login.clc-text-logo h1 a #logo-text{
40 | display: block;
41 | }
42 |
--------------------------------------------------------------------------------
/includes/class-colorlib-login-customizer-autoloader.php:
--------------------------------------------------------------------------------
1 | register_control_type( 'Colorlib_Login_Customizer_Background_Control' );
26 | }
27 |
28 | /**
29 | * Add custom parameters to pass to the JS via JSON.
30 | *
31 | * @since 1.1.0
32 | * @access public
33 | */
34 | public function json() {
35 | $json = parent::json();
36 |
37 | $json['id'] = $this->id;
38 | $json['link'] = $this->get_link();
39 | $json['gallery'] = $this->generate_gallery();
40 |
41 | return $json;
42 | }
43 |
44 | private function generate_gallery() {
45 |
46 | if ( ! is_array( $this->default_backgrounds ) ) {
47 | return array();
48 | }
49 |
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/includes/class-colorlib-login-customizer-backwards-compatibility.php:
--------------------------------------------------------------------------------
1 | register_control_type( 'Colorlib_Login_Customizer_Control_Color_Picker' );
43 | }
44 |
45 | /**
46 | * Add custom parameters to pass to the JS via JSON.
47 | *
48 | * @since 1.2.0
49 | * @access public
50 | */
51 | public function json() {
52 | $json = parent::json();
53 |
54 | $json['id'] = $this->id;
55 | $json['link'] = $this->get_link();
56 | $json['value'] = $this->value();
57 | $json['default'] = $this->setting->default;
58 | $json['mode'] = '' !== $this->mode ? $this->mode : 'hex';
59 | $json['lite'] = $this->lite;
60 |
61 | return $json;
62 | }
63 |
64 | /**
65 | * Display the control's content
66 | */
67 | public function content_template() {
68 | //@formatter:off ?>
69 | class="lite"<# } #>>
70 | placeholder="{{ data.default }}"<# } #> <# if(data.value){ #> value="{{ data.value }}" <# } #> />
71 |
72 | {{{ data.label }}}
73 | <# if( data.default ){ #>
74 |
75 | <# } #>
76 |
77 | <# if( data.description ){ #>
78 | {{{ data.description }}}
79 | <# } #>
80 |
81 |
82 | settings)) {
54 | $instance->settings = Colorlib_Login_Customizer_Settings::instance($instance);
55 | }
56 |
57 | return $instance;
58 | }
59 |
60 | function clc_check_for_review() {
61 |
62 | require_once COLORLIB_LOGIN_CUSTOMIZER_BASE . 'includes/class-colorlib-login-customizer-review.php';
63 |
64 | CLC_Review::get_instance( array(
65 | 'slug' => 'colorlib-login-customizer',
66 | ) );
67 | }
68 |
69 | add_action( 'admin_init', 'clc_check_for_review' );
70 | colorlib_login_customizer();
71 |
--------------------------------------------------------------------------------
/includes/lib/controls/class-colorlib-login-customizer-column-width.php:
--------------------------------------------------------------------------------
1 | register_control_type( 'Colorlib_Login_Customizer_Column_Width' );
31 | }
32 |
33 | /**
34 | * Add custom parameters to pass to the JS via JSON.
35 | *
36 | * @since 1.1.0
37 | * @access public
38 | */
39 | public function json() {
40 | $json = parent::json();
41 | $json['id'] = $this->id;
42 | $json['link'] = $this->get_link();
43 | $json['value'] = $this->get_columns();
44 |
45 | return $json;
46 | }
47 |
48 | /**
49 | * Set value
50 | */
51 | public function get_columns() {
52 | $default = array(
53 | 'left' => 6,
54 | 'right' => 6
55 | );
56 | $current_columns = $this->value();
57 | $current_columns = is_array( $current_columns ) ? $current_columns : array();
58 |
59 | return wp_parse_args( $current_columns, $default );
60 | }
61 |
62 | /**
63 | * Display the control's content
64 | */
65 | public function content_template() {
66 | //@formatter:off ?>
67 |
68 |
69 |
70 | {{{ data.label }}}
71 | <# if( data.description ){ #>
72 |
73 |
74 | {{{ data.description }}}
75 |
76 |
77 | <# } #>
78 |
79 |
80 |
90 |
91 | register_section_type( 'Colorlib_Login_Customizer_Range_Slider_Control' );
39 | parent::__construct( $manager, $id, $args );
40 | if ( isset( $args['default'] ) ) {
41 | $this->default = $args['default'];
42 | }
43 | }
44 |
45 | /**
46 | * Enqueue scripts/styles.
47 | *
48 | * @since 1.0.0
49 | * @access public
50 | * @return void
51 | */
52 | public function enqueue() {
53 | wp_enqueue_script( 'jquery-ui' );
54 | wp_enqueue_script( 'jquery-ui-slider' );
55 | }
56 |
57 | public function get_value() {
58 | $value = $this->value();
59 | if ( ! $value && isset( $this->default ) ) {
60 | return $this->default;
61 | }
62 |
63 | return $value;
64 | }
65 |
66 | public function to_json() {
67 |
68 | $default_choices = array(
69 | 'min' => 1,
70 | 'max' => 10,
71 | 'step' => 1,
72 | );
73 |
74 | $this->choices = wp_parse_args( $this->choices, $default_choices );
75 |
76 | parent::to_json();
77 | $this->json['value'] = $this->get_value();
78 | $this->json['id'] = $this->id;
79 | $this->json['link'] = $this->get_link();
80 | $this->json['choices'] = $this->choices;
81 | }
82 |
83 | /**
84 | * Displays the control content.
85 | *
86 | * @since 1.0.0
87 | * @access public
88 | * @return void
89 | */
90 | public function render_content() {
91 | }
92 |
93 | public function content_template() {
94 | ?>
95 |
96 |
97 | <# if ( data.label != '' ){ #>
98 | {{ data.label }}
99 | <# } #>
100 | <# if ( data.description != '' ){ #>
101 |
102 | {{ data.description }}
103 |
104 | <# } #>
105 |
106 |
107 |
108 |
109 | register_control_type( 'Colorlib_Login_Customizer_Control_Toggle' );
26 | }
27 |
28 | /**
29 | * Add custom parameters to pass to the JS via JSON.
30 | *
31 | * @since 1.0.0
32 | * @access public
33 | */
34 | public function json() {
35 | $json = parent::json();
36 |
37 | $json['id'] = $this->id;
38 | $json['link'] = $this->get_link();
39 | $json['value'] = $this->value();
40 |
41 | return $json;
42 | }
43 |
44 | /**
45 | * Empty, as it should.
46 | *
47 | * @since 1.0.0
48 | * @access public
49 | * @return void
50 | */
51 | public function render_content() {}
52 |
53 | /**
54 | * @since 1.0.0
55 | * @access public
56 | */
57 | public function content_template() {
58 | //@formatter:off
59 | ?>
60 |
61 |
62 | {{{ data.label }}}
63 | <# if( data.description ){ #>
64 |
65 |
66 | {{{ data.description }}}
67 |
68 |
69 | <# } #>
70 |
71 |
72 |
checked="checked" <# } #> >
76 |
77 |
78 |
79 |
81 |
82 |
83 |
85 |
86 |
87 |
88 |
89 |
90 | register_control_type( 'Colorlib_Login_Customizer_Button_Group_Control' );
41 | }
42 |
43 | /**
44 | * Add custom parameters to pass to the JS via JSON.
45 | *
46 | * @since 1.1.0
47 | * @access public
48 | */
49 | public function json() {
50 | $json = parent::json();
51 | $json['id'] = $this->id;
52 | $json['link'] = $this->get_link();
53 | $json['value'] = $this->value();
54 | $json['default'] = $this->default;
55 | $json['choices'] = $this->choices;
56 | $json['groupType'] = $this->set_group_type();
57 |
58 | $this->json['inputAttrs'] = '';
59 | foreach ( $this->input_attrs as $attr => $value ) {
60 | $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" ';
61 | }
62 |
63 | return $json;
64 | }
65 |
66 | /**
67 | * Set group type
68 | */
69 | public function set_group_type() {
70 | $arr = array(
71 | 0 => 'none',
72 | 1 => 'one',
73 | 2 => 'two',
74 | 3 => 'three',
75 | 4 => 'four',
76 | );
77 |
78 | return $arr[ count( $this->choices ) ];
79 | }
80 |
81 | /**
82 | * Display the control's content
83 | */
84 | public function content_template() {
85 | //@formatter:off ?>
86 |
87 |
88 |
89 | {{{ data.label }}}
90 | <# if( data.description ){ #>
91 |
92 |
93 | {{{ data.description }}}
94 |
95 |
96 | <# } #>
97 |
98 |
99 |
114 |
115 | register_section_type( 'Colorlib_Login_Customizer_Template_Control' );
37 | parent::__construct( $manager, $id, $args );
38 | }
39 |
40 | /**
41 | * Add custom parameters to pass to the JS via JSON.
42 | *
43 | * @access public
44 | * @since 1.1.7
45 | * @return void
46 | */
47 | public function to_json() {
48 | parent::to_json();
49 |
50 | $arrays = $this->generate_arrays();
51 |
52 | // The setting value.
53 | $this->json['id'] = $this->id;
54 | $this->json['value'] = $this->value();
55 | $this->json['link'] = $this->get_link();
56 | $this->json['choices'] = $arrays['choices'];
57 | $this->json['options'] = $arrays['options'];
58 |
59 | }
60 |
61 | private function generate_name( $id ) {
62 | return 'clc-options[' . $id . ']';
63 | }
64 |
65 | public function generate_arrays() {
66 | $arrays = array(
67 | 'choices' => array(),
68 | 'options' => array(),
69 | );
70 |
71 | foreach ( $this->choices as $key => $choice ) {
72 | $arrays['choices'][ $key ] = $choice['url'];
73 | $arrays['options'][ $key ] = array();
74 | foreach ( $choice['options'] as $option_key => $option_value ) {
75 | $name = $this->generate_name( $option_key );
76 | $arrays['options'][ $key ][ $option_key ] = array(
77 | 'name' => $name,
78 | 'value' => $option_value
79 | );
80 | }
81 | }
82 |
83 | return $arrays;
84 |
85 | }
86 |
87 | /**
88 | * Don't render the content via PHP. This control is handled with a JS template.
89 | *
90 | * @access public
91 | * @since 1.0.0
92 | * @return void
93 | */
94 | public function render_content() {}
95 |
96 | /**
97 | * An Underscore (JS) template for this control's content.
98 | *
99 | * Class variables for this control class are available in the `data` JS object;
100 | * export custom variables by overriding {@see WP_Customize_Control::to_json()}.
101 | *
102 | * @see WP_Customize_Control::print_template()
103 | *
104 | * @access protected
105 | * @since 1.1.7
106 | * @return void
107 | */
108 | protected function content_template() {
109 | ?>
110 |
111 | <# if ( ! data.choices ) {
112 | return;
113 | } #>
114 |
115 | <# if ( data.description ) { #>
116 | {{ data.description }}
117 | <# } #>
118 |
119 |
120 |
121 | <# for ( choice in data.choices ) { #>
122 |
123 |
124 |
125 |
126 |
129 |
130 |
131 | <# } #>
132 |
133 |
134 |
135 | parent = $parent;
47 |
48 | // Add settings page to menu
49 | add_action( 'admin_menu', array( $this, 'add_menu_item' ) );
50 |
51 | // Add settings link to plugins page
52 | add_filter(
53 | 'plugin_action_links_' . plugin_basename( $this->parent->file ), array(
54 | $this,
55 | 'add_settings_link',
56 | )
57 | );
58 | }
59 |
60 |
61 | /**
62 | * Add settings page to admin menu
63 | *
64 | * @return void
65 | */
66 | public function add_menu_item() {
67 | $page = add_menu_page(
68 | esc_html__( 'Colorlib Login Customizer', 'colorlib-login-customizer' ), esc_html__( 'Login Customizer', 'colorlib-login-customizer' ), 'manage_options', $this->parent->_token . '_settings', array(
69 | $this,
70 | 'settings_page',
71 | ), 'dashicons-share-alt'
72 | );
73 | }
74 |
75 | /**
76 | * Add settings link to plugin list table
77 | *
78 | * @param array $links Existing links
79 | *
80 | * @return array Modified links
81 | */
82 | public function add_settings_link( $links ) {
83 | $settings_link = '' . __( 'Settings', 'colorlib-login-customizer' ) . ' ';
84 | array_push( $links, $settings_link );
85 |
86 | return $links;
87 | }
88 |
89 | /**
90 | * Load settings page content
91 | *
92 | * @return void
93 | */
94 | public function settings_page() {
95 |
96 | // Build page HTML
97 | $html = '' . "\n";
98 | $html .= '
' . esc_html__( 'Colorlib Login Customizer', 'colorlib-login-customizer' ) . ' ' . "\n";
99 | $html .= '
' . esc_html__( 'Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! You can preview your changes before you save them! Awesome, right?', 'colorlib-login-customizer' ) . '
';
100 | $html .= '
' . __( 'Start Customizing!', 'colorlib-login-customizer' ) . ' ';
101 | $html .= '
' . "\n";
102 |
103 | echo $html;
104 | }
105 |
106 | /**
107 | * Main Colorlib_Login_Customizer_Settings Instance
108 | *
109 | * Ensures only one instance of Colorlib_Login_Customizer_Settings is loaded or can be loaded.
110 | *
111 | * @since 1.0.0
112 | * @static
113 | * @see Colorlib_Login_Customizer()
114 | * @return Main Colorlib_Login_Customizer_Settings instance
115 | */
116 | public static function instance( $parent ) {
117 | if ( is_null( self::$_instance ) ) {
118 | self::$_instance = new self( $parent );
119 | }
120 |
121 | return self::$_instance;
122 | } // End instance()
123 |
124 | /**
125 | * Cloning is forbidden.
126 | *
127 | * @since 1.0.0
128 | */
129 | public function __clone() {
130 | _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'colorlib-login-customizer' ), $this->parent->_version );
131 | } // End __clone()
132 |
133 | /**
134 | * Unserializing instances of this class is forbidden.
135 | *
136 | * @since 1.0.0
137 | */
138 | public function __wakeup() {
139 | _doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'colorlib-login-customizer' ), $this->parent->_version );
140 | } // End __wakeup()
141 |
142 | }
143 |
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function(grunt) {
2 | // load all tasks
3 | require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
4 |
5 | grunt.initConfig({
6 | pkg: grunt.file.readJSON('package.json'),
7 | checktextdomain: {
8 | standard: {
9 | options:{
10 | text_domain: [ 'colorlib-login-customizer' ], //Specify allowed domain(s)
11 | create_report_file: "true",
12 | keywords: [ //List keyword specifications
13 | '__:1,2d',
14 | '_e:1,2d',
15 | '_x:1,2c,3d',
16 | 'esc_html__:1,2d',
17 | 'esc_html_e:1,2d',
18 | 'esc_html_x:1,2c,3d',
19 | 'esc_attr__:1,2d',
20 | 'esc_attr_e:1,2d',
21 | 'esc_attr_x:1,2c,3d',
22 | '_ex:1,2c,3d',
23 | '_n:1,2,4d',
24 | '_nx:1,2,4c,5d',
25 | '_n_noop:1,2,3d',
26 | '_nx_noop:1,2,3c,4d'
27 | ]
28 | },
29 | files: [{
30 | src: [
31 | '**/*.php',
32 | '!**/node_modules/**',
33 | ], //all php
34 | expand: true,
35 | }],
36 | }
37 | },
38 | makepot: {
39 | target: {
40 | options: {
41 | cwd: '', // Directory of files to internationalize.
42 | domainPath: 'languages/', // Where to save the POT file.
43 | exclude: [], // List of files or directories to ignore.
44 | include: [], // List of files or directories to include.
45 | mainFile: 'colorlib-login-customizer.php', // Main project file.
46 | potComments: '', // The copyright at the beginning of the POT file.
47 | potFilename: 'colorlib-login-customizer.po', // Name of the POT file.
48 | potHeaders: {
49 | poedit: true, // Includes common Poedit headers.
50 | 'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
51 | }, // Headers to add to the generated POT file.
52 | processPot: null, // A callback function for manipulating the POT file.
53 | type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
54 | updateTimestamp: true, // Whether the POT-Creation-Date should be updated without other changes.
55 | updatePoFiles: false // Whether to update PO files in the same directory as the POT file.
56 | }
57 | }
58 | },
59 | clean: {
60 | init: {
61 | src: ['build/']
62 | },
63 | build: {
64 | src: [
65 | 'build/*',
66 | '!build/<%= pkg.name %>.zip'
67 | ]
68 | }
69 | },
70 | copy: {
71 | build: {
72 | expand: true,
73 | src: [
74 | '**',
75 | '!node_modules/**',
76 | '!vendor/**',
77 | '!build/**',
78 | '!readme.md',
79 | '!README.md',
80 | '!phpcs.ruleset.xml',
81 | '!Gruntfile.js',
82 | '!package.json',
83 | '!package-lock.json',
84 | '!composer.json',
85 | '!composer.lock',
86 | '!set_tags.sh',
87 | '!colorlib-login-customizer.zip',
88 | '!nbproject/**' ],
89 | dest: 'build/'
90 | }
91 | },
92 | compress: {
93 | build: {
94 | options: {
95 | pretty: true, // Pretty print file sizes when logging.
96 | archive: '<%= pkg.name %>.zip'
97 | },
98 | expand: true,
99 | cwd: 'build/',
100 | src: ['**/*'],
101 | dest: '<%= pkg.name %>/'
102 | }
103 | },
104 | });
105 |
106 | grunt.registerTask( 'i18n', ['checktextdomain', 'makepot']);
107 | // Build task
108 | grunt.registerTask( 'build-archive', [
109 | 'i18n',
110 | 'clean:init',
111 | 'copy',
112 | 'compress:build',
113 | 'clean:init'
114 | ]);
115 | };
--------------------------------------------------------------------------------
/includes/class-colorlib-login-customizer-review.php:
--------------------------------------------------------------------------------
1 | slug = $args['slug'];
17 | }
18 |
19 | $this->value = $this->value();
20 |
21 | $this->messages = array(
22 | 'notice' => __( "Hey, I noticed you have installed our Colorlib Login Customizer plugin for %s day(s) - that's awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress? Just to help us spread the word and boost our motivation.", 'colorlib-login-customizer' ),
23 | 'rate' => __( 'Ok, you deserve it', 'colorlib-login-customizer' ),
24 | 'rated' => __( 'I already did', 'colorlib-login-customizer' ),
25 | 'no_rate' => __( 'No, not good enough', 'colorlib-login-customizer' ),
26 | );
27 |
28 | if ( isset( $args['messages'] ) ) {
29 | $this->messages = wp_parse_args( $args['messages'], $this->messages );
30 | }
31 |
32 | $this->init();
33 |
34 | }
35 |
36 | public static function get_instance( $args ) {
37 | if ( null === static::$instance ) {
38 | static::$instance = new static( $args );
39 | }
40 |
41 | return static::$instance;
42 | }
43 |
44 | private function init() {
45 | if ( ! is_admin() ) {
46 | return;
47 | }
48 |
49 | add_action( 'wp_ajax_clc_epsilon_review', array( $this, 'ajax' ) );
50 |
51 | if ( $this->check() ) {
52 | add_action( 'admin_notices', array( $this, 'five_star_wp_rate_notice' ) );
53 | add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
54 | add_action( 'admin_print_footer_scripts', array( $this, 'ajax_script' ) );
55 | }
56 |
57 | }
58 |
59 | private function check() {
60 |
61 | $options = get_option( 'clc-options' );
62 | $option = isset( $options['givemereview'] ) ? $options['givemereview'] : '';
63 |
64 | if ( 'already-rated' == $option ) {
65 | return false;
66 | }
67 |
68 | if ($this->value == $option && '' != $option) {
69 | return false;
70 | }
71 |
72 | if ( is_array( $this->when ) ) {
73 | foreach ( $this->when as $et ) {
74 | if ( $et == $this->value ) {
75 | return true;
76 | }
77 |
78 | }
79 | }
80 |
81 | }
82 |
83 | private function value() {
84 |
85 | $value = get_transient( 'clc_review' );
86 |
87 | if ( $value ) {
88 | $current_time = time(); // or your date as well
89 | $trans_date = strtotime($value);
90 | $date_diff = $current_time - $trans_date;
91 | return round($date_diff / (60 * 60 * 24));
92 | }
93 |
94 | $date = date( 'Y-m-d' );
95 | set_transient( 'clc_review', $date, 24 * 30 * HOUR_IN_SECONDS );
96 |
97 | }
98 |
99 | public function five_star_wp_rate_notice() {
100 |
101 | $url = sprintf( $this->link, $this->slug );
102 |
103 | ?>
104 |
115 | value;
128 | }
129 |
130 | update_option( 'clc-options', $options );
131 |
132 | wp_die( 'ok' );
133 |
134 | }
135 |
136 | public function enqueue() {
137 | wp_enqueue_script( 'jquery' );
138 | }
139 |
140 | public function ajax_script() {
141 |
142 | $ajax_nonce = wp_create_nonce( "epsilon-review" );
143 |
144 | ?>
145 |
146 |
195 |
196 | div {
164 | position: absolute;
165 | top: 0;
166 | left: 0;
167 | width: 8px;
168 | height: 8px;
169 | border-radius: 8px;
170 | border: solid 2px white;
171 | box-sizing: content-box;
172 | }
173 |
174 | .minicolors-picker {
175 | position: absolute;
176 | top: 0;
177 | left: 0;
178 | width: 18px;
179 | height: 2px;
180 | background: white;
181 | border: solid 1px black;
182 | margin-top: -2px;
183 | box-sizing: content-box;
184 | }
185 |
186 | /* Swatches */
187 | .minicolors-swatches,
188 | .minicolors-swatches li {
189 | margin: 5px 0 3px 5px;
190 | padding: 0;
191 | list-style: none;
192 | overflow: hidden;
193 | }
194 |
195 | .minicolors-swatches .minicolors-swatch {
196 | position: relative;
197 | float: left;
198 | cursor: pointer;
199 | margin:0 4px 0 0;
200 | }
201 |
202 | .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
203 | margin-right: 7px;
204 | }
205 |
206 | .minicolors-swatch.selected {
207 | border-color: #000;
208 | }
209 |
210 | /* Inline controls */
211 | .minicolors-inline {
212 | display: inline-block;
213 | }
214 |
215 | .minicolors-inline .minicolors-input {
216 | display: none !important;
217 | }
218 |
219 | .minicolors-inline .minicolors-panel {
220 | position: relative;
221 | top: auto;
222 | left: auto;
223 | box-shadow: none;
224 | z-index: auto;
225 | display: inline-block;
226 | }
227 |
228 | /* Default theme */
229 | .minicolors-theme-default .minicolors-swatch {
230 | top: 5px;
231 | left: 5px;
232 | width: 18px;
233 | height: 18px;
234 | }
235 | .minicolors-theme-default .minicolors-swatches .minicolors-swatch {
236 | margin-bottom: 2px;
237 | top: 0;
238 | left: 0;
239 | width: 18px;
240 | height: 18px;
241 | }
242 | .minicolors-theme-default.minicolors-position-right .minicolors-swatch {
243 | left: auto;
244 | right: 5px;
245 | }
246 | .minicolors-theme-default.minicolors {
247 | width: auto;
248 | display: inline-block;
249 | }
250 | .minicolors-theme-default .minicolors-input {
251 | height: 20px;
252 | width: auto;
253 | display: inline-block;
254 | padding-left: 26px;
255 | }
256 | .minicolors-theme-default.minicolors-position-right .minicolors-input {
257 | padding-right: 26px;
258 | padding-left: inherit;
259 | }
260 |
261 | /* Bootstrap theme */
262 | .minicolors-theme-bootstrap .minicolors-swatch {
263 | z-index: 2;
264 | top: 3px;
265 | left: 3px;
266 | width: 28px;
267 | height: 28px;
268 | border-radius: 3px;
269 | }
270 | .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
271 | margin-bottom: 2px;
272 | top: 0;
273 | left: 0;
274 | width: 20px;
275 | height: 20px;
276 | }
277 | .minicolors-theme-bootstrap .minicolors-swatch-color {
278 | border-radius: inherit;
279 | }
280 | .minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
281 | left: auto;
282 | right: 3px;
283 | }
284 | .minicolors-theme-bootstrap .minicolors-input {
285 | float: none;
286 | padding-left: 44px;
287 | }
288 | .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
289 | padding-right: 44px;
290 | padding-left: 12px;
291 | }
292 | .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
293 | top: 4px;
294 | left: 4px;
295 | width: 37px;
296 | height: 37px;
297 | border-radius: 5px;
298 | }
299 | .minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
300 | width: 24px;
301 | height: 24px;
302 | }
303 | .minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
304 | width: 18px;
305 | height: 18px;
306 | }
307 | .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
308 | border-top-left-radius: 0;
309 | border-bottom-left-radius: 0;
310 | }
311 |
312 | /* Semantic Ui theme */
313 | .minicolors-theme-semanticui .minicolors-swatch {
314 | top: 0;
315 | left: 0;
316 | padding: 18px;
317 | }
318 | .minicolors-theme-semanticui input {
319 | text-indent: 30px;
320 | }
321 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Custom Login Page Customizer by Colorlib ===
2 | Contributors: silkalns
3 | Tags: customize login, login, custom login, customize wordpress login, wordpress login
4 | Requires at least: 4.7
5 | Tested up to: 6.9
6 | Stable tag: 1.3.4
7 | License: GPLv2 or later
8 | License URI: http://www.gnu.org/licenses/gpl-3.0.html
9 |
10 | Colorlib Login Customizer by Colorlib is a plugin that helps you personalize your login form directly from the Customizer.
11 |
12 | == Description ==
13 |
14 | Custom Login Page Customizer by Colorlib is an awesome and intuitive login page plugin that helps you personalize your login page and login form directly from the Customizer. Custom Login Page Customizer fully supports the Live Customizer feature and you can see all the changes in real time on your login page and edit them.
15 |
16 | All this plugin’s tools and options can be found by going to Appearance > Customize > Custom Login Page Customizer. There you have templates you can use on your login page, custom login page logo, custom login page background options, custom login page form customizations, login form custom width, login form padding and borders, and more all leading to you having a brand new and custom login page.
17 |
18 | Custom Login Page Customizer is without doubt one of the easiest to use WordPress plugins that allows the customization of the login page and login form. It was designed and developed to be powerful and user friendly so it can be enjoyed by both beginner and advanced developers. With Custom Login Page Customizer you can build a custom login page and custom login form in a matter of seconds, unlike some other login customizer plugins. Custom Login Page Customizer marks the end of a boring and bland login page and login form as you will be able to fine tune every aspect of the form to match your style and view and create a unique and custom login page.
19 |
20 | Build and personalize your WordPress login page and login form from start to finish. Custom Login Page Customizer has the following features:
21 |
22 | • Custom login page logo options: you can add a custom login page logo and set up its height and weight.
23 | • Custom login page and login form background options: from here you can upload a background image or change the background’s color.
24 | • Custom login form options: you can change the login form’s width and height, add a background image, change the background color, add padding and borders, and change the login form’s field background color, width, and margin.
25 | • Miscellaneous: in here you will find the options to change the login form button’s background, color, hover state, border, shadow, and the link’s color and hover color.
26 |
27 | Custom Login Page Customizer by Colorlib detailed features:
28 |
29 | - Custom login page templates
30 | - Hide/show login logo from login page
31 | - Show/hide the logo text from login page
32 | - Custom logo on login page
33 | - Change logo width on login page
34 | - Change logo height on login page
35 | - Change number of columns on your login page
36 | - Customize width of the columns on your login page
37 | - Change login form column alignment
38 | - Customize login form vertical alignment
39 | - Customize login form horizontal alignment
40 | - Customize background color on the login page
41 | - Add a custom background image on login page
42 | - Customize login form column background color
43 | - Add a custom background image for login form column
44 | - Customize login form width
45 | - Customize login form width
46 | - Add custom background image for login form
47 | - Customize the background color for login form
48 | - Customize login form border radius
49 | - Customize login form fields’ width
50 | - Customize login form fields’ margin
51 | - Customize login form fields’ border
52 | - Customize login form fields’ border radius
53 | - Customize login form fields’ background color
54 | - Customize login form fields’ text color
55 | - Customize login form fields’ label color
56 | - Customize login form username label
57 | - Customize login form password label
58 | - Show/hide the links on login page under the login form
59 | - Customize login form button background color
60 | - Customize login form button hover background color
61 | - Customize login form button border color
62 | - Customize login form button border color on hover
63 | - Customize login form button shadow
64 | - Customize login form button text shadow
65 | - Customize login form links color
66 | - Customize login form links color on hover
67 | - Hide/Show ‘Remember me?’ option on login form
68 | - Custom CSS option to customize further the login form and login page
69 |
70 | Build and personalize your WordPress login form from start to finish. Colorlib Login Customizer has the following features:
71 |
72 | - Logo options: you can add a custom logo and set up its height and weight.
73 | - Background options: from here you can upload a background image or change the background’s color.
74 | - Form options: you can change the form’s width and height, add a background image, change the background color, add padding and borders, and change the form’s field background color, width, and margin.
75 | - Miscellaneous: in here you will find the options to change the button’s background, color, hover state, border, shadow, and the link’s color and hover color.
76 |
77 | = Further Reading =
78 |
79 | This plugin is developed and maintained by Colorlib. Which is well know for their free WordPress themes. However, now they are looking to extend their presence in plugin development and believe that Colorlib Login Customizer is a great way to start.
80 |
81 | If you are new to WordPress and want to learn more we have got you covered. Colorlib will teach you how to start a blog or create a website and much more. If you are already familiar with WordPress you likely want to learn how to make it faster and more reliable. That's when you want to look into hosting and more specifically WordPress hosting .
82 |
83 | If you enjoy using Colorlib Login Customizer for WordPress please leave a [positive feedback](https://wordpress.org/support/plugin/colorlib-login-customiezr/reviews/?filter=5). We are committed to make it the best Login Customizer plugin for WordPress.
84 |
85 |
86 | == Installation ==
87 |
88 | 1. Download the plugin (.zip file) on your hard drive.
89 | 2. Unzip the zip file contents.
90 | 3. Upload the `colorlib-login-customizer` folder to the `/wp-content/plugins/` directory.
91 | 4. Activate the plugin through the 'Plugins' menu in WordPress.
92 | 5. A new sub menu item `Colorlib Login Customizer` will appear in your main Settings menu.
93 |
94 | == Changelog ==
95 |
96 | = 1.3.4 - 05.06.2025 =
97 | Fixed: Textdomain fix for wordpress 6.8+ ( [#179](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/179) )
98 |
99 | = 1.3.3 - 03.02.2025 =
100 | Fixed: Textdomain fix for wordpress 6.7+ ( [#179](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/179) )
101 | Fixed: Deprecated: Hook login_headertitle ( [#178](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/178) )
102 |
103 | = 1.3.2 - 27.03.2024 =
104 | Fixed: Php 8 deprecations ( [#169](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/169) )
105 | Fixed: "Remember me" label not aligned properly for users display( [#166](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/166) )
106 | Fixed: Form alignment options switched( [#165](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/165) )
107 | Fixed: The live preview doesn’t show "Register" link ( [#163](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/163) )
108 | Fixed: Updated deprecated jquery & updated minicolors js library ( [#159](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/159) )
109 | Fixed: Added plugin name in "Rate us" notice. ( [#149](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/149) )
110 | Fixed: Show image only on tempalte no.4 does not display the logo image. ( [#135](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/135) )
111 | Fixed: Background color that will not apply on half page form templates ( [#136](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/136) )
112 | Fixed: Vertical scrollable login, reset and register forms ( [#131](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/131) )
113 | Fixed: Bigger logos on mobile/small tablet devices stretching the login page. ( [#43](https://github.com/ColorlibHQ/colorlib-login-customizer/issues/43) )
114 |
115 | = 1.3.1 - 08.02.2022 =
116 | Fixed: Form placement ( https://wordpress.org/support/topic/the-login-area-doesnt-center-fix-not-working/ )
117 |
118 | = 1.3.00 - 10.05.2021 =
119 | Added : Background image link ( https://github.com/ColorlibHQ/colorlib-login-customizer/issues/115 )
120 |
121 | = 1.2.99 - 08.04.2021=
122 | Fixed: An issue where the link color hover pallete would not display properly (https://github.com/ColorlibHQ/colorlib-login-customizer/issues/139)
123 | Fixed: An issue where the logo would be outside of the login box on a selected template ( https://github.com/ColorlibHQ/colorlib-login-customizer/issues/134)
124 |
125 | = 1.2.98 =
126 | * Compatibility with jQuery 3.0
127 |
128 | = 1.2.97 =
129 | * Hide logo settings if hide logo is toggled on
130 | * Add option to use both image logo and text
131 |
132 | = 1.2.96 =
133 | * Compatibility fix with All In One WP Security plugin
134 | * Customizer toggle bug fix
135 | * Review dismiss fix
136 |
137 | = 1.2.95 =
138 | * Review request bug fix
139 | * Review save bug fix
140 |
141 | = 1.2.94 =
142 | * Minor responsive fixes
143 |
144 | = 1.2.93 =
145 | * Removed news dashboard widget
146 |
147 | = 1.2.92 =
148 | * Update for possibility to add links inside certain form texts
149 |
150 | = 1.2.91 =
151 | * Added possibility to add links inside certain form texts
152 | * Updated deprecated filter login_headertitle
153 | * Added option to change login page title
154 |
155 | = 1.2.9 =
156 | * Update toggles design
157 |
158 | = 1.2.8 =
159 | * Responsive view fixes
160 | * Updated plugin headers
161 |
162 | = 1.2.7 =
163 | * Added options to edit register form
164 | * Added options to edit lost password form
165 |
166 | = 1.2.6 =
167 | * Customizer CSS editor full height
168 | * Apply login form settings to registration form
169 | * Removed duplicate control for logo text
170 |
171 | = 1.2.5 =
172 | * Remove uninstall feedback
173 |
174 | = 1.2.4 =
175 | * Fixed https://github.com/ColorlibHQ/colorlib-login-customizer/issues/30
176 | * Fixed https://github.com/ColorlibHQ/colorlib-login-customizer/issues/41
177 | * Added https://github.com/ColorlibHQ/colorlib-login-customizer/issues/27
178 |
179 | = 1.2.3 =
180 | * Fixed `Logo Url` setting
181 | * Added `Logo Title` setting
182 |
183 | = 1.2.2 =
184 | * Added the possibility to change the `Remember Me` and `Log In` texts
185 |
186 | = 1.2.1 =
187 | * Minor tweaks & version bump
188 |
189 | = 1.2.0 =
190 | * Implemented everything from here: https://github.com/puikinsh/colorlib-login-customizer/milestone/1?closed=1
191 |
192 | = 1.1 =
193 | * Changed templates functionality
194 | * Added new layout options
195 | * Fixed live preview editing
196 | * Fixed minor bugs
197 |
198 | = 1.0 =
199 | * Initial release
200 |
--------------------------------------------------------------------------------
/includes/login-template.php:
--------------------------------------------------------------------------------
1 | get_defaults();
12 | $clc_options = get_option( 'clc-options', array() );
13 | $clc_options = apply_filters( 'clc_backwards_compatibility_front', wp_parse_args( $clc_options, $clc_defaults ) );
14 |
15 | /**
16 | * Output the login page header.
17 | *
18 | * @param string $title Optional. WordPress login Page title to display in the `` element.
19 | * Default 'Log In'.
20 | * @param string $message Optional. Message to display in header. Default empty.
21 | * @param string $wp_error Optional. The error to pass. Default empty.
22 | */
23 | function clc_login_header( $title = 'Log In', $message = '', $wp_error = '' ) {
24 |
25 | global $error, $action;
26 |
27 | if ( empty( $wp_error ) ) {
28 | $wp_error = new WP_Error();
29 | }
30 |
31 | $login_title = get_bloginfo( 'name', 'display' );
32 |
33 | /* translators: Login screen title. 1: Login screen name, 2: Network or site name */
34 | $login_title = sprintf( __( '%1$s ‹ %2$s — WordPress', 'colorlib-login-customizer' ), $title, $login_title );
35 | /**
36 | * Filters the title tag content for login page.
37 | *
38 | * @since 4.9.0
39 | *
40 | * @param string $login_title The page title, with extra context added.
41 | * @param string $title The original page title.
42 | */
43 | $login_title = apply_filters( 'login_title', $login_title, $title );
44 | ?>
45 |
46 |
47 |
64 |
65 |
66 |
146 |
147 |
148 |
153 |
161 |
162 |
163 |
164 |
170 |
171 |
192 |
193 |
213 |
214 |
229 |
230 |
231 | %s', esc_url( wp_registration_url() ), $clc_options['register-link-label'] );
234 |
235 |
236 |
237 | /** This filter is documented in wp-includes/general-template.php */
238 | echo apply_filters( 'register', $registration_url );
239 |
240 | echo ''.esc_html( $login_link_separator ).' ';
241 |
242 | echo '' . $clc_options['login-link-label'] . ' ';
243 |
244 | echo ''.esc_html( $login_link_separator ).' ';
245 | endif;
246 | ?>
247 |
248 |
249 |
250 |
251 |
252 |
255 |
256 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
268 |
269 |
270 |