Changeset 1506148
- Timestamp:
- 09/30/2016 08:19:32 PM (9 years ago)
- Location:
- content-warning-v2/trunk
- Files:
-
- 68 added
- 5 deleted
- 6 edited
-
.gitmodules (modified) (1 diff)
-
README.md (modified) (3 diffs)
-
class (deleted)
-
content-warning-v2.php (added)
-
content-warning-v3.php (deleted)
-
gruntfile.js (modified) (1 diff)
-
inc (deleted)
-
includes (added)
-
includes/admin.php (added)
-
includes/api.php (added)
-
includes/settings.php (added)
-
js/admin.js (added)
-
js/admin.min.js (added)
-
js/colorbox.1.5.10 (deleted)
-
js/cwv3.js (modified) (6 diffs)
-
js/cwv3.min.js (modified) (1 diff)
-
lib/jw_simple_options (deleted)
-
lib/select2-4.0.3 (added)
-
lib/select2-4.0.3/css (added)
-
lib/select2-4.0.3/css/select2.css (added)
-
lib/select2-4.0.3/css/select2.min.css (added)
-
lib/select2-4.0.3/js (added)
-
lib/select2-4.0.3/js/i18n (added)
-
lib/select2-4.0.3/js/i18n/ar.js (added)
-
lib/select2-4.0.3/js/i18n/az.js (added)
-
lib/select2-4.0.3/js/i18n/bg.js (added)
-
lib/select2-4.0.3/js/i18n/ca.js (added)
-
lib/select2-4.0.3/js/i18n/cs.js (added)
-
lib/select2-4.0.3/js/i18n/da.js (added)
-
lib/select2-4.0.3/js/i18n/de.js (added)
-
lib/select2-4.0.3/js/i18n/el.js (added)
-
lib/select2-4.0.3/js/i18n/en.js (added)
-
lib/select2-4.0.3/js/i18n/es.js (added)
-
lib/select2-4.0.3/js/i18n/et.js (added)
-
lib/select2-4.0.3/js/i18n/eu.js (added)
-
lib/select2-4.0.3/js/i18n/fa.js (added)
-
lib/select2-4.0.3/js/i18n/fi.js (added)
-
lib/select2-4.0.3/js/i18n/fr.js (added)
-
lib/select2-4.0.3/js/i18n/gl.js (added)
-
lib/select2-4.0.3/js/i18n/he.js (added)
-
lib/select2-4.0.3/js/i18n/hi.js (added)
-
lib/select2-4.0.3/js/i18n/hr.js (added)
-
lib/select2-4.0.3/js/i18n/hu.js (added)
-
lib/select2-4.0.3/js/i18n/id.js (added)
-
lib/select2-4.0.3/js/i18n/is.js (added)
-
lib/select2-4.0.3/js/i18n/it.js (added)
-
lib/select2-4.0.3/js/i18n/ja.js (added)
-
lib/select2-4.0.3/js/i18n/km.js (added)
-
lib/select2-4.0.3/js/i18n/ko.js (added)
-
lib/select2-4.0.3/js/i18n/lt.js (added)
-
lib/select2-4.0.3/js/i18n/lv.js (added)
-
lib/select2-4.0.3/js/i18n/mk.js (added)
-
lib/select2-4.0.3/js/i18n/ms.js (added)
-
lib/select2-4.0.3/js/i18n/nb.js (added)
-
lib/select2-4.0.3/js/i18n/nl.js (added)
-
lib/select2-4.0.3/js/i18n/pl.js (added)
-
lib/select2-4.0.3/js/i18n/pt-BR.js (added)
-
lib/select2-4.0.3/js/i18n/pt.js (added)
-
lib/select2-4.0.3/js/i18n/ro.js (added)
-
lib/select2-4.0.3/js/i18n/ru.js (added)
-
lib/select2-4.0.3/js/i18n/sk.js (added)
-
lib/select2-4.0.3/js/i18n/sr-Cyrl.js (added)
-
lib/select2-4.0.3/js/i18n/sr.js (added)
-
lib/select2-4.0.3/js/i18n/sv.js (added)
-
lib/select2-4.0.3/js/i18n/th.js (added)
-
lib/select2-4.0.3/js/i18n/tr.js (added)
-
lib/select2-4.0.3/js/i18n/uk.js (added)
-
lib/select2-4.0.3/js/i18n/vi.js (added)
-
lib/select2-4.0.3/js/i18n/zh-CN.js (added)
-
lib/select2-4.0.3/js/i18n/zh-TW.js (added)
-
lib/select2-4.0.3/js/select2.full.js (added)
-
lib/select2-4.0.3/js/select2.full.min.js (added)
-
lib/select2-4.0.3/js/select2.js (added)
-
lib/select2-4.0.3/js/select2.min.js (added)
-
lib/spectrum-1.0.9 (added)
-
lib/spectrum-1.0.9/spectrum.css (added)
-
lib/spectrum-1.0.9/spectrum.js (added)
-
readme.txt (modified) (5 diffs)
-
wpml-config.xml (added)
Legend:
- Unmodified
- Added
- Removed
-
content-warning-v2/trunk/.gitmodules
r1422380 r1506148 1 [submodule "lib/jw_simple_options"]2 path = lib/jw_simple_options3 url = https://github.com/JayWood/jw_simple_options.git -
content-warning-v2/trunk/README.md
r1422380 r1506148 7 7 [](https://github.com/JayWood/content-warning-v3/issues) 8 8 9 **Current Version:** 3. 6.910 **Tested Up To:** 4. 5.29 **Current Version:** 3.7 10 **Tested Up To:** 4.6.1 11 11 **Author:** [Jay Wood](http://github.com/JayWood) 12 12 **Author URI:** http://plugish.com … … 69 69 * Also, if you're using google chrome, this is a bug that unfortunately I have been unable to squash. Hitting F5 or refresh will fix it. 70 70 71 ## Upgrade Notice 72 73 ### 3.7 74 * Upgrading to 3.7 will de-activate your plugin. This is because the name of the main plugin file was changed for localization purposes. Your settings are still saved you just have to re-activate the plugin. 75 71 76 ## Changelog 77 78 ### 3.7 79 * Fixed an opacity bug where if user set opacity to 0, it was ignored. This should no longer happen. 80 * Move to the settings API, drop JW Simple Options framework ( I was a newbie when I made it ). Fixes [#45](https://github.com/JayWood/content-warning-v3/issues/45) 81 * Use Select2 for categories 82 * Use a better check method for checkboxes and multi-select - fixes [#49](https://github.com/JayWood/content-warning-v3/issues/49) 83 * Set opacity step to 0.1 - Fixes [#55](https://github.com/JayWood/content-warning-v3/issues/55) 72 84 73 85 ### 3.6.9 … … 84 96 * Removed uninstall hook for now - Options API needs to be updated 85 97 * Fixed denial toggle to actually remove denial text if it was once on, but now off. 86 87 98 88 99 ### 3.6.6 -
content-warning-v2/trunk/gruntfile.js
r1422380 r1506148 107 107 // Default task 108 108 grunt.registerTask('default', ['jshint', 'sass', 'uglify', 'cssmin']); 109 grunt.registerTask( 'scripts', ['jshint','uglify'] ); 109 110 grunt.registerTask('sync', ['rsync']); 110 111 }; -
content-warning-v2/trunk/js/cwv3.js
r1422380 r1506148 1 1 /* global cwv3_params */ 2 // opacity cookie_path cookie_name cookie_time denial_enabled denial_method redirect_url 2 // opacity cookie_path cookie_name cookie_time denial_enabled denial_method redirect_url 3 3 4 4 … … 8 8 9 9 app.cache = function(){ 10 app.$body = $( 'body' ); 10 11 app.$dialog = $('.cwv3_dialog'); 11 12 app.$content = app.$dialog.find( '.cwv3_content' ); … … 31 32 32 33 // Register handlers 33 $( 'body' ).on( 'click', '.cwv3_enter', app.enter_handler );34 $( 'body' ).on( 'click', '.cwv3_exit', app.exit_handler );35 34 app.$body.on( 'click', '.cwv3_enter', app.enter_handler ); 35 app.$body.on( 'click', '.cwv3_exit', app.exit_handler ); 36 36 37 // Don't resize EVERY time, set it to an interval of half a second 37 38 $( window ).resize( function(){ … … 48 49 app.center_dialog = function(){ 49 50 app.$content.css( {'height' : ''} ); 50 51 51 52 var diag ={ 52 53 x: app.$dialog.width(), … … 123 124 app.$dialog.fadeOut( 100, function(){ 124 125 app.$overlay.fadeOut( 100 ); 125 }); 126 }); 126 127 }; 127 128 … … 134 135 }; 135 136 136 window.console.log( $.removeCookie( app.cookie_name, cookie_data ));137 $.removeCookie( app.cookie_name, cookie_data ); 137 138 app.cookie_data = undefined; 138 139 } -
content-warning-v2/trunk/js/cwv3.min.js
r1422380 r1506148 1 window.cwv3=function(window,document,$){var app={};return app.cache=function(){app.$ dialog=$(".cwv3_dialog"),app.$content=app.$dialog.find(".cwv3_content"),app.$auth=app.$dialog.find(".cwv3.auth"),app.$denial=app.$dialog.find(".cwv3.denied"),app.$exit=app.$dialog.find(".cwv3_exit"),app.$enter=app.$dialog.find(".cwv3_enter"),app.$buttons=app.$dialog.find(".cwv3_btns"),app.$title=app.$dialog.find(".cwv3_title"),app.$overlay=$(".cwv3.dialog-overlay"),app.cookie_name=""!==cwv3_params.cookie_name?"cwv3_cookie_"+cwv3_params.cookie_name:!1,app.redirect_url=""===cwv3_params.redirect_url||"#"===cwv3_params.redirect_url?"http://google.com":cwv3_params.redirect_url,app.cookie_data=$.cookie(app.cookie_name),app.diag={max_percent_width:50,max_percent_height:50},app.timeout=""},app.init=function(){app.cache(),$("body").on("click",".cwv3_enter",app.enter_handler),$("body").on("click",".cwv3_exit",app.exit_handler),$(window).resize(function(){clearTimeout(app.timeout),app.timeout=setTimeout(app.center_dialog,500)}),app.cookie_name&&app.dialog_switch()},app.center_dialog=function(){app.$content.css({height:""});var diag={x:app.$dialog.width(),y:app.$dialog.height()},vp={x:window.innerWidth,y:window.innerHeight},diag_pos={left:.5*(vp.x-diag.x),top:.5*(vp.y-diag.y)},content_height=app.$dialog.height()-10-app.$buttons.outerHeight(!0)-app.$title.outerHeight(!0);app.$content.animate({height:content_height},250,"swing",function(){app.$dialog.animate(diag_pos,250,"swing",app.cache)})},app.enter_handler=function(evt){evt.preventDefault(),app.set_cookie("enter");var $enter_url=app.$enter.find("a").attr("href");"#"===$enter_url||""===$enter_url?app.close_handler():window.location.replace($enter_url)},app.exit_handler=function(evt){evt.preventDefault(),"denied"!==app.cookie_data&&app.set_cookie("exit");var $exit_url=app.$exit.find("a").attr("href");"#"===$exit_url||""===$exit_url?window.location.replace("http://google.com"):window.location.replace($exit_url)},app.set_cookie=function(method){method="exit"===method?"denied":!0;var cookie_data={expires:parseInt(cwv3_params.cookie_time),path:cwv3_params.cookie_path};0===cookie_data.expires&&(cookie_data.expires=null),$.cookie(app.cookie_name,method,cookie_data)},app.log=function(){window.console&&window.console.log(Array.prototype.slice.call(arguments))},app.close_handler=function(){app.$dialog.fadeOut(100,function(){app.$overlay.fadeOut(100)})},app.dialog_switch=function(){if("denied"===app.cookie_data&&!cwv3_params.denial_enabled){var cookie_data={expires:parseInt(cwv3_params.cookie_time),path:cwv3_params.cookie_path};window.console.log($.removeCookie(app.cookie_name,cookie_data)),app.cookie_data=void 0}"denied"===app.cookie_data?(app.$auth.remove(),"redirect"===cwv3_params.denial_method&&""!==cwv3_params.denial_enabled?window.location.replace(app.redirect_url):app.show_popup()):void 0!==app.cookie_data&&null!==app.cookie_data||(app.$denial.remove(),app.show_popup())},app.show_popup=function(){app.$overlay.fadeIn(200,function(){app.$dialog.fadeIn(100,function(){app.center_dialog()})})},$(document).ready(app.init),app}(window,document,jQuery);1 window.cwv3=function(window,document,$){var app={};return app.cache=function(){app.$body=$("body"),app.$dialog=$(".cwv3_dialog"),app.$content=app.$dialog.find(".cwv3_content"),app.$auth=app.$dialog.find(".cwv3.auth"),app.$denial=app.$dialog.find(".cwv3.denied"),app.$exit=app.$dialog.find(".cwv3_exit"),app.$enter=app.$dialog.find(".cwv3_enter"),app.$buttons=app.$dialog.find(".cwv3_btns"),app.$title=app.$dialog.find(".cwv3_title"),app.$overlay=$(".cwv3.dialog-overlay"),app.cookie_name=""!==cwv3_params.cookie_name?"cwv3_cookie_"+cwv3_params.cookie_name:!1,app.redirect_url=""===cwv3_params.redirect_url||"#"===cwv3_params.redirect_url?"http://google.com":cwv3_params.redirect_url,app.cookie_data=$.cookie(app.cookie_name),app.diag={max_percent_width:50,max_percent_height:50},app.timeout=""},app.init=function(){app.cache(),app.$body.on("click",".cwv3_enter",app.enter_handler),app.$body.on("click",".cwv3_exit",app.exit_handler),$(window).resize(function(){clearTimeout(app.timeout),app.timeout=setTimeout(app.center_dialog,500)}),app.cookie_name&&app.dialog_switch()},app.center_dialog=function(){app.$content.css({height:""});var diag={x:app.$dialog.width(),y:app.$dialog.height()},vp={x:window.innerWidth,y:window.innerHeight},diag_pos={left:.5*(vp.x-diag.x),top:.5*(vp.y-diag.y)},content_height=app.$dialog.height()-10-app.$buttons.outerHeight(!0)-app.$title.outerHeight(!0);app.$content.animate({height:content_height},250,"swing",function(){app.$dialog.animate(diag_pos,250,"swing",app.cache)})},app.enter_handler=function(evt){evt.preventDefault(),app.set_cookie("enter");var $enter_url=app.$enter.find("a").attr("href");"#"===$enter_url||""===$enter_url?app.close_handler():window.location.replace($enter_url)},app.exit_handler=function(evt){evt.preventDefault(),"denied"!==app.cookie_data&&app.set_cookie("exit");var $exit_url=app.$exit.find("a").attr("href");"#"===$exit_url||""===$exit_url?window.location.replace("http://google.com"):window.location.replace($exit_url)},app.set_cookie=function(method){method="exit"===method?"denied":!0;var cookie_data={expires:parseInt(cwv3_params.cookie_time),path:cwv3_params.cookie_path};0===cookie_data.expires&&(cookie_data.expires=null),$.cookie(app.cookie_name,method,cookie_data)},app.log=function(){window.console&&window.console.log(Array.prototype.slice.call(arguments))},app.close_handler=function(){app.$dialog.fadeOut(100,function(){app.$overlay.fadeOut(100)})},app.dialog_switch=function(){if("denied"===app.cookie_data&&!cwv3_params.denial_enabled){var cookie_data={expires:parseInt(cwv3_params.cookie_time),path:cwv3_params.cookie_path};$.removeCookie(app.cookie_name,cookie_data),app.cookie_data=void 0}"denied"===app.cookie_data?(app.$auth.remove(),"redirect"===cwv3_params.denial_method&&""!==cwv3_params.denial_enabled?window.location.replace(app.redirect_url):app.show_popup()):void 0!==app.cookie_data&&null!==app.cookie_data||(app.$denial.remove(),app.show_popup())},app.show_popup=function(){app.$overlay.fadeIn(200,function(){app.$dialog.fadeIn(100,function(){app.center_dialog()})})},$(document).ready(app.init),app}(window,document,jQuery); -
content-warning-v2/trunk/readme.txt
r1422380 r1506148 4 4 Tags: warning, message, lading page, front page, enter page, adult content, consent, age verification, validation 5 5 Requires at least: 3.5 6 Tested up to: 4. 5.27 Stable tag: 3. 6.96 Tested up to: 4.6.1 7 Stable tag: 3.7 8 8 9 9 A plugin that provides a warning box with a ton more options completely re-written from the ground up. … … 35 35 [youtube http://www.youtube.com/watch?v=0_ZNojpYuwk] 36 36 37 *NOTE:* 37 *NOTE:* 38 38 39 39 > If the exit link is left empty, users will be redirected to google. 40 41 == Upgrade Notice == 42 43 = 3.7 = 44 * Upgrading to 3.7 will de-activate your plugin. This is because the name of the main plugin file was changed for localization purposes. Your settings are still saved you just have to re-activate the plugin. 45 40 46 41 47 == Installation == … … 58 64 1. Save, and you're all good. 59 65 60 = Old Method = 66 = Old Method = 61 67 1. Upload `content-warning-v2` to the `/wp-content/plugins/` directory 62 68 1. Activate the plugin through the 'Plugins' menu in WordPress … … 76 82 * Give a link to your site or the affected page. 77 83 78 = The plugin is broken, fix it. = 84 = The plugin is broken, fix it. = 79 85 80 86 Please do not contact me with questions like this. If you cannot be descriptive with your problem I cannot help you. … … 99 105 100 106 == Changelog == 107 108 = 3.7 = 109 * Fixed an opacity bug where if user set opacity to 0, it was ignored. This should no longer happen. 110 * Move to the settings API, drop JW Simple Options framework ( I was a newbie when I made it ). Fixes [#45](https://github.com/JayWood/content-warning-v3/issues/45) 111 * Use Select2 for categories 112 * Use a better check method for checkboxes and multi-select - fixes [#49](https://github.com/JayWood/content-warning-v3/issues/49) 113 * Set opacity step to 0.1 - Fixes [#55](https://github.com/JayWood/content-warning-v3/issues/55) 101 114 102 115 = 3.6.9 =
Note: See TracChangeset
for help on using the changeset viewer.