Version Description
Download this release
Release Info
Developer | austyfrosty |
Plugin | Custom Login |
Version | 3.2.15 |
Comparing to | |
See all releases |
Code changes from version 3.2.9 to 3.2.15
- README.md +39 -8
- composer.json +21 -0
- css/chosen/chosen-sprite.png +0 -0
- css/chosen/chosen-sprite@2x.png +0 -0
- css/chosen/chosen.css +0 -0
- css/chosen/chosen.min.css +0 -0
- custom-login.php +12 -6
- includes/admin/dashboard.php +61 -68
- includes/class-cl-common.php +21 -3
- includes/class-cl-extensions.php +59 -59
- includes/class-cl-settings-api.php +15 -16
- includes/default-settings.php +28 -26
- js/ace/src-min-noconflict/ace.js +0 -0
- js/ace/src-min-noconflict/ext-beautify.js +0 -0
- js/ace/src-min-noconflict/ext-chromevox.js +0 -0
- js/ace/src-min-noconflict/ext-elastic_tabstops_lite.js +0 -0
- js/ace/src-min-noconflict/ext-emmet.js +0 -0
- js/ace/src-min-noconflict/ext-error_marker.js +0 -0
- js/ace/src-min-noconflict/ext-keybinding_menu.js +0 -0
- js/ace/src-min-noconflict/ext-language_tools.js +0 -0
- js/ace/src-min-noconflict/ext-linking.js +0 -0
- js/ace/src-min-noconflict/ext-modelist.js +0 -0
- js/ace/src-min-noconflict/ext-old_ie.js +0 -0
- js/ace/src-min-noconflict/ext-searchbox.js +0 -0
- js/ace/src-min-noconflict/ext-settings_menu.js +0 -0
- js/ace/src-min-noconflict/ext-spellcheck.js +0 -0
- js/ace/src-min-noconflict/ext-split.js +0 -0
- js/ace/src-min-noconflict/ext-static_highlight.js +0 -0
- js/ace/src-min-noconflict/ext-statusbar.js +0 -0
- js/ace/src-min-noconflict/ext-textarea.js +0 -0
- js/ace/src-min-noconflict/ext-themelist.js +0 -0
- js/ace/src-min-noconflict/ext-whitespace.js +0 -0
- js/ace/src-min-noconflict/keybinding-emacs.js +0 -0
- js/ace/src-min-noconflict/keybinding-vim.js +0 -0
- js/ace/src-min-noconflict/mode-css.js +0 -0
- js/ace/src-min-noconflict/mode-html.js +0 -0
- js/ace/src-min-noconflict/mode-javascript.js +0 -0
- js/ace/src-min-noconflict/snippets/abap.js +0 -0
- js/ace/src-min-noconflict/snippets/actionscript.js +0 -0
- js/ace/src-min-noconflict/snippets/ada.js +0 -0
- js/ace/src-min-noconflict/snippets/apache_conf.js +0 -0
- js/ace/src-min-noconflict/snippets/applescript.js +0 -0
- js/ace/src-min-noconflict/snippets/asciidoc.js +0 -0
- js/ace/src-min-noconflict/snippets/assembly_x86.js +0 -0
- js/ace/src-min-noconflict/snippets/autohotkey.js +0 -0
- js/ace/src-min-noconflict/snippets/batchfile.js +0 -0
- js/ace/src-min-noconflict/snippets/c9search.js +0 -0
- js/ace/src-min-noconflict/snippets/c_cpp.js +0 -0
- js/ace/src-min-noconflict/snippets/cirru.js +0 -0
- js/ace/src-min-noconflict/snippets/clojure.js +0 -0
- js/ace/src-min-noconflict/snippets/cobol.js +0 -0
- js/ace/src-min-noconflict/snippets/coffee.js +0 -0
- js/ace/src-min-noconflict/snippets/coldfusion.js +0 -0
- js/ace/src-min-noconflict/snippets/csharp.js +0 -0
- js/ace/src-min-noconflict/snippets/css.js +0 -0
- js/ace/src-min-noconflict/snippets/curly.js +0 -0
- js/ace/src-min-noconflict/snippets/d.js +0 -0
- js/ace/src-min-noconflict/snippets/dart.js +0 -0
- js/ace/src-min-noconflict/snippets/diff.js +0 -0
- js/ace/src-min-noconflict/snippets/django.js +0 -0
- js/ace/src-min-noconflict/snippets/dockerfile.js +0 -0
- js/ace/src-min-noconflict/snippets/dot.js +0 -0
- js/ace/src-min-noconflict/snippets/eiffel.js +0 -0
- js/ace/src-min-noconflict/snippets/ejs.js +0 -0
- js/ace/src-min-noconflict/snippets/elixir.js +0 -0
- js/ace/src-min-noconflict/snippets/elm.js +0 -0
- js/ace/src-min-noconflict/snippets/erlang.js +0 -0
- js/ace/src-min-noconflict/snippets/forth.js +0 -0
- js/ace/src-min-noconflict/snippets/ftl.js +0 -0
- js/ace/src-min-noconflict/snippets/gcode.js +0 -0
- js/ace/src-min-noconflict/snippets/gherkin.js +0 -0
- js/ace/src-min-noconflict/snippets/gitignore.js +0 -0
- js/ace/src-min-noconflict/snippets/glsl.js +0 -0
- js/ace/src-min-noconflict/snippets/golang.js +0 -0
- js/ace/src-min-noconflict/snippets/groovy.js +0 -0
- js/ace/src-min-noconflict/snippets/haml.js +0 -0
- js/ace/src-min-noconflict/snippets/handlebars.js +0 -0
- js/ace/src-min-noconflict/snippets/haskell.js +0 -0
- js/ace/src-min-noconflict/snippets/haxe.js +0 -0
- js/ace/src-min-noconflict/snippets/html.js +0 -0
- js/ace/src-min-noconflict/snippets/html_ruby.js +0 -0
- js/ace/src-min-noconflict/snippets/ini.js +0 -0
- js/ace/src-min-noconflict/snippets/io.js +0 -0
- js/ace/src-min-noconflict/snippets/jack.js +0 -0
- js/ace/src-min-noconflict/snippets/jade.js +0 -0
- js/ace/src-min-noconflict/snippets/java.js +0 -0
- js/ace/src-min-noconflict/snippets/javascript.js +0 -0
- js/ace/src-min-noconflict/snippets/json.js +0 -0
- js/ace/src-min-noconflict/snippets/jsoniq.js +0 -0
- js/ace/src-min-noconflict/snippets/jsp.js +0 -0
- js/ace/src-min-noconflict/snippets/jsx.js +0 -0
- js/ace/src-min-noconflict/snippets/julia.js +0 -0
- js/ace/src-min-noconflict/snippets/latex.js +0 -0
- js/ace/src-min-noconflict/snippets/less.js +0 -0
- js/ace/src-min-noconflict/snippets/liquid.js +0 -0
- js/ace/src-min-noconflict/snippets/lisp.js +0 -0
- js/ace/src-min-noconflict/snippets/livescript.js +0 -0
- js/ace/src-min-noconflict/snippets/logiql.js +0 -0
- js/ace/src-min-noconflict/snippets/lsl.js +0 -0
- js/ace/src-min-noconflict/snippets/lua.js +0 -0
- js/ace/src-min-noconflict/snippets/luapage.js +0 -0
- js/ace/src-min-noconflict/snippets/lucene.js +0 -0
- js/ace/src-min-noconflict/snippets/makefile.js +0 -0
- js/ace/src-min-noconflict/snippets/markdown.js +0 -0
- js/ace/src-min-noconflict/snippets/matlab.js +0 -0
- js/ace/src-min-noconflict/snippets/mel.js +0 -0
- js/ace/src-min-noconflict/snippets/mushcode.js +0 -0
- js/ace/src-min-noconflict/snippets/mysql.js +0 -0
- js/ace/src-min-noconflict/snippets/nix.js +0 -0
- js/ace/src-min-noconflict/snippets/objectivec.js +0 -0
- js/ace/src-min-noconflict/snippets/ocaml.js +0 -0
- js/ace/src-min-noconflict/snippets/pascal.js +0 -0
- js/ace/src-min-noconflict/snippets/perl.js +0 -0
- js/ace/src-min-noconflict/snippets/pgsql.js +0 -0
- js/ace/src-min-noconflict/snippets/php.js +0 -0
- js/ace/src-min-noconflict/snippets/plain_text.js +0 -0
- js/ace/src-min-noconflict/snippets/powershell.js +0 -0
- js/ace/src-min-noconflict/snippets/praat.js +0 -0
- js/ace/src-min-noconflict/snippets/prolog.js +0 -0
- js/ace/src-min-noconflict/snippets/properties.js +0 -0
- js/ace/src-min-noconflict/snippets/protobuf.js +0 -0
- js/ace/src-min-noconflict/snippets/python.js +0 -0
- js/ace/src-min-noconflict/snippets/r.js +0 -0
- js/ace/src-min-noconflict/snippets/rdoc.js +0 -0
- js/ace/src-min-noconflict/snippets/rhtml.js +0 -0
- js/ace/src-min-noconflict/snippets/ruby.js +0 -0
- js/ace/src-min-noconflict/snippets/rust.js +0 -0
- js/ace/src-min-noconflict/snippets/sass.js +0 -0
- js/ace/src-min-noconflict/snippets/scad.js +0 -0
- js/ace/src-min-noconflict/snippets/scala.js +0 -0
- js/ace/src-min-noconflict/snippets/scheme.js +0 -0
- js/ace/src-min-noconflict/snippets/scss.js +0 -0
- js/ace/src-min-noconflict/snippets/sh.js +0 -0
- js/ace/src-min-noconflict/snippets/sjs.js +0 -0
- js/ace/src-min-noconflict/snippets/smarty.js +0 -0
- js/ace/src-min-noconflict/snippets/snippets.js +0 -0
- js/ace/src-min-noconflict/snippets/soy_template.js +0 -0
- js/ace/src-min-noconflict/snippets/space.js +0 -0
- js/ace/src-min-noconflict/snippets/sql.js +0 -0
- js/ace/src-min-noconflict/snippets/stylus.js +0 -0
- js/ace/src-min-noconflict/snippets/svg.js +0 -0
- js/ace/src-min-noconflict/snippets/tcl.js +0 -0
- js/ace/src-min-noconflict/snippets/tex.js +0 -0
- js/ace/src-min-noconflict/snippets/text.js +0 -0
- js/ace/src-min-noconflict/snippets/textile.js +0 -0
- js/ace/src-min-noconflict/snippets/toml.js +0 -0
- js/ace/src-min-noconflict/snippets/twig.js +0 -0
- js/ace/src-min-noconflict/snippets/typescript.js +0 -0
- js/ace/src-min-noconflict/snippets/vala.js +0 -0
- js/ace/src-min-noconflict/snippets/vbscript.js +0 -0
- js/ace/src-min-noconflict/snippets/velocity.js +0 -0
- js/ace/src-min-noconflict/snippets/verilog.js +0 -0
- js/ace/src-min-noconflict/snippets/vhdl.js +0 -0
- js/ace/src-min-noconflict/snippets/xml.js +0 -0
- js/ace/src-min-noconflict/snippets/xquery.js +0 -0
- js/ace/src-min-noconflict/snippets/yaml.js +0 -0
- js/ace/src-min-noconflict/worker-coffee.js +0 -0
- js/ace/src-min-noconflict/worker-css.js +0 -0
- js/ace/src-min-noconflict/worker-html.js +0 -0
- js/ace/src-min-noconflict/worker-javascript.js +0 -0
- js/admin.js +42 -7
- js/chosen.jquery.js +0 -0
- js/chosen.jquery.min.js +0 -0
- readme.txt +39 -5
- templates/wp-login-style.php +118 -118
README.md
CHANGED
@@ -2,14 +2,17 @@
|
|
2 |
|
3 |
[![WordPress plugin](https://img.shields.io/wordpress/plugin/dt/custom-login.svg?style=flat)](https://wordpress.org/plugins/custom-login/)
|
4 |
[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/custom-login.svg?style=flat)](https://wordpress.org/plugins/custom-login/)
|
|
|
5 |
[![WordPress](https://img.shields.io/wordpress/v/custom-login.svg?style=flat)]()
|
|
|
6 |
[![License](https://img.shields.io/badge/license-GPL--2.0%2B-red.svg)](https://github.com/thefrosty/custom-login/blob/master/license.txt)
|
7 |
|
8 |
**Contributors:** [austyfrosty](https://profiles.wordpress.org/austyfrosty), [frostymedia](https://profiles.wordpress.org/frostymedia)
|
9 |
**Donate link:** [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290)
|
10 |
**Tags:** admin, branding, customization, custom login, login, logo, error, login error, custom login pro
|
11 |
**Requires at least:** 4.9
|
12 |
-
**Tested up to:** 5.
|
|
|
13 |
**Stable tag:** trunk
|
14 |
**License:** GPLv2 or later
|
15 |
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -65,7 +68,7 @@ Activate the plugin and customize your WordPress login screen. It's as easy as m
|
|
65 |
2. Read more about [Custom Login 3.1](https://frosty.media/2015/custom-login-v3-1-released/)
|
66 |
2. Read more about [Custom Login 2.0](http://wp.me/pzgsJ-HY)
|
67 |
|
68 |
-
**For those looking to
|
69 |
|
70 |
### links ###
|
71 |
|
@@ -106,7 +109,7 @@ I created this plugin to allow for custom login of any WordPress login screen. S
|
|
106 |
### Where can I upload and share my cool login screen? ###
|
107 |
Check out the [Flickr group](http://flickr.com/groups/custom-login/)! Upload and add it to our pool!
|
108 |
|
109 |
-
### I think
|
110 |
Just deactivate it. Sad panda is sad.
|
111 |
|
112 |
## Screenshots ##
|
@@ -139,6 +142,34 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
139 |
|
140 |
## Changelog ##
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
### Version 3.2.9 (2019/05/07) ###
|
143 |
* Tested up to WordPress 5.2.
|
144 |
* Update deprecated login text filter in WordPress 5.2.
|
@@ -200,7 +231,7 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
200 |
* Update: Allow Custom (CSS/HTML/JS) textareas to expand up to 30 lines.
|
201 |
* Update: admin.css
|
202 |
* Update: admin.js
|
203 |
-
* Add: animate.css
|
204 |
* Add: Global 'active' toggle switch.
|
205 |
|
206 |
### Version 3.1 (01/20/15) ###
|
@@ -209,7 +240,7 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
209 |
* Update: All prefixed 'cl_' to 'custom_login_'.
|
210 |
* Update: Spelling error 'sanitize'.
|
211 |
* Update: login.css uses core stylesheet to avoid possible conflicts with checkboxes and browser support.
|
212 |
-
* Tweak: Speed
|
213 |
* Add: CL_Common::is_settings_page().
|
214 |
* Add: Dashboard widget (off be default).
|
215 |
|
@@ -225,8 +256,8 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
225 |
|
226 |
* Update: ace.js to build `20.12.14`.
|
227 |
* Update: admin.css.
|
228 |
-
* Update:
|
229 |
-
* Update:
|
230 |
* Tweak: Remove false positive files from malware scanners; ace editor php.js [forum](https://wordpress.org/support/topic/wordfence-alerta?).
|
231 |
* Tweak: Make sure `auth_cookie_expiration` is greater than 0.
|
232 |
|
@@ -240,7 +271,7 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
240 |
* Add: Disable lost password reset function option.
|
241 |
* Update: Settings prefix with global definition.
|
242 |
* Update: Add missing auth expiration function for setting.
|
243 |
-
* Fix: Hide tracking notice
|
244 |
* Tweak: Update the hide_wp_logo description since Custom Login removes the WP logo by default.
|
245 |
* Tweak: Better output of update notification on settings page.
|
246 |
* Tweak: Update input fields that are integers to a 'number' input type.
|
2 |
|
3 |
[![WordPress plugin](https://img.shields.io/wordpress/plugin/dt/custom-login.svg?style=flat)](https://wordpress.org/plugins/custom-login/)
|
4 |
[![WordPress plugin](https://img.shields.io/wordpress/plugin/v/custom-login.svg?style=flat)](https://wordpress.org/plugins/custom-login/)
|
5 |
+
[![WordPress Plugin: Required WP Version](https://img.shields.io/wordpress/plugin/wp-version/custom-login)]()
|
6 |
[![WordPress](https://img.shields.io/wordpress/v/custom-login.svg?style=flat)]()
|
7 |
+
[![WordPress Plugin Required PHP Version](https://img.shields.io/wordpress/plugin/required-php/custom-login)]()
|
8 |
[![License](https://img.shields.io/badge/license-GPL--2.0%2B-red.svg)](https://github.com/thefrosty/custom-login/blob/master/license.txt)
|
9 |
|
10 |
**Contributors:** [austyfrosty](https://profiles.wordpress.org/austyfrosty), [frostymedia](https://profiles.wordpress.org/frostymedia)
|
11 |
**Donate link:** [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290)
|
12 |
**Tags:** admin, branding, customization, custom login, login, logo, error, login error, custom login pro
|
13 |
**Requires at least:** 4.9
|
14 |
+
**Tested up to:** 5.9
|
15 |
+
**Requires PHP**: 5.6
|
16 |
**Stable tag:** trunk
|
17 |
**License:** GPLv2 or later
|
18 |
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
|
68 |
2. Read more about [Custom Login 3.1](https://frosty.media/2015/custom-login-v3-1-released/)
|
69 |
2. Read more about [Custom Login 2.0](http://wp.me/pzgsJ-HY)
|
70 |
|
71 |
+
**For those looking to show off your login screen, check out the [Flickr group](http://flickr.com/groups/custom-login/)! Share you designs with the community!**
|
72 |
|
73 |
### links ###
|
74 |
|
109 |
### Where can I upload and share my cool login screen? ###
|
110 |
Check out the [Flickr group](http://flickr.com/groups/custom-login/)! Upload and add it to our pool!
|
111 |
|
112 |
+
### I think I want to uninstall ###
|
113 |
Just deactivate it. Sad panda is sad.
|
114 |
|
115 |
## Screenshots ##
|
142 |
|
143 |
## Changelog ##
|
144 |
|
145 |
+
### Version 3.2.15 (2022/03/11) ###
|
146 |
+
|
147 |
+
* Fix settings API Settings: Uncaught Error: Call to undefined method stdClass::get_permalink() (#49)
|
148 |
+
|
149 |
+
### Version 3.2.14 (2022/03/10) ###
|
150 |
+
|
151 |
+
* Fix settings widget feed for available extensions. Changes from RSS to REST.
|
152 |
+
* Add auto deploy to WordPress.org GitHub action.
|
153 |
+
|
154 |
+
### Version 3.2.13 (2022/01/06) ###
|
155 |
+
|
156 |
+
* Change custom CSS settings sanitizer in admin to allow for proper HTML CSS attributes like `>`.
|
157 |
+
|
158 |
+
### Version 3.2.12 (2021/11/07) ###
|
159 |
+
|
160 |
+
* Change dashboard from RSS feed to REST API endpoint.
|
161 |
+
* Fix condition for dashboard widget to use `is_blog_admin`.
|
162 |
+
|
163 |
+
### Version 3.2.11 (2020/12/07) ###
|
164 |
+
* PHP 8 compatibility fixes.
|
165 |
+
* Tested on WordPress 5.6
|
166 |
+
|
167 |
+
### Version 3.2.10 (2020/08/14) ###
|
168 |
+
* Tested up to WordPress 5.5
|
169 |
+
* Fix toggle on/off on settings page, incorrect check in AJAX for new installs.
|
170 |
+
* Enable on activation hook fixed.
|
171 |
+
* Remove ace.js theme call to non existing theme.
|
172 |
+
|
173 |
### Version 3.2.9 (2019/05/07) ###
|
174 |
* Tested up to WordPress 5.2.
|
175 |
* Update deprecated login text filter in WordPress 5.2.
|
231 |
* Update: Allow Custom (CSS/HTML/JS) textareas to expand up to 30 lines.
|
232 |
* Update: admin.css
|
233 |
* Update: admin.js
|
234 |
+
* Add: animate.css (licensed under MIT).
|
235 |
* Add: Global 'active' toggle switch.
|
236 |
|
237 |
### Version 3.1 (01/20/15) ###
|
240 |
* Update: All prefixed 'cl_' to 'custom_login_'.
|
241 |
* Update: Spelling error 'sanitize'.
|
242 |
* Update: login.css uses core stylesheet to avoid possible conflicts with checkboxes and browser support.
|
243 |
+
* Tweak: Speed improvements.
|
244 |
* Add: CL_Common::is_settings_page().
|
245 |
* Add: Dashboard widget (off be default).
|
246 |
|
256 |
|
257 |
* Update: ace.js to build `20.12.14`.
|
258 |
* Update: admin.css.
|
259 |
+
* Update: Extensions HTML and settings page location.
|
260 |
+
* Update: Sanitize the `auth_cookie_expiration` setting with a positive integer.
|
261 |
* Tweak: Remove false positive files from malware scanners; ace editor php.js [forum](https://wordpress.org/support/topic/wordfence-alerta?).
|
262 |
* Tweak: Make sure `auth_cookie_expiration` is greater than 0.
|
263 |
|
271 |
* Add: Disable lost password reset function option.
|
272 |
* Update: Settings prefix with global definition.
|
273 |
* Update: Add missing auth expiration function for setting.
|
274 |
+
* Fix: Hide tracking notice globally if admin notices are turned off.
|
275 |
* Tweak: Update the hide_wp_logo description since Custom Login removes the WP logo by default.
|
276 |
* Tweak: Better output of update notification on settings page.
|
277 |
* Tweak: Update input fields that are integers to a 'number' input type.
|
composer.json
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "thefrosty/custom-login",
|
3 |
+
"type": "wordpress-plugin",
|
4 |
+
"license": "GPL-2.0-or-later",
|
5 |
+
"authors": [
|
6 |
+
{
|
7 |
+
"name": "Austin Passy",
|
8 |
+
"email": "367897+thefrosty@users.noreply.github.com",
|
9 |
+
"homepage": "https://austin.passy.co",
|
10 |
+
"role": "Developer"
|
11 |
+
}
|
12 |
+
],
|
13 |
+
"config": {
|
14 |
+
"allow-plugins": {
|
15 |
+
"composer/installers": true
|
16 |
+
},
|
17 |
+
"optimize-autoloader": true,
|
18 |
+
"preferred-install": "dist",
|
19 |
+
"sort-packages": true
|
20 |
+
}
|
21 |
+
}
|
css/chosen/chosen-sprite.png
CHANGED
File without changes
|
css/chosen/chosen-sprite@2x.png
CHANGED
File without changes
|
css/chosen/chosen.css
CHANGED
File without changes
|
css/chosen/chosen.min.css
CHANGED
File without changes
|
custom-login.php
CHANGED
@@ -3,14 +3,15 @@
|
|
3 |
* Plugin Name: Custom Login
|
4 |
* Plugin URI: https://frosty.media/plugins/custom-login
|
5 |
* Description: A simple way to customize your WordPress <code>wp-login.php</code> screen! A <a href="https://frosty.media/">Frosty Media</a> plugin.
|
6 |
-
* Version: 3.2.
|
7 |
* Author: Austin Passy
|
8 |
* Author URI: https://austin.passy.co
|
|
|
9 |
* Text Domain: custom-login
|
10 |
* GitHub Plugin URI: https://github.com/thefrosty/custom-login
|
11 |
* GitHub Branch: master
|
12 |
*
|
13 |
-
* @copyright 2012 -
|
14 |
* @author Austin Passy
|
15 |
* @link https://austin.passy.co/
|
16 |
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
@@ -39,7 +40,7 @@ if ( ! class_exists( 'Custom_Login' ) ) :
|
|
39 |
*
|
40 |
* @return string
|
41 |
*/
|
42 |
-
|
43 |
$menu_page,
|
44 |
$prefix;
|
45 |
|
@@ -175,6 +176,10 @@ if ( ! class_exists( 'Custom_Login' ) ) :
|
|
175 |
* @since 3.1
|
176 |
*/
|
177 |
function activate() {
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
@@ -216,6 +221,7 @@ if ( ! class_exists( 'Custom_Login' ) ) :
|
|
216 |
*/
|
217 |
public function load_settings() {
|
218 |
|
|
|
219 |
include trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/default-settings.php';
|
220 |
$this->settings_api = new CL_Settings_API(
|
221 |
$sections,
|
@@ -287,8 +293,8 @@ if ( ! class_exists( 'Custom_Login' ) ) :
|
|
287 |
$message_url = esc_url( add_query_arg( array( 'get_notifications' => 'true' ), CUSTOM_LOGIN_API_URL) );
|
288 |
|
289 |
$announcement = CL_Common::wp_remote_get(
|
290 |
-
$message_url,
|
291 |
$transient_key,
|
|
|
292 |
DAY_IN_SECONDS,
|
293 |
'WordPress' // We need our custom $user_agent
|
294 |
);
|
@@ -314,8 +320,8 @@ if ( ! class_exists( 'Custom_Login' ) ) :
|
|
314 |
sprintf( '%2$s <span class="alignright">| <a href="%3$s">%1$s</a></span>',
|
315 |
__( 'Dismiss', CUSTOM_LOGIN_DIRNAME ),
|
316 |
$announcement[0]->message,
|
317 |
-
esc_url( add_query_arg( $ignore_key, wp_create_nonce( $ignore_key ), admin_url( 'options-general.php?page=custom-login' ) ) )
|
318 |
-
esc_url( admin_url( 'options-general.php?page=custom-login#custom_login_general' ) )
|
319 |
) :
|
320 |
sprintf( '%s', $announcement[0]->message );
|
321 |
$html .= '</p></div>';
|
3 |
* Plugin Name: Custom Login
|
4 |
* Plugin URI: https://frosty.media/plugins/custom-login
|
5 |
* Description: A simple way to customize your WordPress <code>wp-login.php</code> screen! A <a href="https://frosty.media/">Frosty Media</a> plugin.
|
6 |
+
* Version: 3.2.15
|
7 |
* Author: Austin Passy
|
8 |
* Author URI: https://austin.passy.co
|
9 |
+
* Requires PHP: 5.6
|
10 |
* Text Domain: custom-login
|
11 |
* GitHub Plugin URI: https://github.com/thefrosty/custom-login
|
12 |
* GitHub Branch: master
|
13 |
*
|
14 |
+
* @copyright 2012 - 2022
|
15 |
* @author Austin Passy
|
16 |
* @link https://austin.passy.co/
|
17 |
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
40 |
*
|
41 |
* @return string
|
42 |
*/
|
43 |
+
public $version = '3.2.15',
|
44 |
$menu_page,
|
45 |
$prefix;
|
46 |
|
176 |
* @since 3.1
|
177 |
*/
|
178 |
function activate() {
|
179 |
+
$settings = CL_Common::get_options('general');
|
180 |
+
$settings['active'] = 'on';
|
181 |
+
|
182 |
+
update_option(CUSTOM_LOGIN_OPTION . '_general', $settings);
|
183 |
}
|
184 |
|
185 |
/**
|
221 |
*/
|
222 |
public function load_settings() {
|
223 |
|
224 |
+
$fields = $sections = array();
|
225 |
include trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/default-settings.php';
|
226 |
$this->settings_api = new CL_Settings_API(
|
227 |
$sections,
|
293 |
$message_url = esc_url( add_query_arg( array( 'get_notifications' => 'true' ), CUSTOM_LOGIN_API_URL) );
|
294 |
|
295 |
$announcement = CL_Common::wp_remote_get(
|
|
|
296 |
$transient_key,
|
297 |
+
$message_url,
|
298 |
DAY_IN_SECONDS,
|
299 |
'WordPress' // We need our custom $user_agent
|
300 |
);
|
320 |
sprintf( '%2$s <span class="alignright">| <a href="%3$s">%1$s</a></span>',
|
321 |
__( 'Dismiss', CUSTOM_LOGIN_DIRNAME ),
|
322 |
$announcement[0]->message,
|
323 |
+
esc_url( add_query_arg( $ignore_key, wp_create_nonce( $ignore_key ), admin_url( 'options-general.php?page=custom-login' ) ) )
|
324 |
+
// esc_url( admin_url( 'options-general.php?page=custom-login#custom_login_general' ) )
|
325 |
) :
|
326 |
sprintf( '%s', $announcement[0]->message );
|
327 |
$html .= '</p></div>';
|
includes/admin/dashboard.php
CHANGED
@@ -28,7 +28,7 @@ class CL_Dashboard {
|
|
28 |
private static $headers = array();
|
29 |
private static $scripts = array();
|
30 |
|
31 |
-
const FEED_URL = 'https://frosty.media/
|
32 |
|
33 |
/**
|
34 |
* Main Instance
|
@@ -47,11 +47,11 @@ class CL_Dashboard {
|
|
47 |
|
48 |
private function actions() {
|
49 |
|
50 |
-
if (
|
51 |
return;
|
|
|
52 |
|
53 |
add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) );
|
54 |
-
// add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
55 |
add_action( 'admin_enqueue_scripts', array( $this, 'inline_scripts' ) );
|
56 |
add_action( 'admin_footer', array( $this, 'admin_footer' ) );
|
57 |
}
|
@@ -76,8 +76,9 @@ class CL_Dashboard {
|
|
76 |
*/
|
77 |
public function add_dashboard_widget() {
|
78 |
|
79 |
-
if (
|
80 |
return;
|
|
|
81 |
|
82 |
wp_add_dashboard_widget(
|
83 |
$this->id,
|
@@ -86,41 +87,36 @@ class CL_Dashboard {
|
|
86 |
);
|
87 |
}
|
88 |
|
89 |
-
/**
|
90 |
-
* Scripts & Styles
|
91 |
-
*/
|
92 |
-
public function enqueue_scripts() {
|
93 |
-
|
94 |
-
if ( $this->dashboard_allowed() ) {
|
95 |
-
wp_enqueue_style( $this->id, $this->add_query_arg( 'css' ), null, null, 'screen' );
|
96 |
-
}
|
97 |
-
else {
|
98 |
-
wp_enqueue_script( $this->id, $this->add_query_arg( 'js' ), array( 'jquery' ), null, true );
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
public function admin_footer() {
|
103 |
if ( $this->dashboard_allowed() ) {
|
104 |
-
|
105 |
-
}
|
106 |
-
|
107 |
-
echo $this->jQuery( false );
|
108 |
}
|
109 |
}
|
110 |
|
|
|
|
|
|
|
|
|
|
|
111 |
private function get_feed( $count = 1, $feed = self::FEED_URL ) {
|
112 |
-
return CL_Common::
|
113 |
}
|
114 |
|
115 |
private function get_feed_url() {
|
116 |
-
|
117 |
-
$rss_items
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
return esc_url( self::FEED_URL );
|
@@ -130,31 +126,28 @@ class CL_Dashboard {
|
|
130 |
|
131 |
$rss_items = $this->get_feed();
|
132 |
|
133 |
-
return
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
* Dashboard widget
|
138 |
*/
|
139 |
public function widget() {
|
140 |
-
|
141 |
// FEED
|
142 |
-
$
|
143 |
|
144 |
$content = '<div class="rss-widget">';
|
145 |
$content .= '<ul>';
|
146 |
|
147 |
-
if (
|
148 |
$content .= '<li>' . __( 'Error fetching feed', CUSTOM_LOGIN_DIRNAME ) . '</li>';
|
149 |
-
}
|
150 |
-
else {
|
151 |
$count = 1;
|
152 |
-
foreach ( $
|
153 |
-
$feed_url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), null, 'display' ) );
|
154 |
$content .= '<li>';
|
155 |
-
$content .= '<a class="rsswidget" href="' . esc_url( add_query_arg( array( 'utm_medium' => 'wpadmin_dashboard', 'utm_term' => 'newsitem', 'utm_campaign' => CUSTOM_LOGIN_DIRNAME ), $
|
156 |
-
$content .= $count === 1 ? ' <span class="rss-date">' .
|
157 |
-
$content .= $count === 1 ? '<div class="rssSummary">' . strip_tags( wp_trim_words( $item->
|
158 |
$content .= '</li>';
|
159 |
$count++;
|
160 |
}
|
@@ -163,32 +156,32 @@ class CL_Dashboard {
|
|
163 |
$content .= '</div>';
|
164 |
|
165 |
|
166 |
-
// Plugins
|
167 |
-
$
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
//$content .= '<li><strong>' . __( 'Custom Login Extensions:', CUSTOM_LOGIN_DIRNAME ) . '</strong></li>';
|
172 |
|
173 |
-
if (
|
174 |
-
$content .= '<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
-
else {
|
177 |
-
foreach ( $rss_items as $item ) {
|
178 |
-
$url = preg_replace( '/#.*/', '', esc_url( $item->get_permalink(), null, 'display' ) );
|
179 |
-
$content .= '<li>';
|
180 |
-
$content .= '<a class="rsswidget" href="' . esc_url( add_query_arg( array( 'utm_medium' => 'wpadmin_dashboard', 'utm_term' => 'newsitem', 'utm_campaign' => CUSTOM_LOGIN_DIRNAME ), $url ) ) . '">' . esc_html( $item->get_title() ) . '</a>';
|
181 |
-
# $content .= '<div class="rssSummary">' . strip_tags( wp_trim_words( $item->get_description(), 10 ) ) . '</div>';
|
182 |
-
$content .= '</li>';
|
183 |
-
}
|
184 |
-
}
|
185 |
-
$content .= '</ul>';
|
186 |
-
$content .= '</div>';
|
187 |
|
188 |
$content .= '<div class="rss-widget">';
|
189 |
$content .= '<ul class="social">';
|
190 |
$content .= '<li>';
|
191 |
-
$content .= '<a href="https://www.facebook.com/FrostyMediaWP"><span class="dashicons dashicons-facebook"></span>/FrostyMediaWP</a> | ';
|
192 |
$content .= '<a href="https://twitter.com/Frosty_Media"><span class="dashicons dashicons-twitter"></span>/Frosty_Media</a> | ';
|
193 |
$content .= '<a href="https://twitter.com/TheFrosty"><span class="dashicons dashicons-twitter"></span>/TheFrosty</a>';
|
194 |
$content .= '</li>';
|
@@ -213,18 +206,15 @@ class CL_Dashboard {
|
|
213 |
header("content-type:text/css");
|
214 |
}
|
215 |
ob_start();
|
216 |
-
str_replace( ob_end_clean(), '', ob_end_clean() );
|
217 |
$this->CSS();
|
218 |
if ( ob_get_level() ) echo ob_get_clean();
|
219 |
die;
|
220 |
-
}
|
221 |
-
elseif ( isset( $_GET['type'] ) && $_GET['type'] === 'js' ) {
|
222 |
|
223 |
if ( !headers_sent() ) {
|
224 |
header("content-type:application/x-javascript");
|
225 |
}
|
226 |
ob_start();
|
227 |
-
str_replace( ob_end_clean(), '', ob_end_clean() );
|
228 |
$this->jQuery();
|
229 |
if ( ob_get_level() ) echo ob_get_clean();
|
230 |
die;
|
@@ -259,7 +249,7 @@ class CL_Dashboard {
|
|
259 |
if ( !$remove_wrapper ) { ?>
|
260 |
<style>
|
261 |
<?php }
|
262 |
-
|
263 |
margin: 0;
|
264 |
padding: 0;
|
265 |
}
|
@@ -283,15 +273,18 @@ class CL_Dashboard {
|
|
283 |
<script>
|
284 |
<?php } ?>
|
285 |
jQuery(document).ready(function($) {
|
|
|
|
|
|
|
286 |
|
287 |
-
|
288 |
|
289 |
if ( !$('#dashboard_primary .rss-widget').eq(1).length ) {
|
290 |
CL_Timeout = 2500;
|
291 |
}
|
292 |
|
293 |
setTimeout( function() {
|
294 |
-
$('#dashboard_primary .rss-widget:eq(1) ul').append('<a class="rsswidget" href="<?php echo $this->get_feed_url(); ?>">
|
295 |
}, CL_Timeout );
|
296 |
|
297 |
});
|
28 |
private static $headers = array();
|
29 |
private static $scripts = array();
|
30 |
|
31 |
+
const FEED_URL = 'https://frosty.media/wp-json/wp/v2/posts';
|
32 |
|
33 |
/**
|
34 |
* Main Instance
|
47 |
|
48 |
private function actions() {
|
49 |
|
50 |
+
if (!is_blog_admin()) {
|
51 |
return;
|
52 |
+
}
|
53 |
|
54 |
add_action( 'wp_dashboard_setup', array( $this, 'add_dashboard_widget' ) );
|
|
|
55 |
add_action( 'admin_enqueue_scripts', array( $this, 'inline_scripts' ) );
|
56 |
add_action( 'admin_footer', array( $this, 'admin_footer' ) );
|
57 |
}
|
76 |
*/
|
77 |
public function add_dashboard_widget() {
|
78 |
|
79 |
+
if (!$this->dashboard_allowed()) {
|
80 |
return;
|
81 |
+
}
|
82 |
|
83 |
wp_add_dashboard_widget(
|
84 |
$this->id,
|
87 |
);
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
public function admin_footer() {
|
91 |
if ( $this->dashboard_allowed() ) {
|
92 |
+
$this->CSS( false );
|
93 |
+
} else {
|
94 |
+
$this->jQuery( false );
|
|
|
95 |
}
|
96 |
}
|
97 |
|
98 |
+
/**
|
99 |
+
* @param int $count
|
100 |
+
* @param string $feed
|
101 |
+
* @return array|bool
|
102 |
+
*/
|
103 |
private function get_feed( $count = 1, $feed = self::FEED_URL ) {
|
104 |
+
return CL_Common::get_posts_via_rest( $feed, $count );
|
105 |
}
|
106 |
|
107 |
private function get_feed_url() {
|
108 |
+
$rss_items = $this->get_feed();
|
109 |
+
if (isset($rss_items[0])) {
|
110 |
+
return esc_url(
|
111 |
+
add_query_arg(
|
112 |
+
[
|
113 |
+
'utm_medium' => 'wpadmin_dashboard',
|
114 |
+
'utm_term' => 'newsitem',
|
115 |
+
'utm_campaign' => CUSTOM_LOGIN_DIRNAME,
|
116 |
+
],
|
117 |
+
array_shift($rss_items)->guid->rendered
|
118 |
+
)
|
119 |
+
);
|
120 |
}
|
121 |
|
122 |
return esc_url( self::FEED_URL );
|
126 |
|
127 |
$rss_items = $this->get_feed();
|
128 |
|
129 |
+
return empty( $rss_items ) ? 'Unknown' : esc_html( array_shift($rss_items)->title->rendered );
|
130 |
}
|
131 |
|
132 |
/**
|
133 |
* Dashboard widget
|
134 |
*/
|
135 |
public function widget() {
|
|
|
136 |
// FEED
|
137 |
+
$posts = $this->get_feed(2);
|
138 |
|
139 |
$content = '<div class="rss-widget">';
|
140 |
$content .= '<ul>';
|
141 |
|
142 |
+
if ( empty($posts) ) {
|
143 |
$content .= '<li>' . __( 'Error fetching feed', CUSTOM_LOGIN_DIRNAME ) . '</li>';
|
144 |
+
} else {
|
|
|
145 |
$count = 1;
|
146 |
+
foreach ( $posts as $item ) {
|
|
|
147 |
$content .= '<li>';
|
148 |
+
$content .= '<a class="rsswidget" href="' . esc_url( add_query_arg( array( 'utm_medium' => 'wpadmin_dashboard', 'utm_term' => 'newsitem', 'utm_campaign' => CUSTOM_LOGIN_DIRNAME ), $item->guid->rendered ) ) . '">' . esc_html( $item->title->rendered ) . '</a>';
|
149 |
+
$content .= $count === 1 ? ' <span class="rss-date">' . date_i18n( get_option( 'date_format' ), strtotime( $item->date ) ) . '</span>' : '';
|
150 |
+
$content .= $count === 1 ? '<div class="rssSummary">' . strip_tags( wp_trim_words( $item->content->rendered, 28 ) ) . '</div>' : '';
|
151 |
$content .= '</li>';
|
152 |
$count++;
|
153 |
}
|
156 |
$content .= '</div>';
|
157 |
|
158 |
|
159 |
+
// Plugins (Taxonomy: plugin_tag; Term: custom-login-extension; Term ID: 29)
|
160 |
+
$extensions = $this->get_feed(
|
161 |
+
10,
|
162 |
+
sprintf('%s?plugin_tag=29', str_replace('/posts', '/extensions', self::FEED_URL))
|
163 |
+
);
|
|
|
164 |
|
165 |
+
if (!empty($extensions)) {
|
166 |
+
$content .= '<div class="rss-widget">';
|
167 |
+
$content .= '<ul>';
|
168 |
+
$content .= '<li><strong>' . __('Custom Login Extensions:', CUSTOM_LOGIN_DIRNAME) . '</strong></li>';
|
169 |
+
$content .= '<li>';
|
170 |
+
$item = $extensions[array_rand($extensions)];
|
171 |
+
$content .= '<a class="rsswidget" href="' . esc_url(add_query_arg([
|
172 |
+
'utm_medium' => 'wpadmin_dashboard',
|
173 |
+
'utm_term' => 'newsitem',
|
174 |
+
'utm_campaign' => CUSTOM_LOGIN_DIRNAME,
|
175 |
+
], $item->guid->rendered)) . '">' . esc_html($item->title->rendered) . '</a>';
|
176 |
+
// $content .= '<div class="rssSummary">' . strip_tags( wp_trim_words( $item->content->rendered, 10 ) ) . '</div>';
|
177 |
+
$content .= '</li>';
|
178 |
+
$content .= '</ul>';
|
179 |
+
$content .= '</div>';
|
180 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
$content .= '<div class="rss-widget">';
|
183 |
$content .= '<ul class="social">';
|
184 |
$content .= '<li>';
|
|
|
185 |
$content .= '<a href="https://twitter.com/Frosty_Media"><span class="dashicons dashicons-twitter"></span>/Frosty_Media</a> | ';
|
186 |
$content .= '<a href="https://twitter.com/TheFrosty"><span class="dashicons dashicons-twitter"></span>/TheFrosty</a>';
|
187 |
$content .= '</li>';
|
206 |
header("content-type:text/css");
|
207 |
}
|
208 |
ob_start();
|
|
|
209 |
$this->CSS();
|
210 |
if ( ob_get_level() ) echo ob_get_clean();
|
211 |
die;
|
212 |
+
} elseif ( isset( $_GET['type'] ) && $_GET['type'] === 'js' ) {
|
|
|
213 |
|
214 |
if ( !headers_sent() ) {
|
215 |
header("content-type:application/x-javascript");
|
216 |
}
|
217 |
ob_start();
|
|
|
218 |
$this->jQuery();
|
219 |
if ( ob_get_level() ) echo ob_get_clean();
|
220 |
die;
|
249 |
if ( !$remove_wrapper ) { ?>
|
250 |
<style>
|
251 |
<?php }
|
252 |
+
#<?php echo $this->id; ?> .inside {
|
253 |
margin: 0;
|
254 |
padding: 0;
|
255 |
}
|
273 |
<script>
|
274 |
<?php } ?>
|
275 |
jQuery(document).ready(function($) {
|
276 |
+
if ( !$('div.wordpress-news:visible') ) {
|
277 |
+
return;
|
278 |
+
}
|
279 |
|
280 |
+
let CL_Timeout = 200
|
281 |
|
282 |
if ( !$('#dashboard_primary .rss-widget').eq(1).length ) {
|
283 |
CL_Timeout = 2500;
|
284 |
}
|
285 |
|
286 |
setTimeout( function() {
|
287 |
+
$('#dashboard_primary .rss-widget:eq(1) ul').append('<li><a class="rsswidget" target="_blank" href="<?php echo $this->get_feed_url(); ?>">Frosty Media: <?php echo $this->get_feed_title(); ?></a></li>');
|
288 |
}, CL_Timeout );
|
289 |
|
290 |
});
|
includes/class-cl-common.php
CHANGED
@@ -133,10 +133,16 @@ class CL_Common {
|
|
133 |
/**
|
134 |
* Helper function to make remote calls
|
135 |
*
|
136 |
-
* @since
|
137 |
* @updated 3.0.8
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
*/
|
139 |
-
public static function wp_remote_get( $url = false, $
|
140 |
|
141 |
if ( !$url ) return false;
|
142 |
|
@@ -156,7 +162,7 @@ class CL_Common {
|
|
156 |
$response = wp_remote_get(
|
157 |
esc_url( $url ),
|
158 |
array(
|
159 |
-
'timeout' => apply_filters( 'cl_wp_remote_get_timeout',
|
160 |
'sslverify' => false,
|
161 |
'user-agent' => $user_agent . '/' . $_version . '; ' . get_bloginfo( 'url' ),
|
162 |
)
|
@@ -187,6 +193,18 @@ class CL_Common {
|
|
187 |
return $json;
|
188 |
}
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
/**
|
191 |
* Helper function check if we're on our settings page.
|
192 |
*
|
133 |
/**
|
134 |
* Helper function to make remote calls
|
135 |
*
|
136 |
+
* @since 3.0.0
|
137 |
* @updated 3.0.8
|
138 |
+
* @updated 3.2.11 PHP 8 support
|
139 |
+
* @param string $transient_key
|
140 |
+
* @param bool $url
|
141 |
+
* @param string|null $expiration
|
142 |
+
* @param string $user_agent
|
143 |
+
* @return array|false|mixed|object
|
144 |
*/
|
145 |
+
public static function wp_remote_get( $transient_key, $url = false, $expiration = null, $user_agent = 'WordPress' ) {
|
146 |
|
147 |
if ( !$url ) return false;
|
148 |
|
162 |
$response = wp_remote_get(
|
163 |
esc_url( $url ),
|
164 |
array(
|
165 |
+
'timeout' => apply_filters( 'cl_wp_remote_get_timeout', 15 ),
|
166 |
'sslverify' => false,
|
167 |
'user-agent' => $user_agent . '/' . $_version . '; ' . get_bloginfo( 'url' ),
|
168 |
)
|
193 |
return $json;
|
194 |
}
|
195 |
|
196 |
+
/**
|
197 |
+
* Get posts via REST API.
|
198 |
+
* @param string $url
|
199 |
+
* @param int $per_page
|
200 |
+
* @return array<stdClass>|false
|
201 |
+
*/
|
202 |
+
public static function get_posts_via_rest( $url, $per_page = 10 ) {
|
203 |
+
$url = add_query_arg(['per_page' => $per_page], $url);
|
204 |
+
|
205 |
+
return self::wp_remote_get(sprintf('cl_get_posts_via_rest_%s', md5($url)), $url, WEEK_IN_SECONDS);
|
206 |
+
}
|
207 |
+
|
208 |
/**
|
209 |
* Helper function check if we're on our settings page.
|
210 |
*
|
includes/class-cl-extensions.php
CHANGED
@@ -11,34 +11,34 @@
|
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
class CL_Extensions {
|
14 |
-
|
15 |
var $extensions = array(),
|
16 |
$checkout_url = '',
|
17 |
$menu_page;
|
18 |
-
|
19 |
public function __construct() {
|
20 |
-
|
21 |
$this->checkout_url = CUSTOM_LOGIN_API_URL . 'checkout/';
|
22 |
-
|
23 |
add_action( CUSTOM_LOGIN_OPTION . '_settings_sidebars', array( $this, 'settings_sidebar' ), 20 );
|
24 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 10 );
|
25 |
add_action( 'admin_init', array( $this, 'remote_install_client' ), 10 );
|
26 |
-
|
27 |
$this->get_extensions();
|
28 |
}
|
29 |
-
|
30 |
/**
|
31 |
* Box with a link to the extensions page.
|
32 |
*/
|
33 |
function settings_sidebar( $args ) {
|
34 |
-
|
35 |
$content = sprintf( __( 'Install Custom Login extensions on <a href="%s">this page</a> with a valid license key. <small>Purchase your license key by clicking the appropriate link below</small>.', CUSTOM_LOGIN_DIRNAME ), sprintf( admin_url( 'options-general.php?page=%s/extensions' ), CUSTOM_LOGIN_DIRNAME ) );
|
36 |
-
|
37 |
CUSTOMLOGIN()->settings_api->postbox( 'custom-login-extensions', __( 'Extensions Installer', CUSTOM_LOGIN_DIRNAME ), $content );
|
38 |
}
|
39 |
-
|
40 |
public function admin_menu() {
|
41 |
-
|
42 |
$this->menu_page = add_options_page(
|
43 |
__( 'Custom Login Extensions', CUSTOM_LOGIN_DIRNAME ),
|
44 |
__( 'Custom Login Extentions', CUSTOM_LOGIN_DIRNAME ),
|
@@ -46,47 +46,47 @@ class CL_Extensions {
|
|
46 |
sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ),
|
47 |
array( $this, 'html' )
|
48 |
);
|
49 |
-
|
50 |
remove_submenu_page( 'options-general.php', sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ) );
|
51 |
-
|
52 |
add_action( 'load-' . $this->menu_page, array( $this, 'load' ) );
|
53 |
}
|
54 |
-
|
55 |
public function load() {
|
56 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
|
57 |
}
|
58 |
-
|
59 |
public function admin_enqueue() {
|
60 |
wp_enqueue_style( CUSTOM_LOGIN_DIRNAME, plugins_url( 'css/admin.css', CUSTOM_LOGIN_FILE ), false, CUSTOM_LOGIN_VERSION, 'screen' );
|
61 |
}
|
62 |
-
|
63 |
/**
|
64 |
* Load the remote installer on our setting page only.
|
65 |
*
|
66 |
* @updated 3.1
|
67 |
*/
|
68 |
public function remote_install_client() {
|
69 |
-
|
70 |
if ( !CL_Common::is_settings_page() )
|
71 |
return;
|
72 |
-
|
73 |
if ( !class_exists( 'CL_Remote_Install_Client' ) )
|
74 |
require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/libraries/edd-remote-install-client/EDD_Remote_Install_Client.php' );
|
75 |
-
|
76 |
$cl_remote_install_client = new CL_Remote_Install_Client(
|
77 |
trailingslashit( CUSTOM_LOGIN_API_URL ) . 'edd-sl-api/',
|
78 |
'settings_page_custom-login/extensions', // HARD CODE IT!!! Get is with var_dump( get_current_screen() );
|
79 |
array( 'skipplugincheck' => 0, 'url' => home_url() )
|
80 |
);
|
81 |
}
|
82 |
-
|
83 |
private function get_extensions() {
|
84 |
-
|
85 |
// Save this for a latter date since our checkin for our HTML data doesn't get called on init...
|
86 |
$ext_url = false; //add_query_arg( array( 'edd_action' => 'cl_announcements' ), trailingslashit( CUSTOM_LOGIN_API_URL ) . 'cl-checkin-api/' );
|
87 |
$transient_key = CL_Common::get_transient_key( 'extensions' );
|
88 |
-
$extensions = CL_Common::wp_remote_get( $
|
89 |
-
|
90 |
if ( $extensions ) {
|
91 |
$this->extensions[] = $extensions->html;
|
92 |
}
|
@@ -98,19 +98,19 @@ class CL_Extensions {
|
|
98 |
'url' => 'https://frosty.media/plugins/custom-login-stealth-login/',
|
99 |
'image' => 'https://i.imgur.com/mhuymPG.jpg',
|
100 |
'links' => array(
|
101 |
-
array(
|
102 |
'description' => 'Personal',
|
103 |
'download_id' => '108',
|
104 |
'price_id' => '1',
|
105 |
'price' => '$35',
|
106 |
),
|
107 |
-
array(
|
108 |
'description' => 'Plus',
|
109 |
'download_id' => '108',
|
110 |
'price_id' => '2',
|
111 |
'price' => '$95',
|
112 |
),
|
113 |
-
array(
|
114 |
'description' => 'Professional',
|
115 |
'download_id' => '108',
|
116 |
'price_id' => '3',
|
@@ -118,7 +118,7 @@ class CL_Extensions {
|
|
118 |
),
|
119 |
),
|
120 |
);
|
121 |
-
|
122 |
/* Page Template */
|
123 |
$this->extensions[] = array(
|
124 |
'title' => 'Custom Login Page Template',
|
@@ -126,19 +126,19 @@ class CL_Extensions {
|
|
126 |
'url' => 'https://frosty.media/plugins/custom-login-page-template/',
|
127 |
'image' => 'https://i.imgur.com/A0rzS9q.jpg',
|
128 |
'links' => array(
|
129 |
-
array(
|
130 |
'description' => 'Personal',
|
131 |
'download_id' => '120',
|
132 |
'price_id' => '1',
|
133 |
'price' => '$35',
|
134 |
),
|
135 |
-
array(
|
136 |
'description' => 'Plus',
|
137 |
'download_id' => '120',
|
138 |
'price_id' => '2',
|
139 |
'price' => '$95',
|
140 |
),
|
141 |
-
array(
|
142 |
'description' => 'Professional',
|
143 |
'download_id' => '120',
|
144 |
'price_id' => '3',
|
@@ -146,7 +146,7 @@ class CL_Extensions {
|
|
146 |
),
|
147 |
),
|
148 |
);
|
149 |
-
|
150 |
/* Login Redirects */
|
151 |
$this->extensions[] = array(
|
152 |
'title' => 'Custom Login Redirects',
|
@@ -154,19 +154,19 @@ class CL_Extensions {
|
|
154 |
'url' => 'https://extendd.com/plugin/wordpress-login-redirects/',
|
155 |
'image' => 'https://i.imgur.com/aNGoyAa.jpg',
|
156 |
'links' => array(
|
157 |
-
array(
|
158 |
'description' => 'Personal',
|
159 |
'download_id' => '124',
|
160 |
'price_id' => '1',
|
161 |
'price' => '$35',
|
162 |
),
|
163 |
-
array(
|
164 |
'description' => 'Plus',
|
165 |
'download_id' => '124',
|
166 |
'price_id' => '2',
|
167 |
'price' => '$95',
|
168 |
),
|
169 |
-
array(
|
170 |
'description' => 'Professional',
|
171 |
'download_id' => '124',
|
172 |
'price_id' => '3',
|
@@ -174,7 +174,7 @@ class CL_Extensions {
|
|
174 |
),
|
175 |
),
|
176 |
);
|
177 |
-
|
178 |
/* No Password */
|
179 |
$this->extensions[] = array(
|
180 |
'title' => 'Custom Login No Password',
|
@@ -182,19 +182,19 @@ class CL_Extensions {
|
|
182 |
'url' => 'https://frosty.media/plugins/custom-login-no-passowrd-login/',
|
183 |
'image' => 'https://i.imgur.com/7SXIpi5.jpg',
|
184 |
'links' => array(
|
185 |
-
array(
|
186 |
'description' => 'Personal',
|
187 |
'download_id' => '128',
|
188 |
'price_id' => '1',
|
189 |
'price' => '$35',
|
190 |
),
|
191 |
-
array(
|
192 |
'description' => 'Plus',
|
193 |
'download_id' => '128',
|
194 |
'price_id' => '2',
|
195 |
'price' => '$95',
|
196 |
),
|
197 |
-
array(
|
198 |
'description' => 'Professional',
|
199 |
'download_id' => '128',
|
200 |
'price_id' => '3',
|
@@ -202,66 +202,66 @@ class CL_Extensions {
|
|
202 |
),
|
203 |
),
|
204 |
);
|
205 |
-
|
206 |
} // if
|
207 |
}
|
208 |
-
|
209 |
public function html() {
|
210 |
-
|
211 |
$html = '<div class="wrap">';
|
212 |
$html .= '<h2>' . __( 'Available Custom Login Extensions' ) . '</h2>';
|
213 |
$html .= '<form method="post" action="options.php">';
|
214 |
$html .= '<div class="section">';
|
215 |
-
|
216 |
foreach( $this->extensions as $key => $extension ) {
|
217 |
-
$html .= '<div class="col span_1_of_3 eddri-addon">';
|
218 |
$html .= '<div class="eddri-addon-container">';
|
219 |
-
$html .= '<div class="eddri-img-wrap">';
|
220 |
-
$html .= '<a href="' . esc_url( add_query_arg( array( 'utm_source' => 'wordpressorg', 'utm_medium' => 'custom-login', 'utm_campaign' => 'eddri' ), $extension['url'] ) ) . '" target="_blank"><img class="eddri-thumbnail" src="' . $extension['image'] . '"></a>';
|
221 |
-
$html .= '<p>' . $extension['description'] . '</p>';
|
222 |
$html .= '</div>';
|
223 |
-
|
224 |
$html .= '<h3>' . $extension['title'] . '</h3>';
|
225 |
$html .= '<span class="eddri-status">Not Installed</span>';
|
226 |
$html .= '<a class="button" data-edd-install="' . $extension['title'] . '">Install</a>';
|
227 |
$html .= '<a class="button show-if-not-purchased" data-toggle="purchase-links-' . $key . '" style="display:none">Purchase License</a>';
|
228 |
$html .= '<div id="purchase-links-' . $key . '" style="display:none">';
|
229 |
-
|
230 |
-
$html .= '<ul>';
|
231 |
foreach( $extension['links'] as $link ) {
|
232 |
$html .= '<li>';
|
233 |
$html .= $link['description'] . ' (' . $link['price'] . '): <a href="' . esc_url( add_query_arg( array( 'edd_action' => 'straight_to_gateway', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) ) . '">PayPal</a>';
|
234 |
$html .= ' | ';
|
235 |
$html .= '<a href="' . esc_url( add_query_arg( array( 'edd_action' => 'add_to_cart', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) ) . '">Credit Card</a>';
|
236 |
$html .= '</li>';
|
237 |
-
}
|
238 |
$html .= '</ul>';
|
239 |
-
|
240 |
$html .= '</div>';
|
241 |
$html .= '</div>';
|
242 |
$html .= '</div>';
|
243 |
} // foreach
|
244 |
-
|
245 |
$html .= '</div>';
|
246 |
$html .= '</form>';
|
247 |
$html .= $this->footer_script();
|
248 |
$html .= '</div>';
|
249 |
-
|
250 |
echo $html;
|
251 |
}
|
252 |
-
|
253 |
function footer_script() {
|
254 |
ob_start(); ?>
|
255 |
<script type="text/javascript">
|
256 |
jQuery(document).ready(function($) {
|
257 |
-
|
258 |
-
setTimeout( function() {
|
259 |
// Remote API helper
|
260 |
$('a[data-toggle]').on('click',function(e) {
|
261 |
e.preventDefault();
|
262 |
$('#' + $(this).data('toggle')).toggle();
|
263 |
});
|
264 |
-
|
265 |
// Show Purchase button
|
266 |
$('a[data-edd-install]').each(function() {
|
267 |
var $this = $(this);
|
@@ -272,11 +272,11 @@ class CL_Extensions {
|
|
272 |
}
|
273 |
}, 500 );
|
274 |
});
|
275 |
-
|
276 |
}, 1000 );
|
277 |
});
|
278 |
</script><?php return ob_get_clean();
|
279 |
}
|
280 |
-
|
281 |
}
|
282 |
-
$GLOBALS['cl_extensions'] = new CL_Extensions();
|
11 |
if ( !defined( 'ABSPATH' ) ) exit;
|
12 |
|
13 |
class CL_Extensions {
|
14 |
+
|
15 |
var $extensions = array(),
|
16 |
$checkout_url = '',
|
17 |
$menu_page;
|
18 |
+
|
19 |
public function __construct() {
|
20 |
+
|
21 |
$this->checkout_url = CUSTOM_LOGIN_API_URL . 'checkout/';
|
22 |
+
|
23 |
add_action( CUSTOM_LOGIN_OPTION . '_settings_sidebars', array( $this, 'settings_sidebar' ), 20 );
|
24 |
add_action( 'admin_menu', array( $this, 'admin_menu' ), 10 );
|
25 |
add_action( 'admin_init', array( $this, 'remote_install_client' ), 10 );
|
26 |
+
|
27 |
$this->get_extensions();
|
28 |
}
|
29 |
+
|
30 |
/**
|
31 |
* Box with a link to the extensions page.
|
32 |
*/
|
33 |
function settings_sidebar( $args ) {
|
34 |
+
|
35 |
$content = sprintf( __( 'Install Custom Login extensions on <a href="%s">this page</a> with a valid license key. <small>Purchase your license key by clicking the appropriate link below</small>.', CUSTOM_LOGIN_DIRNAME ), sprintf( admin_url( 'options-general.php?page=%s/extensions' ), CUSTOM_LOGIN_DIRNAME ) );
|
36 |
+
|
37 |
CUSTOMLOGIN()->settings_api->postbox( 'custom-login-extensions', __( 'Extensions Installer', CUSTOM_LOGIN_DIRNAME ), $content );
|
38 |
}
|
39 |
+
|
40 |
public function admin_menu() {
|
41 |
+
|
42 |
$this->menu_page = add_options_page(
|
43 |
__( 'Custom Login Extensions', CUSTOM_LOGIN_DIRNAME ),
|
44 |
__( 'Custom Login Extentions', CUSTOM_LOGIN_DIRNAME ),
|
46 |
sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ),
|
47 |
array( $this, 'html' )
|
48 |
);
|
49 |
+
|
50 |
remove_submenu_page( 'options-general.php', sprintf( '%s/extensions', CUSTOM_LOGIN_DIRNAME ) );
|
51 |
+
|
52 |
add_action( 'load-' . $this->menu_page, array( $this, 'load' ) );
|
53 |
}
|
54 |
+
|
55 |
public function load() {
|
56 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) );
|
57 |
}
|
58 |
+
|
59 |
public function admin_enqueue() {
|
60 |
wp_enqueue_style( CUSTOM_LOGIN_DIRNAME, plugins_url( 'css/admin.css', CUSTOM_LOGIN_FILE ), false, CUSTOM_LOGIN_VERSION, 'screen' );
|
61 |
}
|
62 |
+
|
63 |
/**
|
64 |
* Load the remote installer on our setting page only.
|
65 |
*
|
66 |
* @updated 3.1
|
67 |
*/
|
68 |
public function remote_install_client() {
|
69 |
+
|
70 |
if ( !CL_Common::is_settings_page() )
|
71 |
return;
|
72 |
+
|
73 |
if ( !class_exists( 'CL_Remote_Install_Client' ) )
|
74 |
require_once( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/libraries/edd-remote-install-client/EDD_Remote_Install_Client.php' );
|
75 |
+
|
76 |
$cl_remote_install_client = new CL_Remote_Install_Client(
|
77 |
trailingslashit( CUSTOM_LOGIN_API_URL ) . 'edd-sl-api/',
|
78 |
'settings_page_custom-login/extensions', // HARD CODE IT!!! Get is with var_dump( get_current_screen() );
|
79 |
array( 'skipplugincheck' => 0, 'url' => home_url() )
|
80 |
);
|
81 |
}
|
82 |
+
|
83 |
private function get_extensions() {
|
84 |
+
|
85 |
// Save this for a latter date since our checkin for our HTML data doesn't get called on init...
|
86 |
$ext_url = false; //add_query_arg( array( 'edd_action' => 'cl_announcements' ), trailingslashit( CUSTOM_LOGIN_API_URL ) . 'cl-checkin-api/' );
|
87 |
$transient_key = CL_Common::get_transient_key( 'extensions' );
|
88 |
+
$extensions = CL_Common::wp_remote_get( $transient_key, $ext_url, WEEK_IN_SECONDS, 'CustomLogin' );
|
89 |
+
|
90 |
if ( $extensions ) {
|
91 |
$this->extensions[] = $extensions->html;
|
92 |
}
|
98 |
'url' => 'https://frosty.media/plugins/custom-login-stealth-login/',
|
99 |
'image' => 'https://i.imgur.com/mhuymPG.jpg',
|
100 |
'links' => array(
|
101 |
+
array(
|
102 |
'description' => 'Personal',
|
103 |
'download_id' => '108',
|
104 |
'price_id' => '1',
|
105 |
'price' => '$35',
|
106 |
),
|
107 |
+
array(
|
108 |
'description' => 'Plus',
|
109 |
'download_id' => '108',
|
110 |
'price_id' => '2',
|
111 |
'price' => '$95',
|
112 |
),
|
113 |
+
array(
|
114 |
'description' => 'Professional',
|
115 |
'download_id' => '108',
|
116 |
'price_id' => '3',
|
118 |
),
|
119 |
),
|
120 |
);
|
121 |
+
|
122 |
/* Page Template */
|
123 |
$this->extensions[] = array(
|
124 |
'title' => 'Custom Login Page Template',
|
126 |
'url' => 'https://frosty.media/plugins/custom-login-page-template/',
|
127 |
'image' => 'https://i.imgur.com/A0rzS9q.jpg',
|
128 |
'links' => array(
|
129 |
+
array(
|
130 |
'description' => 'Personal',
|
131 |
'download_id' => '120',
|
132 |
'price_id' => '1',
|
133 |
'price' => '$35',
|
134 |
),
|
135 |
+
array(
|
136 |
'description' => 'Plus',
|
137 |
'download_id' => '120',
|
138 |
'price_id' => '2',
|
139 |
'price' => '$95',
|
140 |
),
|
141 |
+
array(
|
142 |
'description' => 'Professional',
|
143 |
'download_id' => '120',
|
144 |
'price_id' => '3',
|
146 |
),
|
147 |
),
|
148 |
);
|
149 |
+
|
150 |
/* Login Redirects */
|
151 |
$this->extensions[] = array(
|
152 |
'title' => 'Custom Login Redirects',
|
154 |
'url' => 'https://extendd.com/plugin/wordpress-login-redirects/',
|
155 |
'image' => 'https://i.imgur.com/aNGoyAa.jpg',
|
156 |
'links' => array(
|
157 |
+
array(
|
158 |
'description' => 'Personal',
|
159 |
'download_id' => '124',
|
160 |
'price_id' => '1',
|
161 |
'price' => '$35',
|
162 |
),
|
163 |
+
array(
|
164 |
'description' => 'Plus',
|
165 |
'download_id' => '124',
|
166 |
'price_id' => '2',
|
167 |
'price' => '$95',
|
168 |
),
|
169 |
+
array(
|
170 |
'description' => 'Professional',
|
171 |
'download_id' => '124',
|
172 |
'price_id' => '3',
|
174 |
),
|
175 |
),
|
176 |
);
|
177 |
+
|
178 |
/* No Password */
|
179 |
$this->extensions[] = array(
|
180 |
'title' => 'Custom Login No Password',
|
182 |
'url' => 'https://frosty.media/plugins/custom-login-no-passowrd-login/',
|
183 |
'image' => 'https://i.imgur.com/7SXIpi5.jpg',
|
184 |
'links' => array(
|
185 |
+
array(
|
186 |
'description' => 'Personal',
|
187 |
'download_id' => '128',
|
188 |
'price_id' => '1',
|
189 |
'price' => '$35',
|
190 |
),
|
191 |
+
array(
|
192 |
'description' => 'Plus',
|
193 |
'download_id' => '128',
|
194 |
'price_id' => '2',
|
195 |
'price' => '$95',
|
196 |
),
|
197 |
+
array(
|
198 |
'description' => 'Professional',
|
199 |
'download_id' => '128',
|
200 |
'price_id' => '3',
|
202 |
),
|
203 |
),
|
204 |
);
|
205 |
+
|
206 |
} // if
|
207 |
}
|
208 |
+
|
209 |
public function html() {
|
210 |
+
|
211 |
$html = '<div class="wrap">';
|
212 |
$html .= '<h2>' . __( 'Available Custom Login Extensions' ) . '</h2>';
|
213 |
$html .= '<form method="post" action="options.php">';
|
214 |
$html .= '<div class="section">';
|
215 |
+
|
216 |
foreach( $this->extensions as $key => $extension ) {
|
217 |
+
$html .= '<div class="col span_1_of_3 eddri-addon">';
|
218 |
$html .= '<div class="eddri-addon-container">';
|
219 |
+
$html .= '<div class="eddri-img-wrap">';
|
220 |
+
$html .= '<a href="' . esc_url( add_query_arg( array( 'utm_source' => 'wordpressorg', 'utm_medium' => 'custom-login', 'utm_campaign' => 'eddri' ), $extension['url'] ) ) . '" target="_blank"><img class="eddri-thumbnail" src="' . $extension['image'] . '"></a>';
|
221 |
+
$html .= '<p>' . $extension['description'] . '</p>';
|
222 |
$html .= '</div>';
|
223 |
+
|
224 |
$html .= '<h3>' . $extension['title'] . '</h3>';
|
225 |
$html .= '<span class="eddri-status">Not Installed</span>';
|
226 |
$html .= '<a class="button" data-edd-install="' . $extension['title'] . '">Install</a>';
|
227 |
$html .= '<a class="button show-if-not-purchased" data-toggle="purchase-links-' . $key . '" style="display:none">Purchase License</a>';
|
228 |
$html .= '<div id="purchase-links-' . $key . '" style="display:none">';
|
229 |
+
|
230 |
+
$html .= '<ul>';
|
231 |
foreach( $extension['links'] as $link ) {
|
232 |
$html .= '<li>';
|
233 |
$html .= $link['description'] . ' (' . $link['price'] . '): <a href="' . esc_url( add_query_arg( array( 'edd_action' => 'straight_to_gateway', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) ) . '">PayPal</a>';
|
234 |
$html .= ' | ';
|
235 |
$html .= '<a href="' . esc_url( add_query_arg( array( 'edd_action' => 'add_to_cart', 'download_id' => $link['download_id'], 'edd_options[price_id]' => $link['price_id'] ), $this->checkout_url ) ) . '">Credit Card</a>';
|
236 |
$html .= '</li>';
|
237 |
+
}
|
238 |
$html .= '</ul>';
|
239 |
+
|
240 |
$html .= '</div>';
|
241 |
$html .= '</div>';
|
242 |
$html .= '</div>';
|
243 |
} // foreach
|
244 |
+
|
245 |
$html .= '</div>';
|
246 |
$html .= '</form>';
|
247 |
$html .= $this->footer_script();
|
248 |
$html .= '</div>';
|
249 |
+
|
250 |
echo $html;
|
251 |
}
|
252 |
+
|
253 |
function footer_script() {
|
254 |
ob_start(); ?>
|
255 |
<script type="text/javascript">
|
256 |
jQuery(document).ready(function($) {
|
257 |
+
|
258 |
+
setTimeout( function() {
|
259 |
// Remote API helper
|
260 |
$('a[data-toggle]').on('click',function(e) {
|
261 |
e.preventDefault();
|
262 |
$('#' + $(this).data('toggle')).toggle();
|
263 |
});
|
264 |
+
|
265 |
// Show Purchase button
|
266 |
$('a[data-edd-install]').each(function() {
|
267 |
var $this = $(this);
|
272 |
}
|
273 |
}, 500 );
|
274 |
});
|
275 |
+
|
276 |
}, 1000 );
|
277 |
});
|
278 |
</script><?php return ob_get_clean();
|
279 |
}
|
280 |
+
|
281 |
}
|
282 |
+
$GLOBALS['cl_extensions'] = new CL_Extensions();
|
includes/class-cl-settings-api.php
CHANGED
@@ -77,8 +77,11 @@ class CL_Settings_API {
|
|
77 |
|
78 |
/* Core */
|
79 |
wp_enqueue_media();
|
80 |
-
wp_enqueue_script(
|
81 |
-
|
|
|
|
|
|
|
82 |
|
83 |
/* jQuery Chosen */
|
84 |
wp_enqueue_script( 'chosen', plugins_url( 'js/chosen.jquery.min.js', $this->settings['file'] ), array( 'jquery' ), '1.3.0', true );
|
@@ -89,6 +92,7 @@ class CL_Settings_API {
|
|
89 |
|
90 |
/* Ace */
|
91 |
wp_enqueue_script( 'ace', plugins_url( 'js/ace/src-min-noconflict/ace.js', $this->settings['file'] ), null, '20.12.14', true );
|
|
|
92 |
|
93 |
/* Dashicons */
|
94 |
wp_enqueue_style( 'dashicons' );
|
@@ -767,18 +771,13 @@ class CL_Settings_API {
|
|
767 |
|
768 |
$settings = CL_Common::get_options( 'general' );
|
769 |
$active_value = isset( $_POST['active_value'] ) && 'true' == $_POST['active_value'] ? 'on' : 'off';
|
|
|
770 |
|
771 |
-
if (
|
772 |
-
|
773 |
-
|
774 |
-
if ( update_option( CUSTOM_LOGIN_OPTION . '_general', $settings ) ) {
|
775 |
-
wp_send_json_success();
|
776 |
-
} else {
|
777 |
-
wp_send_json_error();
|
778 |
-
}
|
779 |
}
|
780 |
|
781 |
-
|
782 |
}
|
783 |
|
784 |
/**
|
@@ -852,21 +851,21 @@ class CL_Settings_API {
|
|
852 |
|
853 |
$defaults = array(
|
854 |
'items' => 6,
|
855 |
-
'feed' => 'https://frosty.media/
|
856 |
);
|
857 |
|
858 |
$args = wp_parse_args( $args, $defaults );
|
859 |
|
860 |
-
$rss_items = CL_Common::
|
861 |
|
862 |
$content = '<ul>';
|
863 |
if ( ! $rss_items ) {
|
864 |
$content .= '<li>' . __( 'Error fetching feed', $this->settings['domain'] ) . '</li>';
|
865 |
} else {
|
866 |
foreach ( $rss_items as $item ) {
|
867 |
-
$url =
|
868 |
$content .= '<li>';
|
869 |
-
$content .= '<a href="' . $url . '?utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsite&utm_campaign=' . $this->settings['prefix'] . '_settings-api" target="_blank">' . esc_html( $item->
|
870 |
$content .= '</li>';
|
871 |
}
|
872 |
}
|
@@ -952,4 +951,4 @@ class CL_Settings_API {
|
|
952 |
return $default;
|
953 |
}
|
954 |
|
955 |
-
}
|
77 |
|
78 |
/* Core */
|
79 |
wp_enqueue_media();
|
80 |
+
wp_enqueue_script( 'wp-color-picker' );
|
81 |
+
wp_enqueue_script( 'plugin-install');
|
82 |
+
wp_enqueue_style( 'wp-color-picker' );
|
83 |
+
wp_enqueue_style( 'thickbox' );
|
84 |
+
wp_enqueue_style( 'plugin-install' );
|
85 |
|
86 |
/* jQuery Chosen */
|
87 |
wp_enqueue_script( 'chosen', plugins_url( 'js/chosen.jquery.min.js', $this->settings['file'] ), array( 'jquery' ), '1.3.0', true );
|
92 |
|
93 |
/* Ace */
|
94 |
wp_enqueue_script( 'ace', plugins_url( 'js/ace/src-min-noconflict/ace.js', $this->settings['file'] ), null, '20.12.14', true );
|
95 |
+
// \wp_enqueue_code_editor(array());
|
96 |
|
97 |
/* Dashicons */
|
98 |
wp_enqueue_style( 'dashicons' );
|
771 |
|
772 |
$settings = CL_Common::get_options( 'general' );
|
773 |
$active_value = isset( $_POST['active_value'] ) && 'true' == $_POST['active_value'] ? 'on' : 'off';
|
774 |
+
$settings['active'] = $active_value;
|
775 |
|
776 |
+
if ( update_option( CUSTOM_LOGIN_OPTION . '_general', $settings ) ) {
|
777 |
+
wp_send_json_success();
|
|
|
|
|
|
|
|
|
|
|
|
|
778 |
}
|
779 |
|
780 |
+
wp_send_json_error();
|
781 |
}
|
782 |
|
783 |
/**
|
851 |
|
852 |
$defaults = array(
|
853 |
'items' => 6,
|
854 |
+
'feed' => 'https://frosty.media/wp-json/wp/v2/extensions?plugin_tag=29&per_page=6',
|
855 |
);
|
856 |
|
857 |
$args = wp_parse_args( $args, $defaults );
|
858 |
|
859 |
+
$rss_items = CL_Common::get_posts_via_rest( $args['feed'], $args['items'] );
|
860 |
|
861 |
$content = '<ul>';
|
862 |
if ( ! $rss_items ) {
|
863 |
$content .= '<li>' . __( 'Error fetching feed', $this->settings['domain'] ) . '</li>';
|
864 |
} else {
|
865 |
foreach ( $rss_items as $item ) {
|
866 |
+
$url = esc_url( $item->link );
|
867 |
$content .= '<li>';
|
868 |
+
$content .= '<a href="' . $url . '?utm_source=wpadmin&utm_medium=sidebarwidget&utm_term=newsite&utm_campaign=' . $this->settings['prefix'] . '_settings-api" target="_blank">' . esc_html( $item->title->rendered ) . '</a>';
|
869 |
$content .= '</li>';
|
870 |
}
|
871 |
}
|
951 |
return $default;
|
952 |
}
|
953 |
|
954 |
+
}
|
includes/default-settings.php
CHANGED
@@ -7,7 +7,7 @@ $strings = array(
|
|
7 |
'checked' => ' ' . __( 'Checked equals "on" (allow).', CUSTOM_LOGIN_DIRNAME ),
|
8 |
'unchecked' => ' ' . __( 'Unchecked equals "off" (do not allow).', CUSTOM_LOGIN_DIRNAME ),
|
9 |
);
|
10 |
-
|
11 |
$sections = array(
|
12 |
array(
|
13 |
'id' => CUSTOM_LOGIN_OPTION . '_design',
|
@@ -34,7 +34,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
34 |
'type' => 'html',
|
35 |
),
|
36 |
/** BREAK **/
|
37 |
-
|
38 |
array(
|
39 |
'name' => 'html_background_color',
|
40 |
'label' => __( 'Background color', CUSTOM_LOGIN_DIRNAME ),
|
@@ -92,7 +92,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
92 |
'flex' => 'flex',
|
93 |
)
|
94 |
),
|
95 |
-
|
96 |
/** BREAK **/
|
97 |
array(
|
98 |
'name' => 'break_2',
|
@@ -101,7 +101,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
101 |
'type' => 'html',
|
102 |
),
|
103 |
/** BREAK **/
|
104 |
-
|
105 |
array(
|
106 |
'name' => 'hide_wp_logo',
|
107 |
'label' => __( 'Hide the WP logo', CUSTOM_LOGIN_DIRNAME ),
|
@@ -176,7 +176,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
176 |
'flex' => 'flex',
|
177 |
)
|
178 |
),
|
179 |
-
|
180 |
/** BREAK **/
|
181 |
array(
|
182 |
'name' => 'break_3',
|
@@ -185,7 +185,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
185 |
'type' => 'html',
|
186 |
),
|
187 |
/** BREAK **/
|
188 |
-
|
189 |
array(
|
190 |
'name' => 'logo_force_form_max_width',
|
191 |
'label' => __( 'Force max-width', CUSTOM_LOGIN_DIRNAME ),
|
@@ -298,7 +298,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
298 |
'type' => 'colorpicker',
|
299 |
'default' => ''
|
300 |
),
|
301 |
-
|
302 |
/** BREAK **/
|
303 |
array(
|
304 |
'name' => 'break_4',
|
@@ -307,7 +307,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
307 |
'type' => 'html',
|
308 |
),
|
309 |
/** BREAK **/
|
310 |
-
|
311 |
array(
|
312 |
'name' => 'label_color',
|
313 |
'label' => __( 'Label color', CUSTOM_LOGIN_DIRNAME ),
|
@@ -315,7 +315,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
315 |
'type' => 'colorpicker',
|
316 |
'default' => ''
|
317 |
),
|
318 |
-
|
319 |
/** BREAK **/
|
320 |
array(
|
321 |
'name' => 'break_5',
|
@@ -324,7 +324,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
324 |
'type' => 'html',
|
325 |
),
|
326 |
/** BREAK **/
|
327 |
-
|
328 |
array(
|
329 |
'name' => 'nav_color',
|
330 |
'label' => __( 'Nav color', CUSTOM_LOGIN_DIRNAME ),
|
@@ -353,7 +353,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
353 |
'type' => 'colorpicker',
|
354 |
'default' => '',
|
355 |
),
|
356 |
-
|
357 |
/** BREAK **/
|
358 |
array(
|
359 |
'name' => 'break_6',
|
@@ -362,7 +362,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
362 |
'type' => 'html',
|
363 |
),
|
364 |
/** BREAK **/
|
365 |
-
|
366 |
array(
|
367 |
'name' => 'custom_css',
|
368 |
'label' => '',
|
@@ -371,7 +371,9 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
371 |
<li><a href="http://wordpress.org/support/topic/quotes-in-custom-css-gets-replaced-with-useless-quote?replies=4">Request others</a></li>
|
372 |
</ul>' ),
|
373 |
'type' => 'textarea',
|
374 |
-
'sanitize' =>
|
|
|
|
|
375 |
),
|
376 |
array(
|
377 |
'name' => 'animate.css',
|
@@ -380,7 +382,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
380 |
'type' => 'checkbox',
|
381 |
'default' => 'off',
|
382 |
),
|
383 |
-
|
384 |
/** BREAK **/
|
385 |
array(
|
386 |
'name' => 'break_7',
|
@@ -389,7 +391,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
389 |
'type' => 'html',
|
390 |
),
|
391 |
/** BREAK **/
|
392 |
-
|
393 |
array(
|
394 |
'name' => 'custom_html',
|
395 |
'label' => '',
|
@@ -397,7 +399,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
397 |
'type' => 'textarea',
|
398 |
'sanitize' => 'wp_kses_post', //Allow HTML
|
399 |
),
|
400 |
-
|
401 |
/** BREAK **/
|
402 |
array(
|
403 |
'name' => 'break_8',
|
@@ -406,7 +408,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_design'] = array(
|
|
406 |
'type' => 'html',
|
407 |
),
|
408 |
/** BREAK **/
|
409 |
-
|
410 |
array(
|
411 |
'name' => 'custom_jquery',
|
412 |
'label' => '',
|
@@ -437,7 +439,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
437 |
'default' => 'manage_options',
|
438 |
'options' => custom_login_get_editable_roles()
|
439 |
),
|
440 |
-
|
441 |
/** BREAK **/
|
442 |
array(
|
443 |
'name' => 'break_1',
|
@@ -446,15 +448,15 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
446 |
'type' => 'html',
|
447 |
),
|
448 |
/** BREAK **/
|
449 |
-
|
450 |
array(
|
451 |
'name' => 'tracking',
|
452 |
'label' => __( 'Usage tracking', CUSTOM_LOGIN_DIRNAME ),
|
453 |
'desc' => __( 'Allow Frosty Media to anonymously track how this plugin is used (and help us make the plugin better). Opt-in and receive a 20% discount code for all Custom Login extensions. Get your coupon code <a href="http://frosty.media/?p=21442">here</a>.', CUSTOM_LOGIN_DIRNAME ),
|
454 |
'type' => 'checkbox'
|
455 |
),
|
456 |
-
|
457 |
-
/** BREAK **/
|
458 |
array(
|
459 |
'name' => 'break_2',
|
460 |
'label' => sprintf( '<h4>%s</h4>', __( 'Notices', CUSTOM_LOGIN_DIRNAME ) ),
|
@@ -462,7 +464,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
462 |
'type' => 'html',
|
463 |
),
|
464 |
/** BREAK **/
|
465 |
-
|
466 |
array(
|
467 |
'name' => 'admin_notices',
|
468 |
'label' => __( 'Admin notices', CUSTOM_LOGIN_DIRNAME ),
|
@@ -475,8 +477,8 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
475 |
'desc' => __( 'Show a dashboard widget, like WordPress news for Frosty Media.', CUSTOM_LOGIN_DIRNAME ) . $strings['unchecked'],
|
476 |
'type' => 'checkbox'
|
477 |
),
|
478 |
-
|
479 |
-
/** BREAK **/
|
480 |
array(
|
481 |
'name' => 'break_3',
|
482 |
'label' => sprintf( '<h4>%s</h4>', __( 'Login functions', CUSTOM_LOGIN_DIRNAME ) ),
|
@@ -484,7 +486,7 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
484 |
'type' => 'html',
|
485 |
),
|
486 |
/** BREAK **/
|
487 |
-
|
488 |
array(
|
489 |
'name' => 'wp_shake_js',
|
490 |
'label' => __( 'Disable Login shake', CUSTOM_LOGIN_DIRNAME ),
|
@@ -503,4 +505,4 @@ $fields [CUSTOM_LOGIN_OPTION . '_general'] = array(
|
|
503 |
'desc' => __( 'Remove the "Lost Password?" text. This does <strong>not</strong> disable the lost password function.', CUSTOM_LOGIN_DIRNAME ),
|
504 |
'type' => 'checkbox'
|
505 |
),
|
506 |
-
);
|
7 |
'checked' => ' ' . __( 'Checked equals "on" (allow).', CUSTOM_LOGIN_DIRNAME ),
|
8 |
'unchecked' => ' ' . __( 'Unchecked equals "off" (do not allow).', CUSTOM_LOGIN_DIRNAME ),
|
9 |
);
|
10 |
+
|
11 |
$sections = array(
|
12 |
array(
|
13 |
'id' => CUSTOM_LOGIN_OPTION . '_design',
|
34 |
'type' => 'html',
|
35 |
),
|
36 |
/** BREAK **/
|
37 |
+
|
38 |
array(
|
39 |
'name' => 'html_background_color',
|
40 |
'label' => __( 'Background color', CUSTOM_LOGIN_DIRNAME ),
|
92 |
'flex' => 'flex',
|
93 |
)
|
94 |
),
|
95 |
+
|
96 |
/** BREAK **/
|
97 |
array(
|
98 |
'name' => 'break_2',
|
101 |
'type' => 'html',
|
102 |
),
|
103 |
/** BREAK **/
|
104 |
+
|
105 |
array(
|
106 |
'name' => 'hide_wp_logo',
|
107 |
'label' => __( 'Hide the WP logo', CUSTOM_LOGIN_DIRNAME ),
|
176 |
'flex' => 'flex',
|
177 |
)
|
178 |
),
|
179 |
+
|
180 |
/** BREAK **/
|
181 |
array(
|
182 |
'name' => 'break_3',
|
185 |
'type' => 'html',
|
186 |
),
|
187 |
/** BREAK **/
|
188 |
+
|
189 |
array(
|
190 |
'name' => 'logo_force_form_max_width',
|
191 |
'label' => __( 'Force max-width', CUSTOM_LOGIN_DIRNAME ),
|
298 |
'type' => 'colorpicker',
|
299 |
'default' => ''
|
300 |
),
|
301 |
+
|
302 |
/** BREAK **/
|
303 |
array(
|
304 |
'name' => 'break_4',
|
307 |
'type' => 'html',
|
308 |
),
|
309 |
/** BREAK **/
|
310 |
+
|
311 |
array(
|
312 |
'name' => 'label_color',
|
313 |
'label' => __( 'Label color', CUSTOM_LOGIN_DIRNAME ),
|
315 |
'type' => 'colorpicker',
|
316 |
'default' => ''
|
317 |
),
|
318 |
+
|
319 |
/** BREAK **/
|
320 |
array(
|
321 |
'name' => 'break_5',
|
324 |
'type' => 'html',
|
325 |
),
|
326 |
/** BREAK **/
|
327 |
+
|
328 |
array(
|
329 |
'name' => 'nav_color',
|
330 |
'label' => __( 'Nav color', CUSTOM_LOGIN_DIRNAME ),
|
353 |
'type' => 'colorpicker',
|
354 |
'default' => '',
|
355 |
),
|
356 |
+
|
357 |
/** BREAK **/
|
358 |
array(
|
359 |
'name' => 'break_6',
|
362 |
'type' => 'html',
|
363 |
),
|
364 |
/** BREAK **/
|
365 |
+
|
366 |
array(
|
367 |
'name' => 'custom_css',
|
368 |
'label' => '',
|
371 |
<li><a href="http://wordpress.org/support/topic/quotes-in-custom-css-gets-replaced-with-useless-quote?replies=4">Request others</a></li>
|
372 |
</ul>' ),
|
373 |
'type' => 'textarea',
|
374 |
+
'sanitize' => static function($css) {
|
375 |
+
return wp_specialchars_decode(wp_filter_nohtml_kses($css));
|
376 |
+
},
|
377 |
),
|
378 |
array(
|
379 |
'name' => 'animate.css',
|
382 |
'type' => 'checkbox',
|
383 |
'default' => 'off',
|
384 |
),
|
385 |
+
|
386 |
/** BREAK **/
|
387 |
array(
|
388 |
'name' => 'break_7',
|
391 |
'type' => 'html',
|
392 |
),
|
393 |
/** BREAK **/
|
394 |
+
|
395 |
array(
|
396 |
'name' => 'custom_html',
|
397 |
'label' => '',
|
399 |
'type' => 'textarea',
|
400 |
'sanitize' => 'wp_kses_post', //Allow HTML
|
401 |
),
|
402 |
+
|
403 |
/** BREAK **/
|
404 |
array(
|
405 |
'name' => 'break_8',
|
408 |
'type' => 'html',
|
409 |
),
|
410 |
/** BREAK **/
|
411 |
+
|
412 |
array(
|
413 |
'name' => 'custom_jquery',
|
414 |
'label' => '',
|
439 |
'default' => 'manage_options',
|
440 |
'options' => custom_login_get_editable_roles()
|
441 |
),
|
442 |
+
|
443 |
/** BREAK **/
|
444 |
array(
|
445 |
'name' => 'break_1',
|
448 |
'type' => 'html',
|
449 |
),
|
450 |
/** BREAK **/
|
451 |
+
|
452 |
array(
|
453 |
'name' => 'tracking',
|
454 |
'label' => __( 'Usage tracking', CUSTOM_LOGIN_DIRNAME ),
|
455 |
'desc' => __( 'Allow Frosty Media to anonymously track how this plugin is used (and help us make the plugin better). Opt-in and receive a 20% discount code for all Custom Login extensions. Get your coupon code <a href="http://frosty.media/?p=21442">here</a>.', CUSTOM_LOGIN_DIRNAME ),
|
456 |
'type' => 'checkbox'
|
457 |
),
|
458 |
+
|
459 |
+
/** BREAK **/
|
460 |
array(
|
461 |
'name' => 'break_2',
|
462 |
'label' => sprintf( '<h4>%s</h4>', __( 'Notices', CUSTOM_LOGIN_DIRNAME ) ),
|
464 |
'type' => 'html',
|
465 |
),
|
466 |
/** BREAK **/
|
467 |
+
|
468 |
array(
|
469 |
'name' => 'admin_notices',
|
470 |
'label' => __( 'Admin notices', CUSTOM_LOGIN_DIRNAME ),
|
477 |
'desc' => __( 'Show a dashboard widget, like WordPress news for Frosty Media.', CUSTOM_LOGIN_DIRNAME ) . $strings['unchecked'],
|
478 |
'type' => 'checkbox'
|
479 |
),
|
480 |
+
|
481 |
+
/** BREAK **/
|
482 |
array(
|
483 |
'name' => 'break_3',
|
484 |
'label' => sprintf( '<h4>%s</h4>', __( 'Login functions', CUSTOM_LOGIN_DIRNAME ) ),
|
486 |
'type' => 'html',
|
487 |
),
|
488 |
/** BREAK **/
|
489 |
+
|
490 |
array(
|
491 |
'name' => 'wp_shake_js',
|
492 |
'label' => __( 'Disable Login shake', CUSTOM_LOGIN_DIRNAME ),
|
505 |
'desc' => __( 'Remove the "Lost Password?" text. This does <strong>not</strong> disable the lost password function.', CUSTOM_LOGIN_DIRNAME ),
|
506 |
'type' => 'checkbox'
|
507 |
),
|
508 |
+
);
|
js/ace/src-min-noconflict/ace.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-beautify.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-chromevox.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-elastic_tabstops_lite.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-emmet.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-error_marker.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-keybinding_menu.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-language_tools.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-linking.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-modelist.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-old_ie.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-searchbox.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-settings_menu.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-spellcheck.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-split.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-static_highlight.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-statusbar.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-textarea.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-themelist.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/ext-whitespace.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/keybinding-emacs.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/keybinding-vim.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/mode-css.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/mode-html.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/mode-javascript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/abap.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/actionscript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ada.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/apache_conf.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/applescript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/asciidoc.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/assembly_x86.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/autohotkey.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/batchfile.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/c9search.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/c_cpp.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/cirru.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/clojure.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/cobol.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/coffee.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/coldfusion.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/csharp.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/css.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/curly.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/d.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/dart.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/diff.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/django.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/dockerfile.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/dot.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/eiffel.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ejs.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/elixir.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/elm.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/erlang.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/forth.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ftl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/gcode.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/gherkin.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/gitignore.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/glsl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/golang.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/groovy.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/haml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/handlebars.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/haskell.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/haxe.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/html.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/html_ruby.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ini.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/io.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/jack.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/jade.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/java.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/javascript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/json.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/jsoniq.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/jsp.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/jsx.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/julia.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/latex.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/less.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/liquid.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/lisp.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/livescript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/logiql.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/lsl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/lua.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/luapage.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/lucene.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/makefile.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/markdown.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/matlab.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/mel.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/mushcode.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/mysql.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/nix.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/objectivec.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ocaml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/pascal.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/perl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/pgsql.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/php.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/plain_text.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/powershell.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/praat.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/prolog.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/properties.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/protobuf.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/python.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/r.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/rdoc.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/rhtml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/ruby.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/rust.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/sass.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/scad.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/scala.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/scheme.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/scss.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/sh.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/sjs.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/smarty.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/snippets.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/soy_template.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/space.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/sql.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/stylus.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/svg.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/tcl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/tex.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/text.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/textile.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/toml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/twig.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/typescript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/vala.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/vbscript.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/velocity.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/verilog.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/vhdl.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/xml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/xquery.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/snippets/yaml.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/worker-coffee.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/worker-css.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/worker-html.js
CHANGED
File without changes
|
js/ace/src-min-noconflict/worker-javascript.js
CHANGED
File without changes
|
js/admin.js
CHANGED
@@ -35,7 +35,8 @@
|
|
35 |
$('span.tgl_input').replaceWith($('input[id="custom_login_general[active]"]').clone());
|
36 |
|
37 |
$(document).on('change', 'input[id="custom_login_general[active]"]', function () {
|
38 |
-
|
|
|
39 |
$.ajax({
|
40 |
type: "POST",
|
41 |
data: {
|
@@ -47,9 +48,9 @@
|
|
47 |
url: ajaxurl
|
48 |
})
|
49 |
.done(function (response) {
|
50 |
-
if (response.success) {
|
51 |
-
|
52 |
-
|
53 |
}
|
54 |
})
|
55 |
.fail(function () {
|
@@ -312,6 +313,43 @@
|
|
312 |
});
|
313 |
}
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
if (typeof ace !== 'undefined') {
|
316 |
|
317 |
/**
|
@@ -327,7 +365,6 @@
|
|
327 |
autoScrollEditorIntoView: true
|
328 |
});
|
329 |
custom_css.getSession().setMode("ace/mode/css");
|
330 |
-
custom_css.setTheme("ace/theme/github");
|
331 |
custom_css_textarea.hide();
|
332 |
custom_css.getSession().setValue(custom_css_textarea.val());
|
333 |
custom_css.getSession().on('change', function () {
|
@@ -347,7 +384,6 @@
|
|
347 |
autoScrollEditorIntoView: true
|
348 |
});
|
349 |
custom_html.getSession().setMode("ace/mode/html");
|
350 |
-
custom_html.setTheme("ace/theme/github");
|
351 |
custom_html_textarea.hide();
|
352 |
custom_html.getSession().setValue(custom_html_textarea.val());
|
353 |
custom_html.getSession().on('change', function () {
|
@@ -367,7 +403,6 @@
|
|
367 |
autoScrollEditorIntoView: true
|
368 |
});
|
369 |
custom_js.getSession().setMode("ace/mode/javascript");
|
370 |
-
custom_js.setTheme("ace/theme/github");
|
371 |
custom_js_textarea.hide();
|
372 |
custom_js.getSession().setValue(custom_js_textarea.val());
|
373 |
custom_js.getSession().on('change', function () {
|
35 |
$('span.tgl_input').replaceWith($('input[id="custom_login_general[active]"]').clone());
|
36 |
|
37 |
$(document).on('change', 'input[id="custom_login_general[active]"]', function () {
|
38 |
+
var checked = this.checked;
|
39 |
+
$('input[id="custom_login_general[active]"]').prop('checked', checked);
|
40 |
$.ajax({
|
41 |
type: "POST",
|
42 |
data: {
|
48 |
url: ajaxurl
|
49 |
})
|
50 |
.done(function (response) {
|
51 |
+
if (!response.success) {
|
52 |
+
$('input[id="custom_login_general[active]"]').prop('checked', !checked);
|
53 |
+
console.log('Error Updating Option');
|
54 |
}
|
55 |
})
|
56 |
.fail(function () {
|
313 |
});
|
314 |
}
|
315 |
|
316 |
+
if (typeof wp.codeEditor !== 'undefined') {
|
317 |
+
var editorSettings;
|
318 |
+
editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
319 |
+
editorSettings.codemirror = _.extend(
|
320 |
+
{},
|
321 |
+
editorSettings.codemirror,
|
322 |
+
{
|
323 |
+
indentUnit: 2,
|
324 |
+
tabSize: 2,
|
325 |
+
mode: 'css',
|
326 |
+
}
|
327 |
+
);
|
328 |
+
wp.codeEditor.initialize($('textarea[id$="custom_css]"]'), editorSettings);
|
329 |
+
editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
330 |
+
editorSettings.codemirror = _.extend(
|
331 |
+
{},
|
332 |
+
editorSettings.codemirror,
|
333 |
+
{
|
334 |
+
indentUnit: 2,
|
335 |
+
tabSize: 2,
|
336 |
+
mode: 'html',
|
337 |
+
}
|
338 |
+
);
|
339 |
+
wp.codeEditor.initialize($('textarea[id$="custom_html]"]'), editorSettings);
|
340 |
+
editorSettings = wp.codeEditor.defaultSettings ? _.clone( wp.codeEditor.defaultSettings ) : {};
|
341 |
+
editorSettings.codemirror = _.extend(
|
342 |
+
{},
|
343 |
+
editorSettings.codemirror,
|
344 |
+
{
|
345 |
+
indentUnit: 2,
|
346 |
+
tabSize: 2,
|
347 |
+
mode: 'javascript',
|
348 |
+
}
|
349 |
+
);
|
350 |
+
wp.codeEditor.initialize($('textarea[id$="custom_jquery]"]'), editorSettings);
|
351 |
+
}
|
352 |
+
|
353 |
if (typeof ace !== 'undefined') {
|
354 |
|
355 |
/**
|
365 |
autoScrollEditorIntoView: true
|
366 |
});
|
367 |
custom_css.getSession().setMode("ace/mode/css");
|
|
|
368 |
custom_css_textarea.hide();
|
369 |
custom_css.getSession().setValue(custom_css_textarea.val());
|
370 |
custom_css.getSession().on('change', function () {
|
384 |
autoScrollEditorIntoView: true
|
385 |
});
|
386 |
custom_html.getSession().setMode("ace/mode/html");
|
|
|
387 |
custom_html_textarea.hide();
|
388 |
custom_html.getSession().setValue(custom_html_textarea.val());
|
389 |
custom_html.getSession().on('change', function () {
|
403 |
autoScrollEditorIntoView: true
|
404 |
});
|
405 |
custom_js.getSession().setMode("ace/mode/javascript");
|
|
|
406 |
custom_js_textarea.hide();
|
407 |
custom_js.getSession().setValue(custom_js_textarea.val());
|
408 |
custom_js.getSession().on('change', function () {
|
js/chosen.jquery.js
CHANGED
File without changes
|
js/chosen.jquery.min.js
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -2,8 +2,9 @@
|
|
2 |
Contributors: austyfrosty, frostymedia
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290
|
4 |
Tags: admin, branding, customization, custom login, login, logo, error, login error, custom login pro
|
5 |
-
Requires at least: 4.
|
6 |
-
Tested up to: 5.2
|
|
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -100,7 +101,7 @@ I created this plugin to allow for custom login of any WordPress login screen. S
|
|
100 |
= Where can I upload and share my cool login screen? =
|
101 |
Check out the [Flickr group](http://flickr.com/groups/custom-login/)! Upload and add it to our pool!
|
102 |
|
103 |
-
= I think
|
104 |
Just deactivate it. Sad panda is sad.
|
105 |
|
106 |
== Screenshots ==
|
@@ -117,6 +118,36 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
= Version 3.2.9 (2019/05/07) =
|
121 |
|
122 |
* Tested up to WordPress 5.2.
|
@@ -179,7 +210,7 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
179 |
* Update: Allow Custom (CSS/HTML/JS) textareas to expand up to 30 lines.
|
180 |
* Update: admin.css
|
181 |
* Update: admin.js
|
182 |
-
* Add: animate.css
|
183 |
* Add: Global 'active' toggle switch.
|
184 |
|
185 |
= Version 3.1 (01/20/15) =
|
@@ -188,7 +219,7 @@ Custom Login showcase on the [Flickr group](http://flickr.com/groups/custom-logi
|
|
188 |
* Update: All prefixed 'cl_' to 'custom_login_'.
|
189 |
* Update: Spelling error 'sanitize'.
|
190 |
* Update: login.css uses core stylesheet to avoid possible conflicts with checkboxes and browser support.
|
191 |
-
* Tweak: Speed
|
192 |
* Add: CL_Common::is_settings_page().
|
193 |
* Add: Dashboard widget (off be default).
|
194 |
|
@@ -262,6 +293,9 @@ _REQUIRES WordPress 3.9 or later_
|
|
262 |
|
263 |
== Upgrade Notice ==
|
264 |
|
|
|
|
|
|
|
265 |
= 3.2.7 =
|
266 |
Fixes duplicate CSS output in login header. Testing up to WordPress 4.9.
|
267 |
|
2 |
Contributors: austyfrosty, frostymedia
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7431290
|
4 |
Tags: admin, branding, customization, custom login, login, logo, error, login error, custom login pro
|
5 |
+
Requires at least: 4.9
|
6 |
+
Tested up to: 5.9.2
|
7 |
+
Requires PHP: 5.6
|
8 |
Stable tag: trunk
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
101 |
= Where can I upload and share my cool login screen? =
|
102 |
Check out the [Flickr group](http://flickr.com/groups/custom-login/)! Upload and add it to our pool!
|
103 |
|
104 |
+
= I think I want to uninstall =
|
105 |
Just deactivate it. Sad panda is sad.
|
106 |
|
107 |
== Screenshots ==
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= Version 3.2.15 (2022/03/11) =
|
122 |
+
|
123 |
+
* Fix settings API Settings: Uncaught Error: Call to undefined method stdClass::get_permalink() (#49)
|
124 |
+
|
125 |
+
= Version 3.2.14 (2022/03/10) =
|
126 |
+
|
127 |
+
* Fix settings widget feed for available extensions. Changes from RSS to REST.
|
128 |
+
* Add auto deploy to WordPress.org GitHub action.
|
129 |
+
|
130 |
+
= Version 3.2.13 (2022/01/06) =
|
131 |
+
|
132 |
+
* Change custom CSS settings sanitizer in admin to allow for proper HTML CSS attributes like `>`.
|
133 |
+
|
134 |
+
= Version 3.2.12 (2021/11/07) =
|
135 |
+
|
136 |
+
* Change dashboard from RSS feed to REST API endpoint.
|
137 |
+
* Fix condition for dashboard widget to use `is_blog_admin`.
|
138 |
+
|
139 |
+
= Version 3.2.11 (2020/12/07) =
|
140 |
+
|
141 |
+
* PHP 8 compatibility fixes.
|
142 |
+
* Tested on WordPress 5.6
|
143 |
+
|
144 |
+
= Version 3.2.10 (2020/08/14) =
|
145 |
+
|
146 |
+
* Tested up to WordPress 5.5
|
147 |
+
* Fix toggle on/off on settings page, incorrect check in AJAX for new installs.
|
148 |
+
* Enable on activation hook fixed.
|
149 |
+
* Remove ace.js theme call to non existing theme.
|
150 |
+
|
151 |
= Version 3.2.9 (2019/05/07) =
|
152 |
|
153 |
* Tested up to WordPress 5.2.
|
210 |
* Update: Allow Custom (CSS/HTML/JS) textareas to expand up to 30 lines.
|
211 |
* Update: admin.css
|
212 |
* Update: admin.js
|
213 |
+
* Add: animate.css Licensed under MIT.
|
214 |
* Add: Global 'active' toggle switch.
|
215 |
|
216 |
= Version 3.1 (01/20/15) =
|
219 |
* Update: All prefixed 'cl_' to 'custom_login_'.
|
220 |
* Update: Spelling error 'sanitize'.
|
221 |
* Update: login.css uses core stylesheet to avoid possible conflicts with checkboxes and browser support.
|
222 |
+
* Tweak: Speed improvements.
|
223 |
* Add: CL_Common::is_settings_page().
|
224 |
* Add: Dashboard widget (off be default).
|
225 |
|
293 |
|
294 |
== Upgrade Notice ==
|
295 |
|
296 |
+
= 3.2.14 =
|
297 |
+
Getting ready for version 4.0.0 which will bump minimum required WordPress version to 5.8 and PHP version to 7.4.
|
298 |
+
|
299 |
= 3.2.7 =
|
300 |
Fixes duplicate CSS output in login header. Testing up to WordPress 4.9.
|
301 |
|
templates/wp-login-style.php
CHANGED
@@ -15,26 +15,26 @@ extract( $cl_css_atts, EXTR_SKIP );
|
|
15 |
|
16 |
$css = '';
|
17 |
$close_rule = "}\n";
|
18 |
-
|
19 |
if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) {
|
20 |
-
|
21 |
$css .= "/**\n *\n" . print_r( $cl_css_atts, true ) . " */\n\n";
|
22 |
}
|
23 |
-
|
24 |
$css .= "
|
25 |
/**
|
26 |
* Custom Login by Austin Passy
|
27 |
*
|
28 |
* Plugin URI : https://frosty.media/plugins/custom-login/
|
29 |
* Version : $version
|
30 |
-
* Author URI :
|
31 |
* Extensions : https://frosty.media/plugin/tag/custom-login-extension/
|
32 |
*/\n\n";
|
33 |
-
|
34 |
/* Custom user input */
|
35 |
if ( !empty( $custom_css ) ) {
|
36 |
$custom_css = wp_specialchars_decode( stripslashes( $custom_css ) );
|
37 |
-
|
38 |
$css .= "/* START Custom CSS */\n";
|
39 |
$css .= str_replace(
|
40 |
array( '{BSLASH}' ),
|
@@ -43,293 +43,293 @@ extract( $cl_css_atts, EXTR_SKIP );
|
|
43 |
);
|
44 |
$css .= "\n/* END Custom CSS */\n";
|
45 |
$css .= "\n\n";
|
46 |
-
|
47 |
}
|
48 |
-
|
49 |
/**
|
50 |
* Open html
|
51 |
*
|
52 |
* @rule html
|
53 |
-
*/
|
54 |
$css .= CL_Scripts_Styles::cssrule( 'html' );
|
55 |
-
|
56 |
if ( !empty( $html_background_color ) && 'on' === $html_background_color_checkbox ) {
|
57 |
-
|
58 |
$color = CL_Scripts_Styles::hex2rgb( $html_background_color );
|
59 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: rgba({$color['red']},{$color['green']},{$color['blue']},{$html_background_color_opacity})" );
|
60 |
}
|
61 |
elseif ( !empty( $html_background_color ) ) {
|
62 |
-
|
63 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: {$html_background_color}" );
|
64 |
}
|
65 |
-
|
66 |
if ( !empty( $html_background_url ) ) {
|
67 |
-
|
68 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$html_background_url}')" );
|
69 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$html_background_position}" );
|
70 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$html_background_repeat}" );
|
71 |
-
|
72 |
if ( !empty( $html_background_size ) && 'none' !== $html_background_size ) {
|
73 |
-
|
74 |
-
$css .= CL_Scripts_Styles::prefixit( 'background-size', $html_background_size );
|
75 |
}
|
76 |
}
|
77 |
-
|
78 |
/* CLOSE html */
|
79 |
$css .= $close_rule;
|
80 |
-
|
81 |
/**
|
82 |
* Open body.login
|
83 |
*
|
84 |
* @rule body.login
|
85 |
*/
|
86 |
if ( !empty( $html_background_color ) || !empty( $html_background_url ) ) {
|
87 |
-
|
88 |
$css .= CL_Scripts_Styles::cssrule( 'body.login' );
|
89 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background: transparent" );
|
90 |
-
|
91 |
/* CLOSE body */
|
92 |
-
$css .= $close_rule;
|
93 |
-
|
94 |
}
|
95 |
-
|
96 |
/**
|
97 |
* Open login
|
98 |
*
|
99 |
* @rule #login
|
100 |
*/
|
101 |
if ( !empty( $login_form_width ) ) {
|
102 |
-
|
103 |
-
$css .= CL_Scripts_Styles::cssrule( '#login' );
|
104 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$login_form_width}px" );
|
105 |
-
|
106 |
/* CLOSE login */
|
107 |
$css .= $close_rule;
|
108 |
}
|
109 |
-
|
110 |
-
|
111 |
/**
|
112 |
* Open login form
|
113 |
*
|
114 |
* @rule #login form
|
115 |
*/
|
116 |
$css .= CL_Scripts_Styles::cssrule( '#login form' );
|
117 |
-
|
118 |
if ( !empty( $login_form_background_color ) && 'on' === $login_form_background_color_checkbox ) {
|
119 |
-
|
120 |
$color = CL_Scripts_Styles::hex2rgb( $login_form_background_color );
|
121 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: rgba({$color['red']},{$color['green']},{$color['blue']},{$login_form_background_color_opacity})" );
|
122 |
}
|
123 |
elseif( !empty( $login_form_background_color ) ) {
|
124 |
-
|
125 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: {$login_form_background_color}" );
|
126 |
}
|
127 |
-
|
128 |
if ( !empty( $login_form_background_url ) ) {
|
129 |
-
|
130 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$login_form_background_url}')" );
|
131 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$login_form_background_position}" );
|
132 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$login_form_background_repeat}" );
|
133 |
-
|
134 |
if ( !empty( $login_form_background_size ) && 'none' != $login_form_background_size ) {
|
135 |
-
|
136 |
$login_form_background_size = ( 'flex' != $login_form_background_size ) ? $login_form_background_size : '100% auto';
|
137 |
-
$css .= CL_Scripts_Styles::prefixit( 'background-size', $login_form_background_size );
|
138 |
}
|
139 |
-
|
140 |
}
|
141 |
-
|
142 |
if ( !empty( $login_form_border_size ) && !empty( $login_form_border_color ) ) {
|
143 |
-
|
144 |
$login_form_border_size = rtrim( $login_form_border_size, 'px' );
|
145 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "border: {$login_form_border_size}px solid {$login_form_border_color}" );
|
146 |
}
|
147 |
-
|
148 |
if ( !empty( $login_form_border_radius ) ) {
|
149 |
-
|
150 |
$login_form_border_radius = rtrim( $login_form_border_radius, 'px' ) . 'px';
|
151 |
-
$css .= CL_Scripts_Styles::prefixit( 'border-radius', $login_form_border_radius );
|
152 |
}
|
153 |
-
|
154 |
if ( !empty( $login_form_box_shadow ) ) {
|
155 |
-
|
156 |
if ( empty( $login_form_box_shadow_color ) ) {
|
157 |
$login_form_box_shadow_color = '#121212';
|
158 |
}
|
159 |
-
|
160 |
if ( 'on' === $login_form_box_shadow_color_checkbox ) {
|
161 |
-
|
162 |
$color = CL_Scripts_Styles::hex2rgb( $login_form_box_shadow_color );
|
163 |
$box_shadow = "{$login_form_box_shadow} rgba({$color['red']},{$color['green']},{$color['blue']},{$login_form_box_shadow_color_opacity})";
|
164 |
}
|
165 |
else {
|
166 |
-
$box_shadow = $login_form_box_shadow . ' ' . $login_form_box_shadow_color;
|
167 |
}
|
168 |
-
|
169 |
-
$css .= CL_Scripts_Styles::prefixit( 'box-shadow', trim( $box_shadow ) );
|
170 |
}
|
171 |
-
|
172 |
/* CLOSE login form */
|
173 |
$css .= $close_rule;
|
174 |
-
|
175 |
/**
|
176 |
* Open login h1
|
177 |
*
|
178 |
* @rule #login h1
|
179 |
*/
|
180 |
if ( ( !empty( $hide_wp_logo ) && 'on' === $hide_wp_logo ) && empty( $logo_background_url ) ) {
|
181 |
-
|
182 |
-
$css .= CL_Scripts_Styles::cssrule( '#login h1' );
|
183 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "display: none" );
|
184 |
-
|
185 |
/* CLOSE login h1 */
|
186 |
$css .= $close_rule;
|
187 |
}
|
188 |
-
|
189 |
/**
|
190 |
* Open login h1
|
191 |
*
|
192 |
* @rule .login h1
|
193 |
*/
|
194 |
if ( ( !empty( $logo_force_form_max_width ) && 'on' === $logo_force_form_max_width ) && !empty( $login_form_width ) ) {
|
195 |
-
|
196 |
-
$css .= CL_Scripts_Styles::cssrule( '.login h1' );
|
197 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$login_form_width}px" );
|
198 |
-
|
199 |
/* CLOSE login */
|
200 |
$css .= $close_rule;
|
201 |
}
|
202 |
-
|
203 |
/**
|
204 |
* Open login h1 a
|
205 |
*
|
206 |
* @rule .login h1 a
|
207 |
*/
|
208 |
if ( !empty( $logo_background_url ) ) {
|
209 |
-
|
210 |
$css .= CL_Scripts_Styles::cssrule( '.login h1 a' );
|
211 |
-
|
212 |
-
|
213 |
if ( !empty( $logo_background_size_width ) )
|
214 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$logo_background_size_width}px !important" );
|
215 |
-
|
216 |
if ( !empty( $logo_background_size_height ) )
|
217 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "height: {$logo_background_size_height}px !important" );
|
218 |
-
|
219 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$logo_background_url}')" );
|
220 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$logo_background_position}" );
|
221 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$logo_background_repeat}" );
|
222 |
-
|
223 |
if ( !empty( $logo_background_size ) && 'none' !== $logo_background_size ) {
|
224 |
-
|
225 |
-
$css .= CL_Scripts_Styles::prefixit( 'background-size', $logo_background_size );
|
226 |
}
|
227 |
else {
|
228 |
-
|
229 |
$css .= CL_Scripts_Styles::prefixit( 'background-size', 'inherit' );
|
230 |
}
|
231 |
-
|
232 |
/* CLOSE login h1 a */
|
233 |
$css .= $close_rule;
|
234 |
-
|
235 |
}
|
236 |
-
|
237 |
/**
|
238 |
* Open form label
|
239 |
*
|
240 |
* @rule .login label | #loginform label, #lostpasswordform label
|
241 |
*/
|
242 |
-
if ( !empty( $label_color ) ) {
|
243 |
-
|
244 |
$css .= CL_Scripts_Styles::cssrule( '.login label' );
|
245 |
-
|
246 |
if ( 'on' === $label_color_checkbox ) {
|
247 |
-
|
248 |
$color = CL_Scripts_Styles::hex2rgb( $label_color );
|
249 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$label_color_opacity})" );
|
250 |
}
|
251 |
else {
|
252 |
-
|
253 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$label_color}" );
|
254 |
-
|
255 |
}
|
256 |
-
|
257 |
/* CLOSE login h1 a */
|
258 |
$css .= $close_rule;
|
259 |
-
|
260 |
}
|
261 |
-
|
262 |
/**
|
263 |
* Open below form links
|
264 |
*
|
265 |
* @rule .login #nav a, .login #backtoblog a
|
266 |
*/
|
267 |
-
if ( !empty( $nav_color ) ) {
|
268 |
-
|
269 |
$css .= CL_Scripts_Styles::cssrule( '.login #nav a, .login #backtoblog a' );
|
270 |
-
|
271 |
if ( 'on' === $nav_color_checkbox ) {
|
272 |
-
|
273 |
$color = CL_Scripts_Styles::hex2rgb( $nav_color );
|
274 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_color_opacity}) !important" );
|
275 |
}
|
276 |
else {
|
277 |
-
|
278 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$nav_color} !important" );
|
279 |
}
|
280 |
-
|
281 |
if ( !empty( $nav_text_shadow_color ) && 'on' === $nav_text_shadow_color_checkbox ) {
|
282 |
-
|
283 |
$color = CL_Scripts_Styles::hex2rgb( $nav_text_shadow_color );
|
284 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_text_shadow_color_opacity})" );
|
285 |
}
|
286 |
elseif ( !empty( $nav_text_shadow_color ) ) {
|
287 |
-
|
288 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 {$nav_text_shadow_color}" );
|
289 |
}
|
290 |
-
|
291 |
/* CLOSE login h1 a */
|
292 |
$css .= $close_rule;
|
293 |
-
|
294 |
}
|
295 |
-
|
296 |
/**
|
297 |
* Open below form links :hover
|
298 |
*
|
299 |
* @rule .login #nav a:hover, .login #backtoblog a:hover
|
300 |
*/
|
301 |
-
if ( !empty( $nav_hover_color ) ) {
|
302 |
-
|
303 |
$css .= CL_Scripts_Styles::cssrule( '.login #nav a:hover, .login #backtoblog a:hover' );
|
304 |
-
|
305 |
if ( 'on' === $nav_hover_color_checkbox ) {
|
306 |
-
|
307 |
$color = CL_Scripts_Styles::hex2rgb( $nav_hover_color );
|
308 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_hover_color_opacity}) !important" );
|
309 |
}
|
310 |
else {
|
311 |
-
|
312 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$nav_hover_color} !important" );
|
313 |
}
|
314 |
-
|
315 |
if ( !empty( $nav_text_shadow_hover_color ) && 'on' === $nav_text_shadow_hover_color_checkbox ) {
|
316 |
-
|
317 |
$color = CL_Scripts_Styles::hex2rgb( $nav_text_shadow_hover_color );
|
318 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_text_shadow_hover_color_opacity})" );
|
319 |
}
|
320 |
elseif ( !empty( $nav_text_shadow_hover_color ) ) {
|
321 |
-
|
322 |
-
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 {$nav_text_shadow_hover_color}" );
|
323 |
}
|
324 |
-
|
325 |
/* CLOSE login h1 a */
|
326 |
$css .= $close_rule;
|
327 |
-
|
328 |
}
|
329 |
-
|
330 |
// /* WP Magic */
|
331 |
// set_transient( $trans_key, $css, YEAR_IN_SECONDS/2 ); // Cache for six months
|
332 |
//endif;
|
333 |
|
334 |
/* Out of the frying pan, and into the fire! */
|
335 |
-
echo $css;
|
15 |
|
16 |
$css = '';
|
17 |
$close_rule = "}\n";
|
18 |
+
|
19 |
if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) {
|
20 |
+
|
21 |
$css .= "/**\n *\n" . print_r( $cl_css_atts, true ) . " */\n\n";
|
22 |
}
|
23 |
+
|
24 |
$css .= "
|
25 |
/**
|
26 |
* Custom Login by Austin Passy
|
27 |
*
|
28 |
* Plugin URI : https://frosty.media/plugins/custom-login/
|
29 |
* Version : $version
|
30 |
+
* Author URI : https://austin.passy.co/
|
31 |
* Extensions : https://frosty.media/plugin/tag/custom-login-extension/
|
32 |
*/\n\n";
|
33 |
+
|
34 |
/* Custom user input */
|
35 |
if ( !empty( $custom_css ) ) {
|
36 |
$custom_css = wp_specialchars_decode( stripslashes( $custom_css ) );
|
37 |
+
|
38 |
$css .= "/* START Custom CSS */\n";
|
39 |
$css .= str_replace(
|
40 |
array( '{BSLASH}' ),
|
43 |
);
|
44 |
$css .= "\n/* END Custom CSS */\n";
|
45 |
$css .= "\n\n";
|
46 |
+
|
47 |
}
|
48 |
+
|
49 |
/**
|
50 |
* Open html
|
51 |
*
|
52 |
* @rule html
|
53 |
+
*/
|
54 |
$css .= CL_Scripts_Styles::cssrule( 'html' );
|
55 |
+
|
56 |
if ( !empty( $html_background_color ) && 'on' === $html_background_color_checkbox ) {
|
57 |
+
|
58 |
$color = CL_Scripts_Styles::hex2rgb( $html_background_color );
|
59 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: rgba({$color['red']},{$color['green']},{$color['blue']},{$html_background_color_opacity})" );
|
60 |
}
|
61 |
elseif ( !empty( $html_background_color ) ) {
|
62 |
+
|
63 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: {$html_background_color}" );
|
64 |
}
|
65 |
+
|
66 |
if ( !empty( $html_background_url ) ) {
|
67 |
+
|
68 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$html_background_url}')" );
|
69 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$html_background_position}" );
|
70 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$html_background_repeat}" );
|
71 |
+
|
72 |
if ( !empty( $html_background_size ) && 'none' !== $html_background_size ) {
|
73 |
+
|
74 |
+
$css .= CL_Scripts_Styles::prefixit( 'background-size', $html_background_size );
|
75 |
}
|
76 |
}
|
77 |
+
|
78 |
/* CLOSE html */
|
79 |
$css .= $close_rule;
|
80 |
+
|
81 |
/**
|
82 |
* Open body.login
|
83 |
*
|
84 |
* @rule body.login
|
85 |
*/
|
86 |
if ( !empty( $html_background_color ) || !empty( $html_background_url ) ) {
|
87 |
+
|
88 |
$css .= CL_Scripts_Styles::cssrule( 'body.login' );
|
89 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background: transparent" );
|
90 |
+
|
91 |
/* CLOSE body */
|
92 |
+
$css .= $close_rule;
|
93 |
+
|
94 |
}
|
95 |
+
|
96 |
/**
|
97 |
* Open login
|
98 |
*
|
99 |
* @rule #login
|
100 |
*/
|
101 |
if ( !empty( $login_form_width ) ) {
|
102 |
+
|
103 |
+
$css .= CL_Scripts_Styles::cssrule( '#login' );
|
104 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$login_form_width}px" );
|
105 |
+
|
106 |
/* CLOSE login */
|
107 |
$css .= $close_rule;
|
108 |
}
|
109 |
+
|
110 |
+
|
111 |
/**
|
112 |
* Open login form
|
113 |
*
|
114 |
* @rule #login form
|
115 |
*/
|
116 |
$css .= CL_Scripts_Styles::cssrule( '#login form' );
|
117 |
+
|
118 |
if ( !empty( $login_form_background_color ) && 'on' === $login_form_background_color_checkbox ) {
|
119 |
+
|
120 |
$color = CL_Scripts_Styles::hex2rgb( $login_form_background_color );
|
121 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: rgba({$color['red']},{$color['green']},{$color['blue']},{$login_form_background_color_opacity})" );
|
122 |
}
|
123 |
elseif( !empty( $login_form_background_color ) ) {
|
124 |
+
|
125 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-color: {$login_form_background_color}" );
|
126 |
}
|
127 |
+
|
128 |
if ( !empty( $login_form_background_url ) ) {
|
129 |
+
|
130 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$login_form_background_url}')" );
|
131 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$login_form_background_position}" );
|
132 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$login_form_background_repeat}" );
|
133 |
+
|
134 |
if ( !empty( $login_form_background_size ) && 'none' != $login_form_background_size ) {
|
135 |
+
|
136 |
$login_form_background_size = ( 'flex' != $login_form_background_size ) ? $login_form_background_size : '100% auto';
|
137 |
+
$css .= CL_Scripts_Styles::prefixit( 'background-size', $login_form_background_size );
|
138 |
}
|
139 |
+
|
140 |
}
|
141 |
+
|
142 |
if ( !empty( $login_form_border_size ) && !empty( $login_form_border_color ) ) {
|
143 |
+
|
144 |
$login_form_border_size = rtrim( $login_form_border_size, 'px' );
|
145 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "border: {$login_form_border_size}px solid {$login_form_border_color}" );
|
146 |
}
|
147 |
+
|
148 |
if ( !empty( $login_form_border_radius ) ) {
|
149 |
+
|
150 |
$login_form_border_radius = rtrim( $login_form_border_radius, 'px' ) . 'px';
|
151 |
+
$css .= CL_Scripts_Styles::prefixit( 'border-radius', $login_form_border_radius );
|
152 |
}
|
153 |
+
|
154 |
if ( !empty( $login_form_box_shadow ) ) {
|
155 |
+
|
156 |
if ( empty( $login_form_box_shadow_color ) ) {
|
157 |
$login_form_box_shadow_color = '#121212';
|
158 |
}
|
159 |
+
|
160 |
if ( 'on' === $login_form_box_shadow_color_checkbox ) {
|
161 |
+
|
162 |
$color = CL_Scripts_Styles::hex2rgb( $login_form_box_shadow_color );
|
163 |
$box_shadow = "{$login_form_box_shadow} rgba({$color['red']},{$color['green']},{$color['blue']},{$login_form_box_shadow_color_opacity})";
|
164 |
}
|
165 |
else {
|
166 |
+
$box_shadow = $login_form_box_shadow . ' ' . $login_form_box_shadow_color;
|
167 |
}
|
168 |
+
|
169 |
+
$css .= CL_Scripts_Styles::prefixit( 'box-shadow', trim( $box_shadow ) );
|
170 |
}
|
171 |
+
|
172 |
/* CLOSE login form */
|
173 |
$css .= $close_rule;
|
174 |
+
|
175 |
/**
|
176 |
* Open login h1
|
177 |
*
|
178 |
* @rule #login h1
|
179 |
*/
|
180 |
if ( ( !empty( $hide_wp_logo ) && 'on' === $hide_wp_logo ) && empty( $logo_background_url ) ) {
|
181 |
+
|
182 |
+
$css .= CL_Scripts_Styles::cssrule( '#login h1' );
|
183 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "display: none" );
|
184 |
+
|
185 |
/* CLOSE login h1 */
|
186 |
$css .= $close_rule;
|
187 |
}
|
188 |
+
|
189 |
/**
|
190 |
* Open login h1
|
191 |
*
|
192 |
* @rule .login h1
|
193 |
*/
|
194 |
if ( ( !empty( $logo_force_form_max_width ) && 'on' === $logo_force_form_max_width ) && !empty( $login_form_width ) ) {
|
195 |
+
|
196 |
+
$css .= CL_Scripts_Styles::cssrule( '.login h1' );
|
197 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$login_form_width}px" );
|
198 |
+
|
199 |
/* CLOSE login */
|
200 |
$css .= $close_rule;
|
201 |
}
|
202 |
+
|
203 |
/**
|
204 |
* Open login h1 a
|
205 |
*
|
206 |
* @rule .login h1 a
|
207 |
*/
|
208 |
if ( !empty( $logo_background_url ) ) {
|
209 |
+
|
210 |
$css .= CL_Scripts_Styles::cssrule( '.login h1 a' );
|
211 |
+
|
212 |
+
|
213 |
if ( !empty( $logo_background_size_width ) )
|
214 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "width: {$logo_background_size_width}px !important" );
|
215 |
+
|
216 |
if ( !empty( $logo_background_size_height ) )
|
217 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "height: {$logo_background_size_height}px !important" );
|
218 |
+
|
219 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-image: url('{$logo_background_url}')" );
|
220 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-position: {$logo_background_position}" );
|
221 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "background-repeat: {$logo_background_repeat}" );
|
222 |
+
|
223 |
if ( !empty( $logo_background_size ) && 'none' !== $logo_background_size ) {
|
224 |
+
|
225 |
+
$css .= CL_Scripts_Styles::prefixit( 'background-size', $logo_background_size );
|
226 |
}
|
227 |
else {
|
228 |
+
|
229 |
$css .= CL_Scripts_Styles::prefixit( 'background-size', 'inherit' );
|
230 |
}
|
231 |
+
|
232 |
/* CLOSE login h1 a */
|
233 |
$css .= $close_rule;
|
234 |
+
|
235 |
}
|
236 |
+
|
237 |
/**
|
238 |
* Open form label
|
239 |
*
|
240 |
* @rule .login label | #loginform label, #lostpasswordform label
|
241 |
*/
|
242 |
+
if ( !empty( $label_color ) ) {
|
243 |
+
|
244 |
$css .= CL_Scripts_Styles::cssrule( '.login label' );
|
245 |
+
|
246 |
if ( 'on' === $label_color_checkbox ) {
|
247 |
+
|
248 |
$color = CL_Scripts_Styles::hex2rgb( $label_color );
|
249 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$label_color_opacity})" );
|
250 |
}
|
251 |
else {
|
252 |
+
|
253 |
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$label_color}" );
|
254 |
+
|
255 |
}
|
256 |
+
|
257 |
/* CLOSE login h1 a */
|
258 |
$css .= $close_rule;
|
259 |
+
|
260 |
}
|
261 |
+
|
262 |
/**
|
263 |
* Open below form links
|
264 |
*
|
265 |
* @rule .login #nav a, .login #backtoblog a
|
266 |
*/
|
267 |
+
if ( !empty( $nav_color ) ) {
|
268 |
+
|
269 |
$css .= CL_Scripts_Styles::cssrule( '.login #nav a, .login #backtoblog a' );
|
270 |
+
|
271 |
if ( 'on' === $nav_color_checkbox ) {
|
272 |
+
|
273 |
$color = CL_Scripts_Styles::hex2rgb( $nav_color );
|
274 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_color_opacity}) !important" );
|
275 |
}
|
276 |
else {
|
277 |
+
|
278 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$nav_color} !important" );
|
279 |
}
|
280 |
+
|
281 |
if ( !empty( $nav_text_shadow_color ) && 'on' === $nav_text_shadow_color_checkbox ) {
|
282 |
+
|
283 |
$color = CL_Scripts_Styles::hex2rgb( $nav_text_shadow_color );
|
284 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_text_shadow_color_opacity})" );
|
285 |
}
|
286 |
elseif ( !empty( $nav_text_shadow_color ) ) {
|
287 |
+
|
288 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 {$nav_text_shadow_color}" );
|
289 |
}
|
290 |
+
|
291 |
/* CLOSE login h1 a */
|
292 |
$css .= $close_rule;
|
293 |
+
|
294 |
}
|
295 |
+
|
296 |
/**
|
297 |
* Open below form links :hover
|
298 |
*
|
299 |
* @rule .login #nav a:hover, .login #backtoblog a:hover
|
300 |
*/
|
301 |
+
if ( !empty( $nav_hover_color ) ) {
|
302 |
+
|
303 |
$css .= CL_Scripts_Styles::cssrule( '.login #nav a:hover, .login #backtoblog a:hover' );
|
304 |
+
|
305 |
if ( 'on' === $nav_hover_color_checkbox ) {
|
306 |
+
|
307 |
$color = CL_Scripts_Styles::hex2rgb( $nav_hover_color );
|
308 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_hover_color_opacity}) !important" );
|
309 |
}
|
310 |
else {
|
311 |
+
|
312 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "color: {$nav_hover_color} !important" );
|
313 |
}
|
314 |
+
|
315 |
if ( !empty( $nav_text_shadow_hover_color ) && 'on' === $nav_text_shadow_hover_color_checkbox ) {
|
316 |
+
|
317 |
$color = CL_Scripts_Styles::hex2rgb( $nav_text_shadow_hover_color );
|
318 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 rgba({$color['red']},{$color['green']},{$color['blue']},{$nav_text_shadow_hover_color_opacity})" );
|
319 |
}
|
320 |
elseif ( !empty( $nav_text_shadow_hover_color ) ) {
|
321 |
+
|
322 |
+
$css .= CL_Scripts_Styles::trailingsemicolonit( "text-shadow: 0 1px 0 {$nav_text_shadow_hover_color}" );
|
323 |
}
|
324 |
+
|
325 |
/* CLOSE login h1 a */
|
326 |
$css .= $close_rule;
|
327 |
+
|
328 |
}
|
329 |
+
|
330 |
// /* WP Magic */
|
331 |
// set_transient( $trans_key, $css, YEAR_IN_SECONDS/2 ); // Cache for six months
|
332 |
//endif;
|
333 |
|
334 |
/* Out of the frying pan, and into the fire! */
|
335 |
+
echo $css;
|