Hustle – Pop-Ups, Slide-ins and Email Opt-ins - Version 4.6

Version Description

  • Completely re-build the UI from ground up!
  • Migrated PopUps to a much more flexible data structure.
  • Merged sections "Add-Ons" and "Settings" to a single page.
  • Removed old legacy code; plugin is cleaner and faster.
  • New feature: Preview PopUp inside the Editor!
  • Three new, modern PopUp styles added.
  • Featured Image support for new PopUp styles.
Download this release

Release Info

Developer WPMUDEV
Plugin Icon 128x128 Hustle – Pop-Ups, Slide-ins and Email Opt-ins
Version 4.6
Comparing to
See all releases

Code changes from version 4.4.5.4 to 4.6

Files changed (139) hide show
  1. changelog.txt +42 -0
  2. css/popup-admin.css +3 -0
  3. css/tpl/cabriolet/style.php +3 -0
  4. css/tpl/minimal/style.php +3 -0
  5. {popoverincludes/css/default/images → css/tpl/old-default/img}/closemessage.png +0 -0
  6. {popoverincludes/css/default/images → css/tpl/old-default/img}/closemessagebland.png +0 -0
  7. {popoverincludes/css/default/images → css/tpl/old-default/img}/loading.gif +0 -0
  8. {popoverincludes/css/default/images → css/tpl/old-default/img}/opaque.png +0 -0
  9. css/tpl/old-default/style.css +1 -0
  10. css/tpl/old-default/style.php +3 -0
  11. css/tpl/old-default/template.php +40 -0
  12. {popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/closemessage.png +0 -0
  13. {popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/closemessagebland.png +0 -0
  14. {popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/loading.gif +0 -0
  15. {popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/opaque.png +0 -0
  16. css/tpl/old-fixed/style.css +1 -0
  17. css/tpl/old-fixed/style.php +3 -0
  18. css/tpl/old-fixed/template.php +40 -0
  19. {popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/closemessage.png +0 -0
  20. {popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/closemessagebland.png +0 -0
  21. {popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/loading.gif +0 -0
  22. {popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/opaque.png +0 -0
  23. {popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/opaque80.png +0 -0
  24. css/tpl/old-fullbackground/style.css +1 -0
  25. css/tpl/old-fullbackground/style.php +3 -0
  26. css/tpl/old-fullbackground/template.php +41 -0
  27. css/tpl/simple/img/close.png +0 -0
  28. css/tpl/simple/img/close@2x.png +0 -0
  29. css/tpl/simple/style.css +1 -0
  30. css/tpl/simple/style.php +2 -0
  31. css/tpl/simple/template.php +97 -0
  32. humans.txt +15 -0
  33. img/icon.png +0 -0
  34. inc/addons/class-popup-addon-anonymous.php +10 -0
  35. inc/addons/class-popup-addon-geo-db.php +21 -0
  36. inc/addons/class-popup-addon-headerfooter.php +167 -0
  37. inc/class-popup-admin.php +1101 -0
  38. inc/class-popup-base.php +427 -0
  39. inc/class-popup-database.php +742 -0
  40. inc/class-popup-item.php +765 -0
  41. inc/class-popup-posttype.php +127 -0
  42. inc/class-popup-public.php +263 -0
  43. inc/class-popup-rule.php +433 -0
  44. inc/config-defaults.php +30 -0
  45. inc/external/wpmu-lib/changelog.txt +52 -0
  46. inc/external/wpmu-lib/core.php +56 -0
  47. inc/external/wpmu-lib/css/select2.css +1 -0
  48. inc/external/wpmu-lib/css/wpmu-ui.css +1 -0
  49. inc/external/wpmu-lib/css/wpmu-vnav.css +1 -0
  50. inc/external/wpmu-lib/functions-wpmulib.php +582 -0
  51. inc/external/wpmu-lib/img/select2.png +0 -0
  52. inc/external/wpmu-lib/img/select2x2.png +0 -0
  53. inc/external/wpmu-lib/img/spinner.gif +0 -0
  54. inc/external/wpmu-lib/inc/pointer.php +44 -0
  55. inc/external/wpmu-lib/js/select2.min.js +2 -0
  56. inc/external/wpmu-lib/js/tiny-scrollbar.min.js +1 -0
  57. inc/external/wpmu-lib/js/wpmu-ui.min.js +1 -0
  58. inc/external/wpmu-lib/js/wpmu-vnav.min.js +1 -0
  59. inc/external/wpmu-lib/license.txt +339 -0
  60. inc/rules/class-popup-rule-advurl.php +16 -0
  61. inc/rules/class-popup-rule-browser.php +91 -0
  62. inc/rules/class-popup-rule-category.php +16 -0
  63. inc/rules/class-popup-rule-events.php +16 -0
  64. inc/rules/class-popup-rule-geo.php +16 -0
  65. inc/rules/class-popup-rule-membership.php +16 -0
  66. inc/rules/class-popup-rule-popup.php +100 -0
  67. inc/rules/class-popup-rule-posttype.php +16 -0
  68. inc/rules/class-popup-rule-prosite.php +16 -0
  69. inc/rules/class-popup-rule-referrer.php +278 -0
  70. inc/rules/class-popup-rule-role.php +16 -0
  71. inc/rules/class-popup-rule-url.php +227 -0
  72. inc/rules/class-popup-rule-user.php +197 -0
  73. inc/rules/class-popup-rule-width.php +16 -0
  74. inc/rules/class-popup-rule-xprofile.php +16 -0
  75. js/popup-admin.min.js +1 -0
  76. js/public.min.js +1 -0
  77. {popoverincludes/languages → lang}/popover-en_US.mo +0 -0
  78. lang/popover.po +1941 -0
  79. popover.php +62 -29
  80. popoverincludes/addons/testheadfooter.php +0 -87
  81. popoverincludes/classes/popover.help.php +0 -85
  82. popoverincludes/classes/popoveradmin.php +0 -2089
  83. popoverincludes/classes/popoverajax.php +0 -566
  84. popoverincludes/classes/popoverpublic.php +0 -209
  85. popoverincludes/css/default/popover.php +0 -15
  86. popoverincludes/css/default/style.css +0 -88
  87. popoverincludes/css/fixed/popover.php +0 -14
  88. popoverincludes/css/fixed/style.css +0 -88
  89. popoverincludes/css/fullbackground/popover.php +0 -16
  90. popoverincludes/css/fullbackground/style.css +0 -99
  91. popoverincludes/css/fullbackgroundfixed/images/closemessage.png +0 -0
  92. popoverincludes/css/fullbackgroundfixed/images/closemessagebland.png +0 -0
  93. popoverincludes/css/fullbackgroundfixed/images/loading.gif +0 -0
  94. popoverincludes/css/fullbackgroundfixed/images/opaque.png +0 -0
  95. popoverincludes/css/fullbackgroundfixed/images/opaque80.png +0 -0
  96. popoverincludes/css/fullbackgroundfixed/popover.php +0 -14
  97. popoverincludes/css/fullbackgroundfixed/style.css +0 -88
  98. popoverincludes/css/popoveradmin.css +0 -359
  99. popoverincludes/css/popovermenu.css +0 -46
  100. popoverincludes/help/images/addonslist.png +0 -0
  101. popoverincludes/help/images/popoveractivate.png +0 -0
  102. popoverincludes/help/images/popovercontent.png +0 -0
  103. popoverincludes/help/images/popoverdeactivate.png +0 -0
  104. popoverincludes/help/images/popoverdragconditions.png +0 -0
  105. popoverincludes/help/images/popovermove.png +0 -0
  106. popoverincludes/help/images/popoversettings.png +0 -0
  107. popoverincludes/help/popover.help.php +0 -14
  108. popoverincludes/help/popoveraddons.help.php +0 -3
  109. popoverincludes/help/popoveredit.help.php +0 -14
  110. popoverincludes/images/arrows-dark.png +0 -0
  111. popoverincludes/images/arrows.png +0 -0
  112. popoverincludes/images/closemessage.png +0 -0
  113. popoverincludes/images/closemessagebland.png +0 -0
  114. popoverincludes/images/drag.png +0 -0
  115. popoverincludes/images/ed-bg.gif +0 -0
  116. popoverincludes/images/gray-grad.png +0 -0
  117. popoverincludes/images/loading.gif +0 -0
  118. popoverincludes/images/olddrag.png +0 -0
  119. popoverincludes/images/opaque.png +0 -0
  120. popoverincludes/images/window.png +0 -0
  121. popoverincludes/includes/class_wd_help_tooltips.php +0 -463
  122. popoverincludes/includes/config.php +0 -11
  123. popoverincludes/includes/functions.php +0 -432
  124. popoverincludes/js/jquery.tablednd_0_5.js +0 -382
  125. popoverincludes/js/popover-load-custom.js +0 -125
  126. popoverincludes/js/popover-load.js +0 -127
  127. popoverincludes/js/popoveradmin.js +0 -92
  128. popoverincludes/js/popoverlegacy.js +0 -79
  129. popoverincludes/js/popovermenu.js +0 -53
  130. popoverincludes/js/popoversizing.js +0 -9
  131. popoverincludes/languages/popover.po +0 -1673
  132. readme.txt +11 -59
  133. views/meta-appearance.php +152 -0
  134. views/meta-behavior.php +190 -0
  135. views/meta-content.php +159 -0
  136. views/meta-rules.php +35 -0
  137. views/meta-submitdiv.php +114 -0
  138. views/network.php +59 -0
  139. views/settings.php +326 -0
changelog.txt ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Plugin Name: WordPress PopUp
2
+ Author: Barry (Incsub), Marko Miljus (Incsub), Philipp Stracker (Incsub)
3
+
4
+ Change Log:
5
+ ----------------------------------------------------------------------
6
+
7
+ 4.6 - 2014-08-22
8
+ ----------------------------------------------------------------------
9
+ - Completely re-build the UI from ground up!
10
+ - Migrated PopUps to a much more flexible data structure.
11
+ - Merged sections "Add-Ons" and "Settings" to a single page.
12
+ - Removed old legacy code; plugin is cleaner and faster.
13
+ - New feature: Preview PopUp inside the Editor!
14
+ - Three new, modern PopUp styles added.
15
+ - Featured Image support for new PopUp styles.
16
+
17
+ 4.5.3 - 2013-11-15
18
+ ----------------------------------------------------------------------
19
+ - Fix for argument passing issue.
20
+ - Fix for popup pending inital state.
21
+
22
+ 4.5.2 - 2013-11-05
23
+ ----------------------------------------------------------------------
24
+ - Fix for display issue with absolute sizes/positioning.
25
+ - Added the XProfile fields value matching add-on.
26
+
27
+ 4.5.1 - 2013-10-30
28
+ ----------------------------------------------------------------------
29
+ - Sizing calculus update.
30
+ - Performance update.
31
+
32
+ 4.5 - 2013-10-16
33
+ ----------------------------------------------------------------------
34
+ - Javascript update.
35
+ - Separated size and positioning javascript.
36
+ - Added new expiry options and updated existing ones.
37
+ - Added anonymous loading method add-on.
38
+ - Added advanced URL rules add-on.
39
+ - Added maximum width rule add-on.
40
+ - Added post types rules add-on.
41
+ - Added show on click rule add-on.
42
+ - Added show on exit rule add-on.
css/popup-admin.css ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ .post-type-inc_popup .status-icon{color:#CCC;width:30px;font-size:16px;line-height:20px;height:20px}.post-type-inc_popup .status-icon:before{content:"\f153"}.post-type-inc_popup .status-active .status-icon,.post-type-inc_popup .status-publish .status-icon{color:#090;font-size:30px}.post-type-inc_popup .status-active .status-icon:before,.post-type-inc_popup .status-publish .status-icon:before{content:"\f147"}.post-type-inc_popup .status-trash .status-icon:before{content:"\f182"}select.block,textarea.block,input.block{margin-left:0;margin-right:0;display:block;width:100%}textarea.block{height:7.2em}.wp-admin select{vertical-align:top;margin-top:0}.inp-small{width:75px}.inp-row{min-height:32px}.inp-row label.inp-height{margin:7px 0 0;display:inline-block}.inactive{opacity:.35;position:relative}.inactive:before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:10000}.inactive-anim{transition:opacity .3s}fieldset{border:1px solid #DDD;padding:8px;margin:0 0 10px}fieldset:last-child{margin-bottom:0}div.msg-ok,div.msg-err{padding:0 0.6em;padding:1px 12px;background-color:#FAFAFA;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);clear:both;margin:15px 0 0}div.msg-ok{border-left:4px solid #7AD03A}div.msg-err{border-left:4px solid #DD3D36}.tbl-shortcodes{margin-top:20px;max-width:920px}.tbl-shortcodes .flag{width:15%;overflow:visible}.tbl-shortcodes .flag [data-tooltip]{text-align:center;cursor:default}.tbl-shortcodes .flag .wpmui-tip{text-align:center;min-width:135px}.tbl-shortcodes tbody .flag{text-align:center}.tbl-shortcodes tbody td{border-bottom:1px solid #F0F0F0}.tbl-shortcodes tbody tr:hover td{background:#FCFCFC}.tbl-shortcodes .shortcode .icon:before{content:"\f153";color:#CCC;font-size:14px;width:24px;display:inline-block}.tbl-shortcodes .shortcode.sc-admin .sc-admin .icon:before,.tbl-shortcodes .shortcode.sc-front .sc-front .icon:before{content:"\f147";color:#000;font-size:24px}.tbl-shortcodes.load-footer .load-footer,.tbl-shortcodes.load-ajax .load-ajax,.tbl-shortcodes.load-front .load-front,.tbl-shortcodes.load-anonymous .load-anonymous{background:#f0f0f0}.tbl-addons tbody td,.tbl-addons tbody th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1)}.tbl-addons code{display:inline-block;margin:0 1px 1px 0;font-size:12px}.tbl-addons .column-name{width:35%}@media screen and (max-width: 900px){.tbl-addons .column-name{width:50%}}
2
+ .locked td,.locked th{color:#AAA}.locked td .locked-msg,.locked th .locked-msg{color:#333}.locked td .locked-msg:before,.locked th .locked-msg:before{content:'- '}.locked td .locked-msg:after,.locked th .locked-msg:after{content:' -'}.post-type-inc_popup .view-switch{display:none}.post-type-inc_popup .tablenav .alignleft.actions #post-query-submit,.post-type-inc_popup .tablenav .alignleft.actions select[name="m"]{display:none}.post-type-inc_popup [for="po_name-hide"]{display:none}.post-type-inc_popup .wp-list-table tbody td,.post-type-inc_popup .wp-list-table tbody th{-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.1);padding-top:15px;padding-bottom:15px}.post-type-inc_popup .wp-list-table .column-po_order{width:10px}.post-type-inc_popup .wp-list-table tbody tr:hover .column-po_order{cursor:move;cursor:ns-resize}.post-type-inc_popup .wp-list-table tbody tr:hover .column-po_order:before{content:"\f333";width:20px;height:20px;font-size:20px;line-height:1;font-family:dashicons;text-decoration:inherit;font-weight:normal;font-style:normal;vertical-align:top;text-align:center;transition:color 0.1s ease-in 0ms;-webkit-transition:color 0.1s ease-in 0ms;-webkit-font-smoothing:antialiased}.post-type-inc_popup .wp-list-table .column-po_name .the-title{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:bold}.post-type-inc_popup .wp-list-table .column-po_cond{width:55%}@media screen and (max-width: 600px){.post-type-inc_popup .wp-list-table .column-po_cond{width:40%}}.post-type-inc_popup .wp-list-table .column-po_pos{width:30px;text-align:center;white-space:nowrap}.post-type-inc_popup .wp-list-table .column-po_state{width:60px;text-align:center}.post-type-inc_popup .wp-list-table .rule,.post-type-inc_popup .wp-list-table .rule-always{color:#FFF;padding:1px 6px;border-radius:3px;margin:0 4px 1px 0;font-size:12px;float:left}.post-type-inc_popup .wp-list-table .rule{background:#999}.post-type-inc_popup .wp-list-table .rule-always{background:#CCC}.post-type-inc_popup .wp-list-table #the-list tr:nth-child(odd){background-color:#FFF !important}.post-type-inc_popup .wp-list-table #the-list tr:nth-child(even){background-color:#F9F9F9 !important}.post-type-inc_popup .wp-list-table tr.ui-sortable-helper{box-shadow:0 1px 5px rgba(0,0,0,0.2)}.post-type-inc_popup .wp-list-table .ui-sortable-placeholder{position:relative}.post-type-inc_popup .wp-list-table .ui-sortable-placeholder .column-po_order:before{content:'X';display:block;position:absolute;background:red;width:20px;height:20px}.post-type-inc_popup .wp-list-table .ui-sortable-placeholder td{background:#DDD;height:70px;padding:0}.sticky-submit #submitdiv.closed,.sticky-submit #submitdiv{position:fixed;right:0;z-index:10;top:0;left:160px;box-shadow:0 5px 7px -3px rgba(0,0,0,0.2);background:#F5F5F5}.sticky-submit #submitdiv.closed .inside,.sticky-submit #submitdiv .inside{display:block}.sticky-submit #submitdiv.closed .hndle,.sticky-submit #submitdiv.closed .handlediv,.sticky-submit #submitdiv .hndle,.sticky-submit #submitdiv .handlediv{display:none}.sticky-submit #submitdiv.closed #misc-publishing-actions,.sticky-submit #submitdiv #misc-publishing-actions{display:none}.sticky-submit #submitdiv.closed .sticky-actions,.sticky-submit #submitdiv .sticky-actions{padding:10px}.sticky-submit #submitdiv.closed .delete-action,.sticky-submit #submitdiv .delete-action{float:left}.sticky-submit #submitdiv.closed .duplicate-action,.sticky-submit #submitdiv.closed .save-action,.sticky-submit #submitdiv.closed .preview-action,.sticky-submit #submitdiv.closed .publishing-action,.sticky-submit #submitdiv .duplicate-action,.sticky-submit #submitdiv .save-action,.sticky-submit #submitdiv .preview-action,.sticky-submit #submitdiv .publishing-action{float:right;margin-right:10px}.sticky-submit #submitdiv.closed .do-duplicate,.sticky-submit #submitdiv .do-duplicate{margin:0}.sticky-submit.folded #submitdiv{left:36px}@media only screen and (max-width: 900px){.sticky-submit.auto-fold #submitdiv{left:36px}}.sticky-submit #post-body{margin-top:75px}@media screen and (max-width: 782px){.sticky-submit #submitdiv{left:0 !important;top:46px !important}}@media screen and (max-width: 600px){.sticky-submit #submitdiv{left:0 !important;top:0 !important}}
3
+ .wp-toolbar .sticky-submit #submitdiv{top:32px}.wp-toolbar .sticky-submit #post-body{margin-top:105px}#submitdiv #minor-publishing-actions{text-align:left;padding:20px 10px}#submitdiv #major-publishing-actions{z-index:10;position:relative}#submitdiv .handlediv,#submitdiv .hndle{display:none}#submitdiv .preview{float:none}#submitdiv .status{float:right;position:relative;width:100px;top:-6px}#submitdiv .status>label{float:left;line-height:26px;margin-right:10px}#submitdiv .status-hint-box{float:right}#submitdiv .status-switch{width:40px;margin:0;padding:0;float:left}#submitdiv .status-switch input{position:absolute;left:-3000px;top:-3000px;display:none}#submitdiv .status-switch .label-active,#submitdiv .status-switch .label-inactive{position:absolute;top:18px;right:0;left:0;text-align:left;z-index:0;transition:all .3s}#submitdiv .status-switch .status-box{background:#AAA;border-radius:20px;height:16px;padding:0;cursor:pointer;display:block}#submitdiv .status-switch .status-box .label-active{display:none}#submitdiv .status-switch .status-box .label-inactive{display:block}#submitdiv .status-switch .status-box .indicator{width:10px;height:10px;position:absolute;left:3px;top:3px;background:#FFF;border-radius:20px;transition:right .2s, left .2s}#submitdiv .status-switch input:checked+.status-box{background:#3A3}#submitdiv .status-switch input:checked+.status-box .indicator{left:26px}#submitdiv .status-switch input:checked+.status-box .label-active{display:block}#submitdiv .status-switch input:checked+.status-box .label-inactive{display:none}#submitdiv .preview-action .spinner,#submitdiv .publishing-action .spinner,#submitdiv .save-action .spinner{float:left}#submitdiv .submitdelete.disabled{color:#AAA !important;cursor:default}#submitdiv .delete-action{line-height:28px;vertical-align:middle;text-align:left;float:left}#submitdiv .publishing-action{text-align:right;float:right;line-height:23px}#submitdiv .do-duplicate{margin:0 10px 0 0;line-height:28px;display:inline-block}.post-type-inc_popup #post #post-body-content{height:75px}.post-type-inc_popup #post .columns-2 #postbox-container-1{padding-top:75px}.post-type-inc_popup #post #normal-sortables{min-height:0}.post-type-inc_popup #post #titlediv label{font-weight:bold;margin:5px 0;display:block}.post-type-inc_popup #post #titlediv #po_name{width:100%;max-width:800px}.post-type-inc_popup #post .postbox-container #meta-appearance{float:left;width:49%}@media screen and (max-width: 900px){.post-type-inc_popup #post .postbox-container #meta-appearance{width:100%;float:none}}.post-type-inc_popup #post .postbox-container #meta-behavior{float:right;width:49%}@media screen and (max-width: 900px){.post-type-inc_popup #post .postbox-container #meta-behavior{width:100%;float:none}}.post-type-inc_popup #post .postbox-container #meta-content,.post-type-inc_popup #post .postbox-container #meta-rules{clear:both}.post-type-inc_popup #post .content-main{margin-right:270px;min-height:400px}.post-type-inc_popup #post .content-image{position:absolute;width:250px;top:0;right:12px}.post-type-inc_popup #post .content-image .featured-img{width:224px;height:224px;margin:10px 0;background:#F8F8F8;position:relative}.post-type-inc_popup #post .content-image .featured-img .lbl-empty{display:block;height:224px;padding-top:100px;text-align:center}.post-type-inc_popup #post .content-image .featured-img.has-image:hover .reset{display:block}.post-type-inc_popup #post .content-image img{max-width:100%;max-height:100%;margin:0 auto;display:block}.post-type-inc_popup #post .content-image .reset,.post-type-inc_popup #post .content-image .reset .dashicons{font-size:13px;text-decoration:none}.post-type-inc_popup #post .content-image .reset .dashicons{display:inline}.post-type-inc_popup #post .content-image .reset{position:absolute;display:none;z-index:10;margin-top:-36px;background:rgba(255,255,255,0.85);padding:5px;height:26px;left:0;right:0;bottom:0;color:#666}.post-type-inc_popup #post .content-image .reset:hover{color:#000}.post-type-inc_popup #post .img-pos{text-align:center;margin:10px 0}.post-type-inc_popup #post .img-pos .option{display:inline-block;background:#F1F1F1;padding:12px 10px;text-align:left;margin:2px;cursor:pointer;position:relative;overflow:hidden}.post-type-inc_popup #post .img-pos .option:hover{background:#DDD}.post-type-inc_popup #post .img-pos .option .image{color:#000;padding:4px;display:inline-block;border:1px solid #666;margin:-5px;background:#FFF}.post-type-inc_popup #post .img-pos .option .image.left{margin-right:0}.post-type-inc_popup #post .img-pos .option .image.right{margin-left:0}.post-type-inc_popup #post .img-pos .option.selected{background:#0074A2;color:#FFF}.post-type-inc_popup #post .img-pos .option input{position:absolute;left:-30px;top:-30px}.post-type-inc_popup #post .add_image{padding-left:5px}.post-type-inc_popup #post .add_image .add-image-icon:before{color:#888}.post-type-inc_popup #post h3.main-content{padding-bottom:10px}.post-type-inc_popup #post .wpmui-toggle{width:40px}.post-type-inc_popup #post .wpmui-toggle-label{border:0;height:16px;background:#CCC}.post-type-inc_popup #post .wpmui-toggle-inner{display:none}.post-type-inc_popup #post .wpmui-toggle-switch{margin:3px;width:10px;height:10px;right:24px;border:0;box-shadow:none;transition:right .2s}.post-type-inc_popup #post .wpmui-toggle-checkbox:checked+.wpmui-toggle-label{background:#3A3}.post-type-inc_popup #post .wpmui-toggle-checkbox:checked+.wpmui-toggle-label .wpmui-toggle-switch{right:0}.post-type-inc_popup #post .all-rules-box,.post-type-inc_popup #post .active-rules-box{border:1px solid #E5E5E5;height:400px;padding:10px;overflow:scroll;overflow-x:hidden;overflow-y:scroll;background:#FDFDFD;box-shadow:0 1px 2px #F0F0F0 inset}.post-type-inc_popup #post .all-rules,.post-type-inc_popup #post .active-rules{list-style:none;margin:0;padding:0}.post-type-inc_popup #post .all-rules>li,.post-type-inc_popup #post .active-rules>li{padding:5px;margin:0 0 5px;line-height:20px;min-height:30px;border-radius:2px;border:1px solid #E5E5E5;background:#FEFEFE;cursor:default;position:relative}.post-type-inc_popup #post .all-rules>li:last-child,.post-type-inc_popup #post .active-rules>li:last-child{margin:0}.post-type-inc_popup #post .all-rules>li:hover,.post-type-inc_popup #post .active-rules>li:hover{border-color:#AAA;color:#000;background:#FFF;box-shadow:0 1px 3px #E9E9E9}.post-type-inc_popup #post .all-rules .wpmui-toggle,.post-type-inc_popup #post .active-rules .wpmui-toggle{margin:2px 6px}.post-type-inc_popup #post .all-rules .rule{cursor:pointer}.post-type-inc_popup #post .all-rules .rule.inactive{cursor:default}.post-type-inc_popup #post .all-rules .rule.on{background:#F7FCFE;border-color:#2EA2CC}.post-type-inc_popup #post .active-rules .rule.off{display:none !important}.post-type-inc_popup #post .active-rules .rule-title{background:#E5E5E5;padding:5px;margin:-5px;cursor:pointer}.post-type-inc_popup #post .active-rules .rule-toggle{position:absolute;right:0;top:0;width:30px;height:30px;cursor:pointer;border-left:1px solid #DCDCDC}.post-type-inc_popup #post .active-rules .rule-toggle:before{content:'\f140';line-height:30px;color:#333}.post-type-inc_popup #post .active-rules .rule.open .rule-toggle:before{content:'\f142'}.post-type-inc_popup #post .active-rules .rule-inner{display:none;margin-top:10px;padding:3px}.post-type-inc_popup #post .active-rules .rule-form{margin-top:5px;padding-top:5px}.post-type-inc_popup #post .active-rules .rule.open .rule-inner{display:block}.post-type-inc_popup #post .col-colorpicker{width:41.66%;min-width:260px;margin-bottom:10px}.post-type-inc_popup #post .wp-picker-container{width:260px}.post-type-inc_popup #post .wp-picker-container *{box-sizing:content-box}.post-type-inc_popup #post .wp-picker-container .wp-picker-holder{position:absolute;z-index:10}.post-type-inc_popup #post .wp-picker-container .iris-picker{box-shadow:0 1px 5px rgba(0,0,0,0.2)}.post-type-inc_popup #post hr{margin:16px -12px 6px;border-top:0;border-bottom:1px solid #EEE}.post-type-inc_popup #post .col-all-rules{width:320px}.post-type-inc_popup #post .col-active-rules{float:none;display:block}.post-type-inc_popup #post .wpmui-toggle{float:right;margin:6px}.post-type-inc_popup #post .slider-wrap .slider{margin:15px 10px 5px}.post-type-inc_popup #post .slider-wrap .slider-data{padding-bottom:10px;border-bottom:1px solid #EEE}#poststuff .postbox label h3{border:0;padding:0;cursor:default}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaaaaa;background:#ffffff;color:#222222}.ui-widget-content a{color:#222222}.ui-widget-header{border:1px solid #aaaaaa;background:#cccccc;color:#222222;font-weight:bold}.ui-widget-header a{color:#222222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6;font-weight:normal;color:#555555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999999;background:#dadada;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaaaaa;background:#ffffff;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.pro-only{position:relative;margin:3px 0;clear:both}.pro-only:after{content:' ';display:table;clear:both}.pro-only .pro-note{opacity:0;position:absolute;top:-3px;left:-3px;right:-3px;bottom:-3px;text-align:center;background:rgba(0,0,0,0.6);color:#FFF;font-family:"Source Sans Pro", "Open Sans", sans-serif;font-weight:100;font-size:20px;z-index:9999;transition:opacity .2s}.pro-only .pro-note a{color:#7ed321}.pro-only:hover .pro-note{opacity:1}
css/tpl/cabriolet/style.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ $info->name = __( 'Cabriolet', PO_LANG );
3
+ $info->pro = true;
css/tpl/minimal/style.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ $info->name = __( 'Minimal', PO_LANG );
3
+ $info->pro = true;
{popoverincludes/css/default/images → css/tpl/old-default/img}/closemessage.png RENAMED
File without changes
{popoverincludes/css/default/images → css/tpl/old-default/img}/closemessagebland.png RENAMED
File without changes
{popoverincludes/css/default/images → css/tpl/old-default/img}/loading.gif RENAMED
File without changes
{popoverincludes/css/default/images → css/tpl/old-default/img}/opaque.png RENAMED
File without changes
css/tpl/old-default/style.css ADDED
@@ -0,0 +1 @@
 
1
+ #messagebox{position:absolute;background:transparent url(%styleurl%img/opaque.png) repeat;padding:10px;visibility:visible;z-index:999999}#messagebox .claimbutton{position:absolute;bottom:0;right:0;width:100%;background:transparent url(%styleurl%img/opaque.png) repeat;text-align:right;padding-top:5px;padding-bottom:5px;display:none}#messagebox .claimbutton a:visited,#messagebox .claimbutton a{font-family:"Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;color:#FFF;text-shadow:#000 1px 1px 0px;font-weight:bold;padding-right:5px}#messagebox .wdpu-close{position:absolute;width:30px;height:29px;background:transparent url(%styleurl%img/closemessagebland.png) no-repeat;top:-5px;left:-5px;z-index:5}#messagebox .wdpu-msg{position:relative;background:#fff;font:0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;line-height:normal;height:100%;overflow:hidden}#messagebox .wdpu-msg.waiting{background:#fff url(%styleurl%img/loading.gif) no-repeat center center}#messagebox .wdpu-msg p{position:relative;clear:both}#messagebox .wdpu-msg h2{color:#000;font:bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;margin-top:0px}#messagebox .wdpu-msg h2 a{text-decoration:none;color:#000}#messagebox .wdpu-msg blockquote{padding:0px;font-weight:bold;border-left:5px solid #ccc}#messagebox .wdpu-msg blockquote p{padding:2px 5px}#messagebox .clear{clear:both}#messagebox .hide{display:none}#messagebox:hover .claimbutton{display:block}.wp-admin #messagebox{font-size:16px}
css/tpl/old-default/style.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ $info->name = __( 'Default', PO_LANG );
3
+ $info->deprecated = true;
css/tpl/old-default/template.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File is included inside an IncPopupItem object.
4
+ * All variables of the object are available in this template.
5
+ */
6
+
7
+ $msg_class = '';
8
+ // Compatibility mode to keep formatting of old PopUps (not used in new styles)
9
+ $content = stripslashes( $this->content );
10
+ $msg_class .= 'wdpu-' . $this->id . ' ';
11
+
12
+ if ( defined( 'PO_ALLOW_CONTENT_FILTERING' ) && PO_ALLOW_CONTENT_FILTERING ) {
13
+ $content = defined( 'PO_USE_FULL_CONTENT_FILTERING' ) && PO_USE_FULL_CONTENT_FILTERING
14
+ ? apply_filters( 'the_content', stripslashes( $content ) )
15
+ : wptexturize( wpautop( $content ) );
16
+ }
17
+
18
+ ?>
19
+
20
+ <div id="<?php echo esc_attr( $this->code->id ); ?>"
21
+ class="<?php echo esc_attr( $msg_class ); ?>"
22
+ style="left: -1000px; top: 100px; display: none;">
23
+
24
+ <a href="#" class="wdpu-close" title="<?php _e( 'Close this box', PO_LANG ); ?>"></a>
25
+ <div id="message" class="wdpu-msg resize" style="<?php echo esc_attr( $this->code->colors ); ?>">
26
+
27
+ <?php echo '' . $content; ?>
28
+
29
+ <div class="clear"></div>
30
+ <?php if ( $this->can_hide ) : ?>
31
+ <div class="claimbutton hide">
32
+ <a href="#" class="wdpu-hide-forever">
33
+ <?php _e( 'Never see this message again.', PO_LANG ); ?>
34
+ </a>
35
+ </div>
36
+ <?php endif; ?>
37
+ </div>
38
+ <div class="clear"></div>
39
+
40
+ </div>
{popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/closemessage.png RENAMED
File without changes
{popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/closemessagebland.png RENAMED
File without changes
{popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/loading.gif RENAMED
File without changes
{popoverincludes/css/fixed/images → css/tpl/old-fixed/img}/opaque.png RENAMED
File without changes
css/tpl/old-fixed/style.css ADDED
@@ -0,0 +1 @@
 
1
+ #messagebox{position:fixed;background:transparent url(%styleurl%img/opaque.png) repeat;padding:10px;visibility:visible;z-index:999999}#messagebox .claimbutton{position:absolute;bottom:0;right:0;width:100%;background:transparent url(%styleurl%img/opaque.png) repeat;text-align:right;padding-top:5px;padding-bottom:5px;display:none}#messagebox .claimbutton a:visited,#messagebox .claimbutton a{font-family:"Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;color:#FFF;text-shadow:#000 1px 1px 0px;font-weight:bold;padding-right:5px}#messagebox .wdpu-close{position:absolute;width:30px;height:29px;background:transparent url(%styleurl%img/closemessagebland.png) no-repeat;top:-5px;left:-5px;z-index:5}#messagebox .wdpu-msg{position:relative;background:#fff;font:0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;line-height:normal;height:100%;overflow:hidden}#messagebox .wdpu-msg.waiting{background:#fff url(%styleurl%img/loading.gif) no-repeat center center}#messagebox .wdpu-msg p{position:relative;clear:both}#messagebox .wdpu-msg h2{color:#000;font:bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;margin-top:0px}#messagebox .wdpu-msg h2 a{text-decoration:none;color:#000}#messagebox .wdpu-msg blockquote{padding:0px;font-weight:bold;border-left:5px solid #ccc}#messagebox .wdpu-msg blockquote p{padding:2px 5px}#messagebox .clear{clear:both}#messagebox .hide{display:none}#messagebox:hover .claimbutton{display:block}.wp-admin #messagebox{font-size:16px}
css/tpl/old-fixed/style.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ $info->name = __( 'Default Fixed', PO_LANG );
3
+ $info->deprecated = true;
css/tpl/old-fixed/template.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File is included inside an IncPopupItem object.
4
+ * All variables of the object are available in this template.
5
+ */
6
+
7
+ $msg_class = '';
8
+ // Compatibility mode to keep formatting of old PopUps (not used in new styles)
9
+ $content = stripslashes( $this->content );
10
+ $msg_class .= 'wdpu-' . $this->id . ' ';
11
+
12
+ if ( defined( 'PO_ALLOW_CONTENT_FILTERING' ) && PO_ALLOW_CONTENT_FILTERING ) {
13
+ $content = defined( 'PO_USE_FULL_CONTENT_FILTERING' ) && PO_USE_FULL_CONTENT_FILTERING
14
+ ? apply_filters( 'the_content', stripslashes( $content ) )
15
+ : wptexturize( wpautop( $content ) );
16
+ }
17
+
18
+ ?>
19
+
20
+ <div id="<?php echo esc_attr( $this->code->id ); ?>"
21
+ class="<?php echo esc_attr( $msg_class ); ?>"
22
+ style="left: -1000px; top: 100px; display: none;">
23
+
24
+ <a href="#" class="wdpu-close" title="<?php _e( 'Close this box', PO_LANG ); ?>"></a>
25
+ <div id="message" class="wdpu-msg resize" style="<?php echo esc_attr( $this->code->colors ); ?>">
26
+
27
+ <?php echo '' . $content; ?>
28
+
29
+ <div class="clear"></div>
30
+ <?php if ( $this->can_hide ) : ?>
31
+ <div class="claimbutton hide">
32
+ <a href="#" class="wdpu-hide-forever">
33
+ <?php _e( 'Never see this message again.', PO_LANG ); ?>
34
+ </a>
35
+ </div>
36
+ <?php endif; ?>
37
+ </div>
38
+ <div class="clear"></div>
39
+
40
+ </div>
{popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/closemessage.png RENAMED
File without changes
{popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/closemessagebland.png RENAMED
File without changes
{popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/loading.gif RENAMED
File without changes
{popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/opaque.png RENAMED
File without changes
{popoverincludes/css/fullbackground/images → css/tpl/old-fullbackground/img}/opaque80.png RENAMED
File without changes
css/tpl/old-fullbackground/style.css ADDED
@@ -0,0 +1 @@
 
1
+ #darkbackground{position:fixed;background:transparent url(%styleurl%img/opaque80.png) repeat;top:0;width:100%;left:0;height:100%;z-index:99999;visibility:visible}#messagebox{position:absolute;background:transparent url(%styleurl%img/opaque.png) repeat;padding:10px;visibility:visible;z-index:999999}#messagebox .claimbutton{position:absolute;bottom:0;right:0;width:100%;background:transparent url(%styleurl%img/opaque.png) repeat;text-align:right;padding-top:5px;padding-bottom:5px;display:none}#messagebox .claimbutton a:visited,#messagebox .claimbutton a{font-family:"Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;color:#FFF;text-shadow:#000 1px 1px 0px;font-weight:bold;padding-right:5px}#messagebox .wdpu-msg{position:relative;background:#fff;font:0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;line-height:normal;height:100%;overflow:hidden}#messagebox .wdpu-msg.waiting{background:#fff url(%styleurl%img/loading.gif) no-repeat center center}#messagebox .wdpu-msg p{position:relative;clear:both}#messagebox .wdpu-msg h2{color:#000;font:bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;margin-top:0px}#messagebox .wdpu-msg h2 a{text-decoration:none;color:#000}#messagebox .wdpu-msg blockquote{padding:0px;font-weight:bold;border-left:5px solid #ccc}#messagebox .wdpu-msg blockquote p{padding:2px 5px}#messagebox .wdpu-close{position:absolute;width:30px;height:29px;background:transparent url(%styleurl%img/closemessagebland.png) no-repeat;top:-5px;left:-5px;z-index:5}#messagebox .clear{clear:both}#messagebox .hide{display:none}#messagebox:hover .claimbutton{display:block}.wp-admin #messagebox{font-size:16px}
css/tpl/old-fullbackground/style.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ $info->name = __( 'Dark Background Fixed', PO_LANG );
3
+ $info->deprecated = true;
css/tpl/old-fullbackground/template.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File is included inside an IncPopupItem object.
4
+ * All variables of the object are available in this template.
5
+ */
6
+
7
+ $msg_class = '';
8
+ // Compatibility mode to keep formatting of old PopUps (not used in new styles)
9
+ $content = stripslashes( $this->content );
10
+ $msg_class .= 'wdpu-' . $this->id . ' ';
11
+
12
+ if ( defined( 'PO_ALLOW_CONTENT_FILTERING' ) && PO_ALLOW_CONTENT_FILTERING ) {
13
+ $content = defined( 'PO_USE_FULL_CONTENT_FILTERING' ) && PO_USE_FULL_CONTENT_FILTERING
14
+ ? apply_filters( 'the_content', stripslashes( $content ) )
15
+ : wptexturize( wpautop( $content ) );
16
+ }
17
+
18
+ ?>
19
+ <div id="darkbackground" class="wdpu-background" style="display: none">
20
+ <div id="<?php echo esc_attr( $this->code->id ); ?>"
21
+ class="<?php echo esc_attr( $msg_class ); ?>"
22
+ style="left: -1000px; top: 100px;">
23
+
24
+ <a href="#" class="wdpu-close" title="<?php _e( 'Close this box', PO_LANG ); ?>"></a>
25
+ <div id="message" class="wdpu-msg resize" style="<?php echo esc_attr( $this->code->colors ); ?>">
26
+
27
+ <?php echo '' . $content; ?>
28
+
29
+ <div class="clear"></div>
30
+ <?php if ( $this->can_hide ) : ?>
31
+ <div class="claimbutton hide">
32
+ <a href="#" class="wdpu-hide-forever">
33
+ <?php _e( 'Never see this message again.', PO_LANG ); ?>
34
+ </a>
35
+ </div>
36
+ <?php endif; ?>
37
+ </div>
38
+ <div class="clear"></div>
39
+
40
+ </div>
41
+ </div>
css/tpl/simple/img/close.png ADDED
Binary file
css/tpl/simple/img/close@2x.png ADDED
Binary file
css/tpl/simple/style.css ADDED
@@ -0,0 +1 @@
 
1
+ .has-popup{overflow:hidden}.has-popup body{overflow:hidden}#messagebox{position:fixed;z-index:100000;top:0;left:0;right:0;bottom:0;overflow:auto;background:rgba(0,0,0,0.5);padding:0 54px 0 50px}#messagebox.custom-size{padding:0}#messagebox.custom-size .wdpu-msg{position:absolute;display:inline-block;margin:0 0 30px}#messagebox .wdpu-msg{position:relative;display:block;margin:0 auto 30px;text-align:left;padding:5px;background-color:rgba(255,255,255,0.5);box-shadow:0 2px 40px rgba(0,0,0,0.3);font-size:15px;max-width:800px;min-width:100px}#messagebox .wdpu-msg p{font-size:15px}#messagebox .wdpu-msg p:first-child{margin-top:0}#messagebox .wdpu-msg p:last-child{margin-bottom:0}#messagebox .wdpu-msg .wdpu-close{position:absolute;top:-12px;right:-12px;width:30px;height:30px;text-decoration:none;opacity:.9;z-index:10;background:transparent url(%styleurl%img/close.png) no-repeat}@media only screen and (-webkit-min-device-pixel-ratio: 2){#messagebox .wdpu-msg .wdpu-close{background:transparent url(%styleurl%img/close@2x.png) no-repeat;background-size:30px 30px}}#messagebox .wdpu-msg .wdpu-close:hover{opacity:1}#messagebox .wdpu-msg-inner{margin:0px auto;background:#F2F2F2;position:relative;z-index:1;overflow:hidden;height:100%}#messagebox .wdpu-msg-inner.custom-size{max-width:none;min-width:0}#messagebox .wdpu-msg-inner .wdpu-text,#messagebox .wdpu-msg-inner .wdpu-image{vertical-align:middle;display:inline-block;box-sizing:border-box}#messagebox .wdpu-msg-inner .wdpu-text{padding:20px 20px 64px;background:#F2F2F2;position:relative;z-index:10;height:100%}#messagebox .wdpu-msg-inner .wdpu-image{position:absolute;top:0;bottom:0;overflow:hidden;z-index:-1}#messagebox .wdpu-msg-inner .wdpu-image img{height:100%;width:auto;position:relative}#messagebox .wdpu-msg-inner .wdpu-inner{overflow:auto;height:100%}#messagebox .wdpu-msg-inner .wdpu-inner.no-bm{margin:0}#messagebox .wdpu-msg-inner .wdpu-buttons{position:absolute;padding:20px;height:24px;margin:0 -20px -20px;white-space:nowrap}#messagebox a{color:#000001;text-decoration:underline;opacity:.9}#messagebox a:visited{color:#000001}#messagebox a:hover,#messagebox a:active,#messagebox a:focus{color:#000001;opacity:1}#messagebox .wdpu-head{border-bottom:1px solid #DDD;padding-bottom:.5em;margin-bottom:1em}#messagebox .wdpu-title,#messagebox .wdpu-subtitle{font-size:22.5px;line-height:1.3em;margin:0 0 .5em 0;color:#000001}#messagebox .wdpu-title{font-weight:bold}#messagebox .wdpu-subtitle{font-weight:100}#messagebox .wdpu-cta{line-height:1.2em;padding:10px 30px;opacity:.9;margin:0 20px 0 0;text-decoration:none;background:#000001;color:#000002}#messagebox .wdpu-cta:visited{color:#000002}#messagebox .wdpu-cta:hover,#messagebox .wdpu-cta:active,#messagebox .wdpu-cta:focus{color:#000002;opacity:1}#messagebox .wdpu-text{margin:0 40% 0 0;width:60%}#messagebox .wdpu-image{text-align:right;right:0;width:40%}#messagebox.img-left .wdpu-text{margin:0 0 0 40%;margin-right:0;width:60%}#messagebox.img-left .wdpu-image{text-align:left;right:auto;left:0}#messagebox.no-img .wdpu-text{margin:0;width:100%}#messagebox.no-img .wdpu-image{display:none}#messagebox.rounded .wdpu-cta{border-radius:5px}#messagebox.rounded .wdpu-msg{border-radius:10px}#messagebox.rounded .wdpu-msg-inner{border-radius:6px}@media screen and (max-width: 770px) and (min-width: 480px){#messagebox{padding:0 54px 0 50px}#messagebox .wdpu-image,#messagebox.img-right .wdpu-image,#messagebox.img-left .wdpu-image,#messagebox.no-img .wdpu-image{width:100%;position:relative;display:block;max-height:250px}#messagebox .wdpu-image img,#messagebox.img-right .wdpu-image img,#messagebox.img-left .wdpu-image img,#messagebox.no-img .wdpu-image img{height:auto;width:100%}#messagebox .wdpu-text,#messagebox.img-right .wdpu-text,#messagebox.img-left .wdpu-text,#messagebox.no-img .wdpu-text{margin:0;width:100%;padding-top:15px}#messagebox .wdpu-head,#messagebox.img-right .wdpu-head,#messagebox.img-left .wdpu-head,#messagebox.no-img .wdpu-head{margin-bottom:.5em;padding-bottom:.4em}#messagebox .wdpu-title,#messagebox .wdpu-subtitle,#messagebox.img-right .wdpu-title,#messagebox.img-right .wdpu-subtitle,#messagebox.img-left .wdpu-title,#messagebox.img-left .wdpu-subtitle,#messagebox.no-img .wdpu-title,#messagebox.no-img .wdpu-subtitle{margin-bottom:.2em}#messagebox p,#messagebox.img-right p,#messagebox.img-left p,#messagebox.no-img p{margin-bottom:16px}#messagebox.mobile-no-img .wdpu-image{display:none}}@media screen and (max-width: 480px){#messagebox{padding:0 14px 0 10px}#messagebox .wdpu-image,#messagebox.img-right .wdpu-image,#messagebox.img-left .wdpu-image,#messagebox.no-img .wdpu-image{width:100%;position:relative;display:block;max-height:150px}#messagebox .wdpu-image img,#messagebox.img-right .wdpu-image img,#messagebox.img-left .wdpu-image img,#messagebox.no-img .wdpu-image img{height:auto;width:100%}#messagebox .wdpu-text,#messagebox.img-right .wdpu-text,#messagebox.img-left .wdpu-text,#messagebox.no-img .wdpu-text{margin:0;width:100%;padding-top:10px}#messagebox .wdpu-head,#messagebox.img-right .wdpu-head,#messagebox.img-left .wdpu-head,#messagebox.no-img .wdpu-head{margin-bottom:.3em;padding-bottom:.2em}#messagebox .wdpu-title,#messagebox .wdpu-subtitle,#messagebox.img-right .wdpu-title,#messagebox.img-right .wdpu-subtitle,#messagebox.img-left .wdpu-title,#messagebox.img-left .wdpu-subtitle,#messagebox.no-img .wdpu-title,#messagebox.no-img .wdpu-subtitle{margin-bottom:.2em}#messagebox p,#messagebox.img-right p,#messagebox.img-left p,#messagebox.no-img p{margin-bottom:8px}#messagebox.mobile-no-img .wdpu-image{display:none}}
css/tpl/simple/style.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ $info->name = __( 'Simple', PO_LANG );
css/tpl/simple/template.php ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * File is included inside an IncPopupItem object.
4
+ * All variables of the object are available in this template.
5
+ */
6
+
7
+ $has_title = ! empty( $this->title );
8
+ $has_subtitle = ! empty( $this->subtitle );
9
+ $has_cta = ! empty( $this->cta_label ) && ! empty( $this->cta_link );
10
+ $has_img = ! empty( $this->image );
11
+ $has_buttons = $has_cta || $this->can_hide;
12
+
13
+ if ( ! $this->image_mobile && wp_is_mobile() ) { $has_img = false; }
14
+
15
+ $msg_class = '';
16
+ if ( $has_img ) {
17
+ $img_left = ($this->image_pos == 'left');
18
+ $msg_class .= 'img-' . $this->image_pos . ' ';
19
+ } else {
20
+ $msg_class .= 'no-img ';
21
+ }
22
+ if ( $this->is_preview ) {
23
+ $msg_class .= 'preview ';
24
+ if ( ! $this->image_mobile ) {
25
+ $msg_class .= 'mobile-no-img ';
26
+ }
27
+ }
28
+ if ( $has_buttons ) {
29
+ $msg_class .= 'buttons ';
30
+ }
31
+ if ( $this->round_corners ) { $msg_class .= 'rounded '; }
32
+ if ( $this->custom_size ) { $msg_class .= 'custom-size '; }
33
+ $msg_class .= 'wdpu-' . $this->id . ' ';
34
+
35
+ $move_class = $this->custom_size ? '' : 'no-move-x';
36
+
37
+ ?>
38
+ <div id="<?php echo esc_attr( $this->code->id ); ?>"
39
+ class="style-simple wdpu-container wdpu-background <?php echo esc_attr( $msg_class ); ?>"
40
+ style="display: none;">
41
+
42
+ <div class="wdpu-msg resize move <?php echo esc_attr( $move_class ); ?>">
43
+ <a href="#" class="wdpu-close" title="<?php _e( 'Close this box', PO_LANG ); ?>"></a>
44
+
45
+ <div class="wdpu-msg-inner resize">
46
+ <?php if ( $has_img && $img_left ) : ?>
47
+ <div class="wdpu-image">
48
+ <img src="<?php echo esc_url( $this->image ); ?>" />
49
+ </div>
50
+ <?php endif; ?>
51
+
52
+ <div class="wdpu-text">
53
+ <div class="wdpu-inner <?php if ( ! $has_buttons ) { echo esc_attr( 'no-bm' ); } ?>">
54
+ <?php if ( $has_title || $has_subtitle ) : ?>
55
+ <div class="wdpu-head">
56
+ <?php if ( $has_title ) : ?>
57
+ <div class="wdpu-title">
58
+ <?php echo esc_html( $this->title ); ?>
59
+ </div>
60
+ <?php endif; ?>
61
+ <?php if ( $has_subtitle ) : ?>
62
+ <div class="wdpu-subtitle">
63
+ <?php echo esc_html( $this->subtitle ); ?>
64
+ </div>
65
+ <?php endif; ?>
66
+ </div>
67
+ <?php endif; ?>
68
+ <div class="wdpu-content">
69
+ <?php echo '' . apply_filters( 'the_content', $this->content ); ?>
70
+ </div>
71
+ </div>
72
+
73
+ <?php if ( $has_buttons ) : ?>
74
+ <div class="wdpu-buttons">
75
+ <?php if ( $has_cta ) : ?>
76
+ <a href="<?php echo esc_url( $this->cta_link ); ?>" class="wdpu-cta">
77
+ <?php echo esc_html( $this->cta_label ); ?>
78
+ </a>
79
+ <?php endif; ?>
80
+
81
+ <?php if ( $this->can_hide ) : ?>
82
+ <a href="#" class="wdpu-hide-forever">
83
+ <?php _e( 'Never see this message again.', PO_LANG ); ?>
84
+ </a>
85
+ <?php endif; ?>
86
+ </div>
87
+ <?php endif; ?>
88
+ </div>
89
+
90
+ <?php if ( $has_img && ! $img_left ) : ?>
91
+ <div class="wdpu-image">
92
+ <img src="<?php echo esc_url( $this->image ); ?>" />
93
+ </div>
94
+ <?php endif; ?>
95
+ </div>
96
+ </div>
97
+ </div>
humans.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* TEAM */
2
+ Developer: Barry
3
+ Contact:
4
+ Twitter: @caffeinatedwp
5
+ Location:
6
+
7
+ Developer: Marko Miljus
8
+ Location: Novi Sad, Serbia
9
+ Contact: marko [at] incsub [dot] com
10
+ Twitter: @markomiljus
11
+
12
+ Developer: Ve Bailovity
13
+ Contact: ve [at] incsub [dot] com
14
+ Twitter: @vebailovity
15
+ Location: Zrenjanin, Serbia
img/icon.png ADDED
Binary file
inc/addons/class-popup-addon-anonymous.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Addon Name: Anonymous loading method
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Yet another loading method.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Setting
9
+ Version: 1.0
10
+ */
inc/addons/class-popup-addon-geo-db.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Addon Name: Use Local Geo Database
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Switches the geo checking from using an external API to using a local database
6
+ Author: Barry (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Caching
9
+ Version: 1.0
10
+ */
11
+
12
+ class IncPopupAddon_GeoDB {
13
+
14
+ /**
15
+ * Initialize the addon.
16
+ *
17
+ * @since 4.6
18
+ */
19
+ static public function init() {
20
+ }
21
+ };
inc/addons/class-popup-addon-headerfooter.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Addon Name: Test Head Footer
4
+ Plugin URI: http://gist.github.com/378450
5
+ Description: Tests for the existence and functionality of wp_head and wp_footer in the active theme.
6
+ Author: Matt Martz
7
+ Author URI: http://sivel.net/
8
+ Type: Misc
9
+ Version: 1.1
10
+
11
+ Copyright (c) 2010 Matt Martz (http://sivel.net/)
12
+ Test Head Footer is released under the GNU General Public License (GPL)
13
+ http://www.gnu.org/licenses/gpl-2.0.txt
14
+ */
15
+
16
+ class IncPopupAddon_HeaderFooter {
17
+
18
+ /**
19
+ * Initialize the addon.
20
+ *
21
+ * @since 4.6
22
+ */
23
+ static public function init() {
24
+ // If test-head query var exists hook into wp_head
25
+ if ( isset( $_GET['test-head'] ) ) {
26
+ add_action(
27
+ 'wp_head',
28
+ array( __CLASS__, 'test_head' ),
29
+ 99999 // Some obscene priority, make sure we run last
30
+ );
31
+ }
32
+
33
+ // If test-footer query var exists hook into wp_footer
34
+ if ( isset( $_GET['test-footer'] ) ) {
35
+ add_action(
36
+ 'wp_footer',
37
+ array( __CLASS__, 'test_footer' ),
38
+ 99999 // Some obscene priority, make sure we run last
39
+ );
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Echo a string that we can search for later into the head of the document
45
+ * This should end up appearing directly before </head>
46
+ *
47
+ * @since 1.0.0
48
+ */
49
+ static public function test_head() {
50
+ self::test_shortcodes();
51
+ echo '<!--wp_head-->';
52
+ }
53
+
54
+ /**
55
+ * Echo a string that we can search for later into the footer of the document
56
+ * This should end up appearing directly before </body>
57
+ *
58
+ * @since 1.0.0
59
+ */
60
+ static public function test_footer() {
61
+ self::test_shortcodes();
62
+ echo '<!--wp_footer-->';
63
+ }
64
+
65
+ /**
66
+ * Echo a list of all available shortcodes.
67
+ * This is used to check which shortcodes are available for loading method
68
+ * 'Page Footer'
69
+ *
70
+ * @since 1.1
71
+ */
72
+ static public function test_shortcodes() {
73
+ global $shortcode_tags;
74
+ $shortcodes = array_keys( $shortcode_tags );
75
+ echo '<!--shortcodes:[' . implode( ',', $shortcodes ) . ']-->';
76
+ }
77
+
78
+ /**
79
+ * Check for the existence of the strings where wp_head and wp_footer should
80
+ * have been called from.
81
+ *
82
+ * This is loading the front-page of the current installation via
83
+ * wp_remove_get and then parses the resonse to see if the header/footer
84
+ * comments exist in the HTML code.
85
+ *
86
+ * @since 1.0.0
87
+ */
88
+ static public function check() {
89
+ // Build the url to call, NOTE: uses home_url and thus requires WordPress 3.0
90
+ $url = add_query_arg(
91
+ array( 'test-head' => '', 'test-footer' => '' ),
92
+ home_url()
93
+ );
94
+
95
+ // Perform the HTTP GET ignoring SSL errors
96
+ $response = wp_remote_get(
97
+ $url,
98
+ array( 'sslverify' => false )
99
+ );
100
+
101
+ // Grab the response code and make sure the request was sucessful
102
+ $code = (int) wp_remote_retrieve_response_code( $response );
103
+
104
+ if ( $code !== 200 ) { return; }
105
+
106
+ $resp = (object) array(
107
+ 'okay' => false,
108
+ 'msg' => array(),
109
+ 'shortcodes' => array(),
110
+ );
111
+
112
+ // Strip all tabs, line feeds, carriage returns and spaces
113
+ $html = preg_replace(
114
+ '/[\t\r\n\s]/',
115
+ '',
116
+ wp_remote_retrieve_body( $response )
117
+ );
118
+
119
+ if ( ! strstr( $html, '<!--wp_head-->' ) ) {
120
+ // wp_head is missing
121
+ $resp->msg[] = __(
122
+ 'Critical: Call to <code>wp_head();</code> is missing! It ' .
123
+ 'should appear directly before <code>&lt;/head&gt;</code>', PO_LANG
124
+ );
125
+ } else if ( ! strstr( $html, '<!--wp_head--></head>' ) ) {
126
+ // wp_head is not in correct location.
127
+ $resp->msg[] = __(
128
+ 'Notice: Call to <code>wp_head();</code> exists but it is ' .
129
+ 'not called directly before <code>&lt;/head&gt;</code>', PO_LANG
130
+ );
131
+ }
132
+
133
+ if ( ! strstr( $html, '<!--wp_footer-->' ) ) {
134
+ // wp_footer is missing.
135
+ $resp->msg[] = __(
136
+ 'Critical: Call to <code>wp_footer();</code> is missing! It ' .
137
+ 'should appear directly before <code>&lt;/body&gt;</code>', PO_LANG
138
+ );
139
+ } else if ( ! strstr( $html, '<!--wp_footer--></body>' ) ) {
140
+ // wp_footer is not in correct location.
141
+ $resp->msg[] = __(
142
+ 'Notice: Call to <code>wp_footer();</code> exists but it is ' .
143
+ 'not called directly before <code>&lt;/body&gt;</code>', PO_LANG
144
+ );
145
+ }
146
+
147
+ $matches = array();
148
+ $has_shortcodes = preg_match( '/<!--shortcodes:\[([^\]]*)\]-->/', $html, $matches );
149
+ if ( $has_shortcodes ) {
150
+ $items = $matches[1];
151
+ $resp->shortcodes = explode( ',', $items );
152
+ }
153
+
154
+ // Display any errors that we found.
155
+ if ( empty( $resp->msg ) ) {
156
+ $resp->okay = true;
157
+ $resp->msg[] = __(
158
+ 'Okay: Your current theme uses <code>wp_head();</code> and ' .
159
+ '<code>wp_footer();</code> correctly!', PO_LANG
160
+ );
161
+ }
162
+
163
+ return $resp;
164
+ }
165
+ };
166
+
167
+ IncPopupAddon_HeaderFooter::init();
inc/class-popup-admin.php ADDED
@@ -0,0 +1,1101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Load dependencies.
3
+ require_once PO_INC_DIR . 'class-popup-base.php';
4
+
5
+ /**
6
+ * Defines the popup class for admin pages.
7
+ *
8
+ * @since 4.6
9
+ */
10
+ class IncPopup extends IncPopupBase {
11
+
12
+ /**
13
+ * Returns the singleton instance of the popup (admin) class.
14
+ *
15
+ * @since 4.6
16
+ */
17
+ static public function instance() {
18
+ static $Inst = null;
19
+
20
+ if ( null === $Inst ) {
21
+ $Inst = new IncPopup();
22
+ }
23
+
24
+ return $Inst;
25
+ }
26
+
27
+ /**
28
+ * Private constructor (singleton)
29
+ *
30
+ * @since 4.6
31
+ */
32
+ protected function __construct() {
33
+ parent::__construct();
34
+
35
+ // Add admin menus.
36
+ add_action(
37
+ 'admin_menu',
38
+ array( 'IncPopup', 'admin_menus' )
39
+ );
40
+
41
+ add_action(
42
+ 'network_admin_menu',
43
+ array( 'IncPopup', 'admin_menus' )
44
+ );
45
+
46
+ // Initialize hooks that are used only in the current module.
47
+ add_action(
48
+ 'current_screen',
49
+ array( 'IncPopup', 'setup_module_specific' )
50
+ );
51
+
52
+ // Handles all admin ajax requests.
53
+ add_action(
54
+ 'wp_ajax_po-ajax',
55
+ array( 'IncPopup', 'handle_ajax' )
56
+ );
57
+
58
+ // Every time a popup is changed we validate "order" value of all popups.
59
+ add_action(
60
+ 'save_post_' . IncPopupItem::POST_TYPE,
61
+ array( 'IncPopup', 'post_check_order' ),
62
+ 99, 3
63
+ );
64
+
65
+ // -- SETTINGS --------------------------
66
+
67
+ // Save changes from settings page.
68
+ add_action(
69
+ 'load-inc_popup_page_settings',
70
+ array( 'IncPopup', 'handle_settings_update' )
71
+ );
72
+ }
73
+
74
+ /**
75
+ * Initializes stuff that is only needed on the plugin screen
76
+ *
77
+ * @since 4.6
78
+ */
79
+ static public function setup_module_specific( $hook ) {
80
+ if ( IncPopupItem::POST_TYPE === @$hook->post_type ) {
81
+ // WordPress core scripts
82
+ WDev()->add_js( 'jquery-ui-slider' );
83
+ WDev()->add_js( 'jquery-ui-sortable' );
84
+
85
+ WDev()->add_ui( 'core' );
86
+ WDev()->add_ui( 'select' );
87
+
88
+ WDev()->add_ui( PO_CSS_URL . 'popup-admin.css' );
89
+ WDev()->add_ui( PO_JS_URL . 'popup-admin.min.js' );
90
+ WDev()->add_ui( PO_JS_URL . 'public.min.js' ); // For Preview.
91
+
92
+ if ( @$_REQUEST['post_status'] != 'trash' ) {
93
+ WDev()->add_data(
94
+ 'po_bulk',
95
+ array(
96
+ 'activate' => __( 'Activate', PO_LANG ),
97
+ 'deactivate' => __( 'Deactivate', PO_LANG ),
98
+ 'toggle' => __( 'Toggle activation', PO_LANG ),
99
+ )
100
+ );
101
+ }
102
+
103
+ // For Preview
104
+ WDev()->add_data(
105
+ '_popup_data',
106
+ array(
107
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
108
+ 'do' => 'get-data',
109
+ 'popup' => '',
110
+ 'noinit' => true,
111
+ 'preview' => true,
112
+ )
113
+ );
114
+
115
+
116
+ // -- PopUp LIST -----------------------
117
+
118
+ if ( 'edit' === @$hook->base ) {
119
+ // Customize the columns in the popup list.
120
+ add_filter(
121
+ 'manage_' . IncPopupItem::POST_TYPE . '_posts_columns',
122
+ array( 'IncPopup', 'post_columns' )
123
+ );
124
+
125
+ // Returns the content for the custom columns.
126
+ add_action(
127
+ 'manage_' . IncPopupItem::POST_TYPE . '_posts_custom_column',
128
+ array( 'IncPopup', 'post_column_content' ),
129
+ 10, 2
130
+ );
131
+
132
+ // Defines the Quick-Filters above the popup table
133
+ add_filter(
134
+ 'views_edit-' . IncPopupItem::POST_TYPE,
135
+ array( 'IncPopup', 'post_views' )
136
+ );
137
+
138
+ // Defines the Bulk-Actions (available in the select box)
139
+ add_filter(
140
+ 'bulk_actions-edit-' . IncPopupItem::POST_TYPE,
141
+ array( 'IncPopup', 'post_actions' )
142
+ );
143
+
144
+ // Add our own PopUp update messages.
145
+ add_filter(
146
+ 'bulk_post_updated_messages',
147
+ array( 'IncPopup', 'post_update_messages' ),
148
+ 10, 2
149
+ );
150
+
151
+ // Process custom actions in the post-list (e.g. activate/deactivate)
152
+ add_action(
153
+ 'load-edit.php',
154
+ array( 'IncPopup', 'post_list_edit' ),
155
+ 1
156
+ );
157
+
158
+ // Modify the post query to avoid pagination on the popup list.
159
+ add_action(
160
+ 'pre_get_posts',
161
+ array( 'IncPopup', 'post_query' )
162
+ );
163
+
164
+ // Filter should return the custom "items per page" value.
165
+ add_filter(
166
+ 'edit_posts_per_page',
167
+ array( 'IncPopup', 'post_item_per_page' ),
168
+ 10, 2
169
+ );
170
+
171
+ // Remove the posts-per-page filter from screen options.
172
+ add_action(
173
+ 'admin_head',
174
+ array( 'IncPopup', 'post_screenoptions' )
175
+ );
176
+ }
177
+
178
+ // -- PopUp EDITOR -----------------
179
+
180
+ if ( 'post' === @$hook->base ) {
181
+ WDev()->add_css( 'wp-color-picker' ); // WordPress core script
182
+ WDev()->add_js( 'wp-color-picker' ); // WordPress core script
183
+
184
+ // See if a custom action should be executed (e.g. duplicate)
185
+ self::form_check_actions();
186
+
187
+ // Display the "PopUp Title" field in top of the form.
188
+ add_action(
189
+ 'edit_form_after_title',
190
+ array( 'IncPopup', 'form_title' )
191
+ );
192
+
193
+ // Add custom meta-boxes to the popup-editor
194
+ add_action(
195
+ 'add_meta_boxes_' . IncPopupItem::POST_TYPE,
196
+ array( 'IncPopup', 'form_metabox' )
197
+ );
198
+
199
+ // Add custom meta-boxes to the popup-editor
200
+ add_action(
201
+ 'save_post_' . IncPopupItem::POST_TYPE,
202
+ array( 'IncPopup', 'form_save' ),
203
+ 10, 3
204
+ );
205
+ }
206
+ }
207
+ }
208
+
209
+
210
+ /*===================================*\
211
+ =======================================
212
+ == ==
213
+ == GENERAL ADMIN ==
214
+ == ==
215
+ =======================================
216
+ \*===================================*/
217
+
218
+
219
+ /**
220
+ * Register additional menu items in the dashboard.
221
+ *
222
+ * @since 4.6
223
+ */
224
+ static public function admin_menus() {
225
+ // correct_level checks:
226
+ // PO_GLOBAL is true .. We have to be on network-admin/main blog.
227
+ // PO_GLOBAL is false .. we have to be NOT on network-admin.
228
+ if ( ! self::correct_level() ) { return; }
229
+
230
+ if ( is_network_admin() ) {
231
+ if ( 'hide' == @$_REQUEST['popup_network'] ) {
232
+ IncPopupDatabase::set_flag( 'network_dismiss', true );
233
+ wp_safe_redirect( admin_url( 'network' ) );
234
+ die();
235
+ } else if ( 'show' == @$_REQUEST['popup_network'] ) {
236
+ IncPopupDatabase::set_flag( 'network_dismiss', false );
237
+ }
238
+
239
+ if ( true == IncPopupDatabase::get_flag( 'network_dismiss' ) ) {
240
+ return;
241
+ }
242
+
243
+ add_menu_page(
244
+ __( 'PopUp', PO_LANG ),
245
+ __( 'PopUp', PO_LANG ),
246
+ IncPopupPosttype::$perms,
247
+ IncPopupItem::POST_TYPE . '-list',
248
+ array( 'IncPopup', 'network_menu_notice' ),
249
+ PO_IMG_URL . 'icon.png',
250
+ IncPopupPosttype::$menu_pos
251
+ );
252
+
253
+ add_submenu_page(
254
+ IncPopupItem::POST_TYPE . '-list',
255
+ __( 'Add New', PO_LANG ),
256
+ __( 'Add New', PO_LANG ),
257
+ IncPopupPosttype::$perms,
258
+ IncPopupItem::POST_TYPE . '-create',
259
+ array( 'IncPopup', 'network_menu_notice' )
260
+ );
261
+
262
+ add_submenu_page(
263
+ IncPopupItem::POST_TYPE . '-list',
264
+ __( 'Settings', PO_LANG ),
265
+ __( 'Settings', PO_LANG ),
266
+ IncPopupPosttype::$perms,
267
+ IncPopupItem::POST_TYPE . '-settings',
268
+ array( 'IncPopup', 'network_menu_notice' )
269
+ );
270
+
271
+ global $submenu;
272
+ $submenu[IncPopupItem::POST_TYPE . '-list'][0][0] = _x( 'Global PopUps', 'Post Type General Name', PO_LANG );
273
+ } else {
274
+ add_submenu_page(
275
+ 'edit.php?post_type=' . IncPopupItem::POST_TYPE,
276
+ __( 'Settings', PO_LANG ),
277
+ __( 'Settings', PO_LANG ),
278
+ IncPopupPosttype::$perms,
279
+ 'settings',
280
+ array( 'IncPopup', 'handle_settings_page' )
281
+ );
282
+ }
283
+ }
284
+
285
+ /**
286
+ * The Post-Editor does not work on Multisite Network dashboard.
287
+ * So display a notice and tell the user to go to the Main Site.
288
+ *
289
+ * @since 4.6
290
+ */
291
+ static public function network_menu_notice() {
292
+ include PO_VIEWS_DIR . 'network.php';
293
+ }
294
+
295
+ /**
296
+ * Handles all admin ajax calls.
297
+ *
298
+ * @since 4.6
299
+ */
300
+ static public function handle_ajax() {
301
+ $action = @$_POST['do'];
302
+
303
+ switch ( $action ) {
304
+ case 'order':
305
+ $order = explode( ',', @$_POST['order'] );
306
+ self::post_order( $order );
307
+ break;
308
+
309
+ default:
310
+ return;
311
+ }
312
+
313
+ die();
314
+ }
315
+
316
+
317
+ /*==============================*\
318
+ ==================================
319
+ == ==
320
+ == SETTINGS ==
321
+ == ==
322
+ ==================================
323
+ \*==============================*/
324
+
325
+
326
+ /**
327
+ * Displays the settings page
328
+ *
329
+ * @since 4.6
330
+ */
331
+ static public function handle_settings_page() {
332
+ include PO_VIEWS_DIR . 'settings.php';
333
+ }
334
+
335
+ /**
336
+ * Called every time the settings page is loaded. Saves changes.
337
+ *
338
+ * @since 4.6
339
+ */
340
+ static public function handle_settings_update() {
341
+ if ( @$_POST['action'] == 'updatesettings' ) {
342
+ check_admin_referer( 'update-popup-settings' );
343
+
344
+ $settings = array();
345
+ $settings['loadingmethod'] = @$_POST['po_option']['loadingmethod'];
346
+ $settings['geo_db'] = isset( $_POST['po_option']['geo_db'] );
347
+
348
+ $rules = @$_POST['po_option']['rules'];
349
+ if ( ! is_array( $rules ) ) { $rules = array(); }
350
+ $settings['rules'] = array_keys( $rules );
351
+
352
+ IncPopupDatabase::set_settings( $settings );
353
+
354
+ WDev()->message( __( 'Your settings have been updated.', PO_LANG ) );
355
+ $redirect_url = remove_query_arg( array( 'message', 'count' ), wp_get_referer() );
356
+ wp_safe_redirect( $redirect_url );
357
+ die();
358
+ }
359
+ }
360
+
361
+
362
+ /*=================================*\
363
+ =====================================
364
+ == ==
365
+ == PopUp LIST ==
366
+ == ==
367
+ =====================================
368
+ \*=================================*/
369
+
370
+
371
+ /**
372
+ * Filter. Returns the columns for the item list of the popup post-type.
373
+ *
374
+ * @since 4.6
375
+ * @param array $post_columns
376
+ * @return array
377
+ */
378
+ static public function post_columns( $post_columns ) {
379
+
380
+ $new_columns = array();
381
+
382
+ // Only allow re-ordering when ALL popups are visible
383
+ if ( empty( $_REQUEST['s'] ) && empty( $_REQUEST['post_status'] ) ) {
384
+ $new_columns['po_order'] = '';
385
+ }
386
+
387
+ $new_columns['cb'] = $post_columns['cb'];
388
+ $new_columns['po_name'] = __( 'PopUp Name', PO_LANG );
389
+ $new_columns['po_cond'] = __( 'Conditions', PO_LANG );
390
+
391
+ if ( 'trash' != @$_REQUEST['post_status'] ) {
392
+ $new_columns['po_pos'] = __( 'Order', PO_LANG );
393
+ $new_columns['po_state'] = __( 'Active', PO_LANG );
394
+ }
395
+
396
+ return $new_columns;
397
+ }
398
+
399
+ /**
400
+ * Outputs the contents of a specific column.
401
+ *
402
+ * @since 4.6
403
+ * @param string $column The column-key (defined in post_columns above).
404
+ * @param int $post_id The ID of the popup.
405
+ */
406
+ static public function post_column_content( $column, $post_id ) {
407
+ $popup = IncPopupDatabase::get( $post_id );
408
+
409
+ switch ( $column ) {
410
+ case 'po_name':
411
+ $can_edit = current_user_can( 'edit_post', $post_id ) && 'trash' !== $popup->status;
412
+ $post_type_object = get_post_type_object( IncPopupItem::POST_TYPE );
413
+ $actions = array();
414
+
415
+ if ( $can_edit ) {
416
+ $actions['edit'] = array(
417
+ 'url' => get_edit_post_link( $post_id ),
418
+ 'title' => __( 'Edit this PopUp', PO_LANG ),
419
+ 'label' => __( 'Edit', PO_LANG )
420
+ );
421
+ }
422
+
423
+ if ( $can_edit && 'active' === $popup->status ) {
424
+ $the_url = 'edit.php?post_type=%1$s&post_id=%2$s&action=deactivate';
425
+ $the_url = admin_url( sprintf( $the_url, IncPopupItem::POST_TYPE, $post_id ) );
426
+ $the_url = wp_nonce_url( $the_url, 'deactivate-post_' . $post_id );
427
+ $actions['deactivate'] = array(
428
+ 'url' => $the_url,
429
+ 'title' => __( 'Deactivate this PopUp', PO_LANG ),
430
+ 'label' => __( 'Deactivate', PO_LANG )
431
+ );
432
+ }
433
+
434
+ if ( $can_edit && 'inactive' === $popup->status ) {
435
+ $the_url = 'edit.php?post_type=%1$s&post_id=%2$s&action=activate';
436
+ $the_url = admin_url( sprintf( $the_url, IncPopupItem::POST_TYPE, $post_id ) );
437
+ $the_url = wp_nonce_url( $the_url, 'activate-post_' . $post_id );
438
+ $actions['activate'] = array(
439
+ 'url' => $the_url,
440
+ 'title' => __( 'Activate this PopUp', PO_LANG ),
441
+ 'label' => __( 'Activate', PO_LANG )
442
+ );
443
+ }
444
+
445
+ $actions['popup_preview'] = array(
446
+ 'url' => '#',
447
+ 'title' => __( 'Preview this PopUp', PO_LANG ),
448
+ 'attr' => 'class="po-preview" data-id="' . $post_id . '"',
449
+ 'label' => __( 'Preview', PO_LANG )
450
+ );
451
+
452
+ if ( current_user_can( 'delete_post', $post_id ) ) {
453
+ if ( 'trash' === $popup->status ) {
454
+ $the_url = $post_type_object->_edit_link . '&amp;action=untrash';
455
+ $the_url = admin_url( sprintf( $the_url, $post_id ) );
456
+ $the_url = wp_nonce_url( $the_url, 'untrash-post_' . $post_id );
457
+ $actions['untrash'] = array(
458
+ 'url' => $the_url,
459
+ 'title' => __( 'Restore this PopUp from the Trash', PO_LANG ),
460
+ 'label' => __( 'Restore', PO_LANG )
461
+ );
462
+ } elseif ( EMPTY_TRASH_DAYS ) {
463
+ $actions['trash'] = array(
464
+ 'url' => get_delete_post_link( $post_id ),
465
+ 'title' => __( 'Move this PopUp to the Trash', PO_LANG ),
466
+ 'attr' => 'class="submitdelete"',
467
+ 'label' => __( 'Trash', PO_LANG )
468
+ );
469
+ }
470
+ if ( 'trash' === $popup->status || ! EMPTY_TRASH_DAYS ) {
471
+ $actions['delete'] = array(
472
+ 'url' => get_delete_post_link( $post_id, '', true ),
473
+ 'title' => __( 'Delete this PopUp permanently', PO_LANG ),
474
+ 'attr' => 'class="submitdelete"',
475
+ 'label' => __( 'Delete Permanently', PO_LANG )
476
+ );
477
+ }
478
+ }
479
+
480
+ if ( $can_edit ) : ?>
481
+ <a href="<?php echo esc_url( get_edit_post_link( $post_id ) ); ?>"
482
+ title="<?php _e( 'Edit this PopUp', PO_LANG ); ?>">
483
+ <span class="the-title"><?php echo esc_html( $popup->name ); ?></span>
484
+ </a>
485
+ <?php else : ?>
486
+ <span class="the-title"><?php echo esc_html( $popup->name ); ?></span>
487
+ <?php endif; ?>
488
+ <div class="row-actions">
489
+ <?php
490
+ $action_count = count( $actions );
491
+ $i = 0;
492
+ foreach ( $actions as $action => $item ) {
493
+ $i += 1;
494
+ $sep = ( $i == $action_count ) ? '' : ' | ';
495
+ ?>
496
+ <span class="<?php echo esc_attr( $action ); ?>">
497
+ <a href="<?php echo esc_url( @$item['url'] ); ?>"
498
+ title="<?php echo esc_attr( @$item['title'] ); ?>"
499
+ <?php echo '' . @$item['attr']; ?>>
500
+ <?php echo esc_html( @$item['label'] ); ?>
501
+ </a><?php echo esc_html( $sep ); ?>
502
+ </span>
503
+ <?php
504
+ } ?>
505
+ </div>
506
+ <?php
507
+ break;
508
+
509
+ case 'po_cond':
510
+ $rule_count = 0;
511
+ ?>
512
+ <div class="rules">
513
+ <?php foreach ( $popup->rule as $key ) : ?>
514
+ <?php $label = IncPopupItem::condition_label( $key ); ?>
515
+ <?php if ( empty( $label ) ) { continue; } ?>
516
+ <?php $rule_count += 1; ?>
517
+ <span class="rule"><?php echo esc_html( $label ); ?></span>
518
+ <?php endforeach; ?>
519
+ <?php if ( ! $rule_count ) : ?>
520
+ <span class="rule-always"><?php _e( 'Always Show PopUp', PO_LANG ); ?></span>
521
+ <?php endif; ?>
522
+ </div>
523
+ <?php
524
+ break;
525
+
526
+ case 'po_pos':
527
+ if ( 'trash' === $popup->status ) {
528
+ echo '-';
529
+ } else {
530
+ $order = $popup->order;
531
+ if ( ! is_numeric( $order ) || $order > 999999 ) { $order = ''; }
532
+ ?>
533
+ <span class="the-pos"><?php echo esc_html( $order ); ?></span>
534
+ <?php
535
+ }
536
+ break;
537
+
538
+ case 'po_state':
539
+ $title = $popup->status_label( $popup->status );
540
+ ?>
541
+ <span title="<?php echo esc_attr( $title ); ?>">
542
+ <i class="status-icon dashicons"></i>
543
+ </span>
544
+ <?php
545
+ break;
546
+ }
547
+ }
548
+
549
+ /**
550
+ * Filter. Defines the quick-filters above the popup-table.
551
+ *
552
+ * @since 4.6
553
+ * @param array $views Default filters.
554
+ * @return array Modified filters.
555
+ */
556
+ static public function post_views( $views ) {
557
+ $new_views = array();
558
+ $stati = array(
559
+ 'all' => __( 'All <span class="count">(%1$s)</span>', PO_LANG ),
560
+ 'publish' => __( 'Active <span class="count">(%1$s)</span>', PO_LANG ),
561
+ 'draft' => __( 'Inactive <span class="count">(%1$s)</span>', PO_LANG ),
562
+ 'trash' => __( 'Trash <span class="count">(%1$s)</span>', PO_LANG ),
563
+ );
564
+ $post_type = IncPopupItem::POST_TYPE;
565
+ $num_posts = wp_count_posts( $post_type, 'readable' );
566
+ $total_posts = 0;
567
+
568
+ foreach ( $stati as $status => $label ) {
569
+ if ( empty( $num_posts->$status ) ) {
570
+ continue;
571
+ }
572
+ if ( 'trash' == $status ) {
573
+ continue;
574
+ }
575
+
576
+ $total_posts += $num_posts->$status;
577
+ }
578
+
579
+ $class = empty( $_REQUEST['post_status'] ) ? ' class="current"' : '';
580
+ $new_views['all'] =
581
+ "<a href='edit.php?post_type=$post_type'$class>" .
582
+ sprintf( $stati['all'], number_format_i18n( $total_posts ) ) .
583
+ '</a>';
584
+
585
+ foreach ( $stati as $status => $label ) {
586
+ $class = '';
587
+
588
+ if ( empty( $num_posts->$status ) ) {
589
+ continue;
590
+ }
591
+
592
+ if ( isset( $_REQUEST['post_status'] ) && $status == $_REQUEST['post_status'] ) {
593
+ $class = ' class="current"';
594
+ }
595
+
596
+ $new_views[$status] =
597
+ "<a href='edit.php?post_status=$status&amp;post_type=$post_type'$class>" .
598
+ sprintf( $label, number_format_i18n( $num_posts->$status ) ) .
599
+ '</a>';
600
+ }
601
+ return $new_views;
602
+ }
603
+
604
+ /**
605
+ * Defines the Bulk Actions available for popups.
606
+ * Note: This filter can only be used to *remove* bulk actions.
607
+ *
608
+ * @since 4.6
609
+ * @param array $actions Default list of bulk actions.
610
+ * @return array Modified action list.
611
+ */
612
+ static public function post_actions( $actions ) {
613
+ $new_actions = array();
614
+ isset( $actions['trash'] ) && $new_actions['trash'] = $actions['trash'];
615
+ isset( $actions['untrash'] ) && $new_actions['untrash'] = $actions['untrash'];
616
+ isset( $actions['delete'] ) && $new_actions['delete'] = $actions['delete'];
617
+ return $new_actions;
618
+ }
619
+
620
+ /**
621
+ * Define our PopUp update messages.
622
+ *
623
+ * @since 4.6
624
+ * @see wp-admin/edit.php
625
+ * @param array $messages Array of messages, by post-type.
626
+ * @param array $counts
627
+ * @return array The modified $messages array
628
+ */
629
+ static public function post_update_messages( $messages, $counts ) {
630
+ $messages[IncPopupItem::POST_TYPE] = array(
631
+ 'updated' => _n( 'One PopUp updated.', '%s PopUps updated.', $counts['updated'] ),
632
+ 'locked' => _n( 'One PopUp not updated, somebody is editing it.', '%s PopUps not updated, somebody is editing them.', $counts['locked'] ),
633
+ 'deleted' => _n( 'One PopUp permanently deleted.', '%s PopUps permanently deleted.', $counts['deleted'] ),
634
+ 'trashed' => _n( 'One PopUp moved to the Trash.', '%s PopUps moved to the Trash.', $counts['trashed'] ),
635
+ 'untrashed' => _n( 'One PopUp restored from the Trash.', '%s PopUps restored from the Trash.', $counts['untrashed'] ),
636
+ );
637
+ return $messages;
638
+ }
639
+
640
+ /**
641
+ * Called when the file edit.php is loaded
642
+ *
643
+ * @since 4.6
644
+ */
645
+ static public function post_list_edit() {
646
+ $wp_list_table = _get_list_table( 'WP_Posts_List_Table' );
647
+ $action = $wp_list_table->current_action();
648
+
649
+ if ( $action ) {
650
+ if ( 'list' === @$_REQUEST['mode'] ) {
651
+ // ----- Custom bulk-action.
652
+ check_admin_referer( 'bulk-posts' );
653
+ $post_ids = array();
654
+ if ( isset( $_REQUEST['ids'] ) ) {
655
+ $post_ids = explode( ',', $_REQUEST['ids'] );
656
+ } elseif ( ! empty( $_REQUEST['post'] ) ) {
657
+ $post_ids = array_map( 'intval', $_REQUEST['post'] );
658
+ }
659
+
660
+ $count = 0;
661
+ foreach ( $post_ids as $post_id ) {
662
+ $popup = IncPopupDatabase::get( $post_id );
663
+
664
+ switch ( $action ) {
665
+ case 'activate':
666
+ $popup->status = 'active';
667
+ break;
668
+
669
+ case 'deactivate':
670
+ $popup->status = 'inactive';
671
+ break;
672
+
673
+ case 'toggle':
674
+ if ( 'inactive' === $popup->status ) {
675
+ $popup->status = 'active';
676
+ } else if ( 'active' === $popup->status ) {
677
+ $popup->status = 'inactive';
678
+ } else {
679
+ $count -= 1;
680
+ }
681
+ break;
682
+ }
683
+ $popup->save( false );
684
+ $count += 1;
685
+ }
686
+
687
+ switch ( $action ) {
688
+ case 'activate':
689
+ 1 === $count ?
690
+ $msg = __( 'One PopUp activated', PO_LANG ) :
691
+ $msg = __( '%1$s PopUps activated', PO_LANG );
692
+ break;
693
+
694
+ case 'deactivate':
695
+ 1 === $count ?
696
+ $msg = __( 'One PopUp deactivated', PO_LANG ) :
697
+ $msg = __( '%1$s PopUps deactivated', PO_LANG );
698
+ break;
699
+
700
+ case 'toggle':
701
+ 1 === $count ?
702
+ $msg = __( 'One PopUp toggled', PO_LANG ) :
703
+ $msg = __( '%1$s PopUps toggled', PO_LANG );
704
+ break;
705
+ }
706
+
707
+ if ( $count > 0 && ! empty( $msg ) ) {
708
+ WDev()->message( sprintf( $msg, $count ) );
709
+ }
710
+ }
711
+ else {
712
+ // ----- Custom row-action.
713
+ $nonce = @$_REQUEST['_wpnonce'];
714
+ $post_id = absint( @$_REQUEST['post_id'] );
715
+ $popup = IncPopupDatabase::get( $post_id );
716
+
717
+ if ( ! $popup ) { return; }
718
+ if ( ! wp_verify_nonce( $nonce, $action . '-post_' . $post_id ) ) { return; }
719
+
720
+ switch ( $action ) {
721
+ case 'activate':
722
+ $popup->status = 'active';
723
+ $popup->save();
724
+ break;
725
+
726
+ case 'deactivate':
727
+ $popup->status = 'inactive';
728
+ $popup->save();
729
+ break;
730
+ }
731
+
732
+ $back_url = remove_query_arg( array( 'action', 'post_id', '_wpnonce' ) );
733
+ wp_safe_redirect( $back_url );
734
+ die();
735
+ }
736
+ }
737
+ }
738
+
739
+ /**
740
+ * Modify the main WP query to avoid pagination on the popup list and sort
741
+ * the popup list by the popup-order.
742
+ *
743
+ * @since 4.6
744
+ */
745
+ static public function post_query( $query ) {
746
+ if ( ! $query->is_main_query() ) { return; }
747
+
748
+ $query->set( 'posts_per_page', -1 );
749
+ $query->set( 'order', 'ASC' );
750
+ $query->set( 'orderby', 'menu_order' );
751
+ }
752
+
753
+ /**
754
+ * Returns the custom value of "items-per-page".
755
+ * This value is used by WordPress to generate the pagination links.
756
+ *
757
+ * @since 4.6
758
+ * @param int $value Default value set in Database
759
+ * @param string $post_type
760
+ * @return int Customized value
761
+ */
762
+ static public function post_item_per_page( $value, $post_type ) {
763
+ if ( $post_type == IncPopupItem::POST_TYPE ) {
764
+ // Setting to -1 works, but will not display text "17 items" in the top/right corner.
765
+ $value = 100000;
766
+ }
767
+ return $value;
768
+ }
769
+
770
+ /**
771
+ * Remove the posts-per-page filter from screen options.
772
+ *
773
+ * @since 4.6
774
+ */
775
+ static public function post_screenoptions() {
776
+ $screen = get_current_screen();
777
+ $screen->add_option( 'per_page', false );
778
+ }
779
+
780
+ /**
781
+ * Takes an array as input and updates the order of all popups according to
782
+ * the definition in the array.
783
+ *
784
+ * @since 4.6
785
+ * @param array $order List of popup-IDs
786
+ */
787
+ static public function post_order( $order ) {
788
+ $ids = array();
789
+ $new_order = array();
790
+
791
+ // Don't do the full re-order after every popup is saved.
792
+ remove_action(
793
+ 'save_post_' . IncPopupItem::POST_TYPE,
794
+ array( 'IncPopup', 'post_check_order' ),
795
+ 99, 3
796
+ );
797
+
798
+ foreach ( $order as $item ) {
799
+ if ( ! is_numeric( $item ) ) {
800
+ $item = preg_replace( '/[^0-9,.]/', '', $item );
801
+ }
802
+ $ids[] = absint( $item );
803
+ }
804
+
805
+ foreach ( $ids as $pos => $id ) {
806
+ $popup = IncPopupDatabase::get( $id );
807
+ $popup->order = $pos + 1;
808
+ $popup->save( false );
809
+ $new_order[ $id ] = $popup->order;
810
+ }
811
+
812
+ echo json_encode( $new_order );
813
+ }
814
+
815
+ /**
816
+ * Save the popup data to database
817
+ *
818
+ * @since 4.6
819
+ * @param int $post_id Post ID that was saved/created
820
+ * @param WP_Post $post Post object that was saved/created
821
+ * @param bool $update True means the post was updated (not created)
822
+ */
823
+ static public function post_check_order( $post_id, $post, $update ) {
824
+ $popup = IncPopupDatabase::get( $post_id );
825
+
826
+ // Autosave is not processed.
827
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; }
828
+
829
+ // This save event is for a different post type... ??
830
+ if ( $popup->id != $post_id ) { return; }
831
+
832
+ // User does not have permissions for this.
833
+ if ( ! current_user_can( IncPopupPosttype::$perms ) ) { return; }
834
+
835
+ IncPopupDatabase::refresh_order();
836
+ }
837
+
838
+
839
+ /*===================================*\
840
+ =======================================
841
+ == ==
842
+ == PopUp EDITOR ==
843
+ == ==
844
+ =======================================
845
+ \*===================================*/
846
+
847
+
848
+ /**
849
+ * Executes custom form actions, such as "duplicate PopUp"
850
+ *
851
+ * @since 4.6
852
+ */
853
+ static protected function form_check_actions() {
854
+ $popup_id = absint( @$_REQUEST['post'] );
855
+ $action = @$_REQUEST['do'];
856
+
857
+ if ( empty( $popup_id ) || empty( $action ) ) { return; }
858
+
859
+ switch ( $action ) {
860
+ case 'duplicate':
861
+ $item = IncPopupDatabase::get( $popup_id );
862
+ $item->id = 0;
863
+ $item->name = '(Copy) ' . $item->name;
864
+ $item->save();
865
+
866
+ // Show the new item in the editor.
867
+ $new_url = remove_query_arg( array( 'post', 'do' ) );
868
+ $new_url = add_query_arg( array( 'post' => $item->id ), $new_url );
869
+ wp_safe_redirect( $new_url );
870
+ die();
871
+
872
+ break;
873
+ }
874
+ }
875
+
876
+ /**
877
+ * Register custom metaboxes for the PopUp editor
878
+ *
879
+ * @since 4.6
880
+ * @param WP_Post $post The PopUp being edited.
881
+ */
882
+ static public function form_metabox( $post ) {
883
+ // Remove core meta boxes.
884
+ remove_meta_box( 'submitdiv', IncPopupItem::POST_TYPE, 'side' );
885
+ remove_meta_box( 'slugdiv', IncPopupItem::POST_TYPE, 'normal' );
886
+
887
+ // Add our own meta boxes.
888
+ add_meta_box(
889
+ 'meta-content',
890
+ __( 'PopUp Contents', PO_LANG ),
891
+ array( 'IncPopup', 'meta_content' ),
892
+ IncPopupItem::POST_TYPE,
893
+ 'advanced',
894
+ 'high'
895
+ );
896
+
897
+ add_meta_box(
898
+ 'meta-appearance',
899
+ __( 'Appearance', PO_LANG ),
900
+ array( 'IncPopup', 'meta_appearance' ),
901
+ IncPopupItem::POST_TYPE,
902
+ 'advanced',
903
+ 'high'
904
+ );
905
+
906
+ add_meta_box(
907
+ 'meta-behavior',
908
+ __( 'Behavior', PO_LANG ),
909
+ array( 'IncPopup', 'meta_behavior' ),
910
+ IncPopupItem::POST_TYPE,
911
+ 'advanced',
912
+ 'high'
913
+ );
914
+
915
+ add_meta_box(
916
+ 'meta-rules',
917
+ __( 'Displaying Conditions (optional)', PO_LANG ),
918
+ array( 'IncPopup', 'meta_rules' ),
919
+ IncPopupItem::POST_TYPE,
920
+ 'advanced',
921
+ 'default'
922
+ );
923
+
924
+ add_meta_box(
925
+ 'submitdiv',
926
+ __( 'Save PopUp', PO_LANG ),
927
+ array( 'IncPopup', 'meta_submitdiv' ),
928
+ IncPopupItem::POST_TYPE,
929
+ 'side',
930
+ 'low'
931
+ );
932
+ }
933
+
934
+ /**
935
+ * Called before the post-edit form is rendered.
936
+ * We add the field "PopUp Title" above the form.
937
+ *
938
+ * @since 4.6
939
+ * @param WP_Post $post The PopUp being edited.
940
+ */
941
+ static public function form_title( $post ) {
942
+ $popup = IncPopupDatabase::get( $post->ID );
943
+
944
+ wp_nonce_field( 'save-popup', 'popup-nonce' );
945
+ ?>
946
+ <div id="titlediv">
947
+ <div id="titlewrap">
948
+ <label for="po_name"><?php _e( 'PopUp Name (not displayed on the PopUp)', PO_LANG ); ?></label>
949
+ <input type="text" id="po_name" name="po_name" required
950
+ value="<?php echo esc_attr( $popup->name ); ?>"
951
+ placeholder="<?php _e( 'Name this PopUp', PO_LANG ); ?>" />
952
+ </div>
953
+ </div>
954
+ <?php
955
+ }
956
+
957
+ /**
958
+ * Renders the metabox: Content
959
+ *
960
+ * @since 4.6
961
+ * @param WP_Post $post The PopUp being edited.
962
+ */
963
+ static public function meta_content( $post ) {
964
+ $popup = IncPopupDatabase::get( $post->ID );
965
+ include PO_VIEWS_DIR . 'meta-content.php';
966
+ }
967
+
968
+ /**
969
+ * Renders the metabox: Appearance
970
+ *
971
+ * @since 4.6
972
+ * @param WP_Post $post The PopUp being edited.
973
+ */
974
+ static public function meta_appearance( $post ) {
975
+ $popup = IncPopupDatabase::get( $post->ID );
976
+ include PO_VIEWS_DIR . 'meta-appearance.php';
977
+ }
978
+
979
+ /**
980
+ * Renders the metabox: Behavior
981
+ *
982
+ * @since 4.6
983
+ * @param WP_Post $post The PopUp being edited.
984
+ */
985
+ static public function meta_behavior( $post ) {
986
+ $popup = IncPopupDatabase::get( $post->ID );
987
+ include PO_VIEWS_DIR . 'meta-behavior.php';
988
+ }
989
+
990
+ /**
991
+ * Renders the metabox: Conditions
992
+ *
993
+ * @since 4.6
994
+ * @param WP_Post $post The PopUp being edited.
995
+ */
996
+ static public function meta_rules( $post ) {
997
+ $popup = IncPopupDatabase::get( $post->ID );
998
+ include PO_VIEWS_DIR . 'meta-rules.php';
999
+ }
1000
+
1001
+ /**
1002
+ * Renders the metabox: SubmitDiv (Save, Preview)
1003
+ *
1004
+ * @since 4.6
1005
+ * @param WP_Post $post The PopUp being edited.
1006
+ */
1007
+ static public function meta_submitdiv( $post ) {
1008
+ $popup = IncPopupDatabase::get( $post->ID );
1009
+ include PO_VIEWS_DIR . 'meta-submitdiv.php';
1010
+ }
1011
+
1012
+ /**
1013
+ * Save the popup data to database
1014
+ *
1015
+ * @since 4.6
1016
+ * @param int $post_id Post ID that was saved/created
1017
+ * @param WP_Post $post Post object that was saved/created
1018
+ * @param bool $update True means the post was updated (not created)
1019
+ */
1020
+ static public function form_save( $post_id, $post, $update ) {
1021
+ $popup = IncPopupDatabase::get( $post_id );
1022
+
1023
+ // Autosave is not processed.
1024
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; }
1025
+
1026
+ // The nonce is invalid.
1027
+ if ( ! wp_verify_nonce( @$_POST['popup-nonce'], 'save-popup' ) ) { return; }
1028
+
1029
+ // This save event is for a different post type... ??
1030
+ if ( IncPopupItem::POST_TYPE != @$_POST['post_type'] ) { return; }
1031
+
1032
+ // Global PopUp modified in a Network-Blog that is not the Main-Blog.
1033
+ if ( ! IncPopup::correct_level() ) { return; }
1034
+
1035
+ // User does not have permissions for this.
1036
+ if ( ! current_user_can( IncPopupPosttype::$perms ) ) { return; }
1037
+
1038
+ $action = @$_POST['po-action'];
1039
+ $status = false;
1040
+ switch ( $action ) {
1041
+ case 'save':
1042
+ // Don't force a status...
1043
+ break;
1044
+
1045
+ case 'activate':
1046
+ $status = 'active';
1047
+ break;
1048
+
1049
+ case 'deactivate':
1050
+ $status = 'inactive';
1051
+ break;
1052
+
1053
+ default:
1054
+ // Unknown action.
1055
+ return;
1056
+ }
1057
+
1058
+ // Populate the popup.
1059
+ $data = self::prepare_formdata( $_POST );
1060
+ $data['id'] = $post_id;
1061
+ $data['order'] = $popup->order;
1062
+ if ( $status ) { $data['status'] = $status; }
1063
+ $popup->populate( $data );
1064
+
1065
+ // Prevent infinite loop when saving.
1066
+ remove_action(
1067
+ 'save_post_' . IncPopupItem::POST_TYPE,
1068
+ array( 'IncPopup', 'form_save' ),
1069
+ 10
1070
+ );
1071
+
1072
+ $popup->save();
1073
+
1074
+ add_action(
1075
+ 'save_post_' . IncPopupItem::POST_TYPE,
1076
+ array( 'IncPopup', 'form_save' ),
1077
+ 10, 3
1078
+ );
1079
+
1080
+ // Removes the 'message' from the redirect URL.
1081
+ add_filter(
1082
+ 'redirect_post_location',
1083
+ array( 'IncPopup', 'form_redirect' ),
1084
+ 10, 2
1085
+ );
1086
+ }
1087
+
1088
+ /**
1089
+ * Removes the 'message' param from redirect URL.
1090
+ * This prevents the default WordPress update-notice to be displayed.
1091
+ *
1092
+ * @since 4.6
1093
+ * @param string $url The redirect URL.
1094
+ * @param int $post_id Which post was updated.
1095
+ * @return string The modified redirect URL.
1096
+ */
1097
+ static public function form_redirect( $url, $post_id ) {
1098
+ return remove_query_arg( 'message', $url );
1099
+ }
1100
+
1101
+ };
inc/class-popup-base.php ADDED
@@ -0,0 +1,427 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Load dependencies.
3
+ require_once PO_INC_DIR . 'class-popup-item.php';
4
+ require_once PO_INC_DIR . 'class-popup-database.php';
5
+ require_once PO_INC_DIR . 'class-popup-posttype.php';
6
+ require_once PO_INC_DIR . 'class-popup-rule.php';
7
+
8
+ // Load extra functions.
9
+ require_once PO_INC_DIR . 'addons/class-popup-addon-headerfooter.php';
10
+ require_once PO_INC_DIR . 'addons/class-popup-addon-anonymous.php';
11
+ require_once PO_INC_DIR . 'addons/class-popup-addon-geo-db.php';
12
+
13
+ /**
14
+ * Defines common functions that are used in admin and frontpage.
15
+ */
16
+ abstract class IncPopupBase {
17
+
18
+ /**
19
+ * Holds the IncPopupDatabase instance.
20
+ * @var IncPopupDatabase
21
+ */
22
+ protected $db = null;
23
+
24
+ /**
25
+ * List of PopUps fetched by select_popup()
26
+ * @var array [IncPopupItem]
27
+ */
28
+ protected $popups = array();
29
+
30
+
31
+ /**
32
+ * Constructor
33
+ */
34
+ protected function __construct() {
35
+ $this->db = IncPopupDatabase::instance();
36
+
37
+ WDev()->translate_plugin( PO_LANG, PO_LANG_DIR );
38
+
39
+ // Register the popup post type.
40
+ add_action(
41
+ 'init',
42
+ array( 'IncPopupPosttype', 'instance' ),
43
+ 99
44
+ );
45
+
46
+ // Register the popup post type.
47
+ add_action(
48
+ 'wp_loaded',
49
+ array( 'IncPopupDatabase', 'check_db' )
50
+ );
51
+
52
+ // Load active add-ons.
53
+ add_action(
54
+ 'init',
55
+ array( 'IncPopup', 'load_optional_files' )
56
+ );
57
+
58
+ // Returns a list of all style infos (id, url, path, deprecated)
59
+ add_filter(
60
+ 'popup-styles',
61
+ array( 'IncPopupBase', 'style_infos' )
62
+ );
63
+
64
+ // Ajax handlers to load PopUp data (for logged in users).
65
+ add_action(
66
+ 'wp_ajax_inc_popup',
67
+ array( $this, 'ajax_load_popup' )
68
+ );
69
+
70
+ // Ajax handlers to load PopUp data (for guests).
71
+ add_action(
72
+ 'wp_ajax_nopriv_inc_popup',
73
+ array( $this, 'ajax_load_popup' )
74
+ );
75
+ }
76
+
77
+ /**
78
+ * If the plugin operates on global multisite level.
79
+ *
80
+ * @since 4.6
81
+ * @return bool
82
+ */
83
+ static public function use_global() {
84
+ $State = null;
85
+
86
+ if ( null === $State ) {
87
+ $State = is_multisite() && PO_GLOBAL;
88
+ }
89
+
90
+ return $State;
91
+ }
92
+
93
+ /**
94
+ * If the the user currently is on correct level (global vs blog)
95
+ *
96
+ * @since 4.6
97
+ * @return bool
98
+ */
99
+ static public function correct_level() {
100
+ $State = null;
101
+
102
+ if ( null === $State ) {
103
+ $State = false;
104
+ if ( ! self::use_global() ) {
105
+ if ( is_admin() && ! is_network_admin() ) {
106
+ $State = true;
107
+ }
108
+ } else {
109
+ $blog_id = defined( 'BLOG_ID_CURRENT_SITE' ) ? BLOG_ID_CURRENT_SITE : 0;
110
+ if ( is_network_admin() || $blog_id == get_current_blog_id() ) {
111
+ $State = true;
112
+ }
113
+ }
114
+ }
115
+
116
+ return $State;
117
+ }
118
+
119
+ /**
120
+ * Returns an array with all core popup styles.
121
+ *
122
+ * @since 4.6
123
+ * @return array Core Popup styles.
124
+ */
125
+ static protected function _get_styles( ) {
126
+ $Styles = null;
127
+
128
+ if ( null === $Styles ) {
129
+ $Styles = array();
130
+ if ( $handle = opendir( PO_TPL_DIR ) ) {
131
+ while ( false !== ( $entry = readdir( $handle ) ) ) {
132
+ if ( $entry === '.' || $entry === '..' ) { continue; }
133
+ $style_file = PO_TPL_DIR . $entry . '/style.php';
134
+ if ( ! file_exists( $style_file ) ) { continue; }
135
+
136
+ $info = (object) array();
137
+ include $style_file;
138
+
139
+ $Styles[ $entry ] = $info;
140
+ }
141
+ closedir( $handle );
142
+ }
143
+ }
144
+
145
+ return $Styles;
146
+ }
147
+
148
+ /**
149
+ * Returns a list of all style infos (id, url, path, deprecated)
150
+ * Handles filter `popup-styles`
151
+ *
152
+ * @since 4.6
153
+ * @param array $list
154
+ * @return array The updated list.
155
+ */
156
+ static public function style_infos( $list = array() ) {
157
+ $core_styles = self::_get_styles();
158
+ $urls = apply_filters( 'popup-available-styles-url', array() );
159
+ $paths = apply_filters( 'popup-available-styles-directory', array() );
160
+
161
+ if ( ! is_array( $list ) ) { $list = array(); }
162
+
163
+ // Add core styles to the response.
164
+ foreach ( $core_styles as $key => $data ) {
165
+ $list[ $key ] = (object) array(
166
+ 'url' => trailingslashit( PO_TPL_URL . $key ),
167
+ 'dir' => trailingslashit( PO_TPL_DIR . $key ),
168
+ 'name' => $data->name,
169
+ 'pro' => (true == @$data->pro),
170
+ 'deprecated' => (true == @$data->deprecated),
171
+ );
172
+ if ( isset( $urls[$data->name] ) ) { unset( $urls[$data->name] ); }
173
+ if ( isset( $paths[$data->name] ) ) { unset( $paths[$data->name] ); }
174
+ }
175
+
176
+ // Add custom styles to the response.
177
+ foreach ( $urls as $key => $url ) {
178
+ $list[ $key ] = (object) array(
179
+ 'url' => $url,
180
+ 'dir' => @$paths[$key],
181
+ 'name' => $key,
182
+ 'pro' => false,
183
+ 'deprecated' => false,
184
+ );
185
+ }
186
+
187
+ return $list;
188
+ }
189
+
190
+ /**
191
+ * Returns a list with all available rule-files.
192
+ *
193
+ * @since 4.6
194
+ * @return array List of rule-files.
195
+ */
196
+ public function get_rules() {
197
+ $List = null;
198
+
199
+ if ( null === $List ) {
200
+ $List = array();
201
+ $base_len = strlen( PO_INC_DIR . 'rules/' );
202
+ foreach ( glob( PO_INC_DIR . 'rules/*.php' ) as $path ) {
203
+ $List[] = substr( $path, $base_len );
204
+ }
205
+
206
+ $List = apply_filters( 'popup-available-rules', $List );
207
+
208
+ sort( $List );
209
+ }
210
+
211
+ return $List;
212
+ }
213
+
214
+ /**
215
+ * Loads the active Add-On files.
216
+ *
217
+ * @since 4.6
218
+ */
219
+ public function load_optional_files() {
220
+ $settings = IncPopupDatabase::get_settings();
221
+
222
+ if ( $settings['geo_db'] ) {
223
+ IncPopupAddon_GeoDB::init();
224
+ }
225
+
226
+ // $available uses apply_filter to customize the results.
227
+ $available = self::get_rules();
228
+
229
+ foreach ( $available as $rule ) {
230
+ $path = PO_INC_DIR . 'rules/'. $rule;
231
+ if ( in_array( $rule, $settings['rules'] ) && file_exists( $path ) ) {
232
+ include_once $path;
233
+ }
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Returns an array with all relevant popup fields extracted from the
239
+ * submitted form data.
240
+ *
241
+ * @since 4.6
242
+ * @param array $form Raw form array, submitted from WP admin.
243
+ * @return array Data extracted from the $form array.
244
+ */
245
+ static protected function prepare_formdata( $form ) {
246
+ if ( ! is_array( $form ) ) { $form = array(); }
247
+
248
+
249
+ $data = array(
250
+ // Meta: Content
251
+ 'name' => @$form['po_name'],
252
+ 'content' => stripslashes( @$form['po_content'] ),
253
+ 'title' => @$form['po_heading'],
254
+ 'subtitle' => @$form['po_subheading'],
255
+ 'cta_label' => @$form['po_cta'],
256
+ 'cta_link' => @$form['po_cta_link'],
257
+ 'image' => @$form['po_image'],
258
+ 'image_pos' => @$form['po_image_pos'],
259
+ 'image_mobile' => ! isset( $form['po_image_no_mobile'] ),
260
+ 'active' => isset( $form['po_active'] ),
261
+
262
+ // Meta: Appearance
263
+ 'style' => @$form['po_style'],
264
+ 'round_corners' => ! isset( $form['po_no_round_corners'] ),
265
+ 'custom_colors' => isset( $form['po_custom_colors'] ),
266
+ 'color' => @$form['po_color'],
267
+ 'custom_size' => isset( $form['po_custom_size'] ),
268
+ 'size' => array(
269
+ 'width' => @$form['po_size_width'],
270
+ 'height' => @$form['po_size_height'],
271
+ ),
272
+
273
+ // Meta: Behavior
274
+ 'display' => @$form['po_display'],
275
+ 'display_data' => @$form['po_display_data'],
276
+ 'can_hide' => isset( $form['po_can_hide'] ),
277
+ 'close_hides' => isset( $form['po_close_hides'] ),
278
+ 'hide_expire' => @$form['po_hide_expire'],
279
+ 'overlay_close' => ! isset( $form['po_overlay_close'] ),
280
+
281
+ // Meta: Rules:
282
+ 'rule' => @$form['po_rule'],
283
+ 'rule_data' => apply_filters( 'popup-save-rules', array() ),
284
+ );
285
+
286
+ if ( ! is_array( $data['rule'] ) ) { $data['rule'] = array(); }
287
+
288
+ return $data;
289
+ }
290
+
291
+ /**
292
+ * Returns the popup content as JSON object and then ends the request.
293
+ *
294
+ * @since 4.6
295
+ */
296
+ public function ajax_load_popup() {
297
+ $action = @$_REQUEST['do'];
298
+
299
+ switch ( $action ) {
300
+ case 'get-data':
301
+ if ( IncPopupItem::POST_TYPE == @$_REQUEST['data']['post_type'] ) {
302
+ $this->popups = array();
303
+ $this->popups[0] = new IncPopupItem();
304
+ $data = self::prepare_formdata( $_REQUEST['data'] );
305
+ $this->popups[0]->populate( $data );
306
+ } else {
307
+ $this->select_popup();
308
+ }
309
+
310
+ if ( ! empty( $this->popups ) ) {
311
+ $data = $this->get_popup_data();
312
+ echo 'po_data(' . json_encode( $data ) . ')';
313
+ }
314
+ die();
315
+ }
316
+ }
317
+
318
+ /**
319
+ * Processes the popups array and returns a serializeable object with all
320
+ * popup details. The object can be JSON-encoded and interpreted by the
321
+ * javascript library.
322
+ *
323
+ * @since 4.6
324
+ * @return array
325
+ */
326
+ public function get_popup_data() {
327
+ $data = array();
328
+ $is_preview = ! empty( $_REQUEST['preview'] );
329
+
330
+ foreach ( $this->popups as $item ) {
331
+ $item_data = $item->get_script_data( $is_preview );
332
+ $data[] = $item_data;
333
+ }
334
+
335
+ return $data;
336
+ }
337
+
338
+
339
+ /*==================================*\
340
+ ======================================
341
+ == ==
342
+ == SELECT POPUP ==
343
+ == ==
344
+ ======================================
345
+ \*==================================*/
346
+
347
+
348
+ /**
349
+ * Returns an array with popup details.
350
+ *
351
+ * @since 4.6
352
+ * @return array
353
+ */
354
+ protected function select_popup() {
355
+ $data = array();
356
+ $items = $this->find_popups();
357
+ $this->popups = array();
358
+
359
+ if ( empty( $items ) ) {
360
+ return;
361
+ }
362
+
363
+ $this->popups = $items;
364
+ }
365
+
366
+ /**
367
+ * Returns an array of PopUp objects that should be displayed for the
368
+ * current page/user. The PopUps are in the order in which they are defined
369
+ * in the admin list.
370
+ *
371
+ * @since 4.6
372
+ * @return array List of all popups that fit the current page.
373
+ */
374
+ protected function find_popups() {
375
+ $popups = array();
376
+
377
+ $popup_id = absint( @$_REQUEST['po_id'] );
378
+ if ( $popup_id ) {
379
+ // Check for forced popup.
380
+ $active_ids = array( $popup_id );
381
+ } else {
382
+ $active_ids = IncPopupDatabase::get_active_ids();
383
+ }
384
+
385
+ foreach ( $active_ids as $id ) {
386
+ $popup = IncPopupDatabase::get( $id );
387
+
388
+ if ( $popup_id ) {
389
+ // Forced popup ignores all conditions.
390
+ $show = true;
391
+ } else {
392
+ // Ignore empty PopUps.
393
+ if ( empty( $popup->content ) ) { continue; }
394
+
395
+ // Apply the conditions to decide if the popup should be displayed.
396
+ $show = apply_filters( 'popup-apply-rules', true, $popup );
397
+ }
398
+
399
+ // Stop here if the popup failed in some conditions.
400
+ if ( ! $show ) { continue; }
401
+
402
+ // Stop here if the user did choose to hide the popup.
403
+ if ( ! @$_REQUEST['preview'] && $this->is_hidden( $id ) ) { continue; }
404
+
405
+ $popups[] = $popup;
406
+ }
407
+
408
+ return $popups;
409
+ }
410
+
411
+
412
+ /**
413
+ * Tests if a popup is marked as hidden ("never see this message again").
414
+ * This flag is stored as a cookie on the users computer.
415
+ *
416
+ * @since 4.6
417
+ * @param int $id PopUp ID
418
+ * @return bool
419
+ */
420
+ protected function is_hidden( $id ) {
421
+ $name = 'po_h-' . $id;
422
+ $name_old = 'popover_never_view_' . $id;
423
+
424
+ return isset( $_COOKIE[$name] ) || isset( $_COOKIE[$name_old] );
425
+ }
426
+
427
+ };
inc/class-popup-database.php ADDED
@@ -0,0 +1,742 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Provides the database level functions for the popups.
5
+ */
6
+ class IncPopupDatabase {
7
+
8
+ // Use `self::db_prefix( IP_TABLE );` to get the full table name.
9
+ const IP_TABLE = 'popover_ip_cache';
10
+
11
+ /**
12
+ * Returns the singleton instance of the popup database class.
13
+ *
14
+ * @since 4.6
15
+ */
16
+ static public function instance() {
17
+ static $Inst = null;
18
+
19
+ if ( null === $Inst ) {
20
+ $Inst = new IncPopupDatabase();
21
+ }
22
+
23
+ return $Inst;
24
+ }
25
+
26
+ /**
27
+ * Checks the database version and migrates to latest version is required.
28
+ *
29
+ * @since 4.6
30
+ */
31
+ static public function check_db() {
32
+ // Update the DB if required.
33
+ if ( ! IncPopupDatabase::db_is_current() ) {
34
+ IncPopupDatabase::db_update();
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Checks the state of the database and returns true when the DB has a valid
40
+ * format for the current plugin version.
41
+ *
42
+ * @since 4.6
43
+ * @return boolean Database state (true = everything okay)
44
+ */
45
+ static public function db_is_current() {
46
+ $cur_version = self::_get_option( 'popover_installed', 0 );
47
+
48
+ // When no DB-Values exist yet then don't even show the notice in
49
+ // the Network dashboard.
50
+ if ( ! $cur_version ) {
51
+ IncPopupDatabase::set_flag( 'network_dismiss', true );
52
+ }
53
+
54
+ return $cur_version == PO_BUILD;
55
+ }
56
+
57
+ /**
58
+ * Adds the correct DB prefix to the table and returns the full name.
59
+ * Takes the setting PO_GLOBAL into account.
60
+ *
61
+ * @since 4.6
62
+ * @param string $table Table name without prefix.
63
+ * @return string The prefixed table name.
64
+ */
65
+ static public function db_prefix( $table ) {
66
+ global $wpdb;
67
+ static $Prefixed = array();
68
+
69
+ if ( ! isset( $Prefixed[$table] ) ) {
70
+ $Prefixed[$table] = $table;
71
+
72
+ if ( defined( 'PO_GLOBAL' ) && true == PO_GLOBAL ) {
73
+ if ( ! empty( $wpdb->base_prefix ) ) {
74
+ $Prefixed[$table] = $wpdb->base_prefix . $table;
75
+ } else {
76
+ $Prefixed[$table] = $wpdb->prefix . $table;
77
+ }
78
+ } else {
79
+ $Prefixed[$table] = $wpdb->prefix . $table;
80
+ }
81
+ }
82
+
83
+ return $Prefixed[$table];
84
+ }
85
+
86
+ /**
87
+ * Setup or migrate the database to current plugin version.
88
+ *
89
+ * @since 4.6
90
+ */
91
+ public function db_update() {
92
+ // Required for dbDelta()
93
+ require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
94
+
95
+ global $wpdb;
96
+
97
+ $charset_collate = '';
98
+
99
+ if ( ! empty( $wpdb->charset ) ) {
100
+ $charset_collate = ' DEFAULT CHARACTER SET ' . $wpdb->charset;
101
+ }
102
+
103
+ if ( ! empty( $wpdb->collate ) ) {
104
+ $charset_collate .= ' COLLATE ' . $wpdb->collate;
105
+ }
106
+
107
+ $tbl_popover = self::db_prefix( 'popover' );
108
+ $tbl_ip_cache = self::db_prefix( 'popover_ip_cache' );
109
+ $count = 0;
110
+
111
+ if ( $wpdb->get_var( 'SHOW TABLES LIKE "' . $tbl_popover . '" ' ) == $tbl_popover ) {
112
+ // Create a column in old table to monitor migration status.
113
+ $sql = "CREATE TABLE {$tbl_popover} (
114
+ id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
115
+ popover_title varchar(250) DEFAULT NULL,
116
+ popover_content text,
117
+ popover_settings text,
118
+ popover_order bigint(20) DEFAULT '0',
119
+ popover_active int(11) DEFAULT '0',
120
+ migrated tinyint DEFAULT '0',
121
+ PRIMARY KEY (id)
122
+ ) {$charset_collate};";
123
+
124
+ dbDelta( $sql );
125
+
126
+ // Migrate to custom post type.
127
+ $sql = "
128
+ SELECT
129
+ id,
130
+ popover_title,
131
+ popover_content,
132
+ popover_settings,
133
+ popover_order,
134
+ popover_active
135
+ FROM {$tbl_popover}
136
+ WHERE migrated=0
137
+ ";
138
+ $res = $wpdb->get_results( $sql );
139
+
140
+ // Name mapping of conditions/rules from build 5 -> 6.
141
+ $mapping = array(
142
+ 'isloggedin' => 'login', 'loggedin' => 'no_login',
143
+ 'onurl' => 'url', 'notonurl' => 'no_url',
144
+ 'incountry' => 'country', 'notincountry' => 'no_country',
145
+ 'advanced_urls' => 'adv_url', 'not-advanced_urls' => 'no_adv_url',
146
+ 'categories' => 'category', 'not-categories' => 'no_category',
147
+ 'post_types' => 'posttype', 'not-post_types' => 'no_posttype',
148
+ 'xprofile_value' => 'xprofile', 'not-xprofile_value' => 'no_xprofile',
149
+ 'supporter' => 'no_prosite',
150
+ 'searchengine' => 'searchengine',
151
+ 'commented' => 'no_comment',
152
+ 'internal' => 'no_internal',
153
+ 'referrer' => 'referrer',
154
+ 'count' => 'count',
155
+ 'max_width' => 'width',
156
+ 'wp_roles_rule' => 'role',
157
+ 'membership_level' => 'membership',
158
+ //'on_exit' => 'on_exit',
159
+ //'on_click' => 'on_click',
160
+ );
161
+
162
+ // Translate style to new keys
163
+ $style_mapping = array(
164
+ 'Default' => 'old-default',
165
+ 'Default Fixed' => 'old-fixed',
166
+ 'Dark Background Fixed' => 'old-fullbackground',
167
+ );
168
+
169
+ // Migrate data from build 5 to build 6!
170
+ foreach ( $res as $item ) {
171
+ // Confirm the item was not migrated, just to be sure...
172
+ // This is one-time code, we don't care for performance here.
173
+ $sql = "
174
+ SELECT 1 status
175
+ FROM {$tbl_popover}
176
+ WHERE id=%s AND migrated=0
177
+ ";
178
+ $sql = $wpdb->prepare( $sql, $item->id );
179
+ $status = $wpdb->get_var( $sql );
180
+ if ( $status != '1' ) { continue; }
181
+
182
+ $raw = maybe_unserialize( $item->popover_settings );
183
+ $checks = explode( ',', @$raw['popover_check']['order'] );
184
+ foreach ( $checks as $ind => $key ) {
185
+ if ( isset( $mapping[$key] ) ) {
186
+ $checks[$ind] = $mapping[$key];
187
+ } else {
188
+ unset( $checks[$ind] );
189
+ }
190
+ }
191
+
192
+ if ( isset( $style_mapping[ @$raw['popover_style'] ] ) ) {
193
+ $style = $style_mapping[ @$raw['popover_style'] ];
194
+ } else {
195
+ $style = @$raw['popover_style'];
196
+ }
197
+
198
+ $colors = array(
199
+ 'col1' => @$raw['popover_colour']['back'],
200
+ 'col2' => @$raw['popover_colour']['fore'],
201
+ );
202
+
203
+ $display = 'delay';
204
+ if ( isset( $raw['on_exit'] ) ) { $display = 'leave'; }
205
+ if ( isset( $raw['on_click'] ) ) { $display = 'click'; }
206
+
207
+ $custom_colors = false;
208
+ if ( $colors['col1'] != 'FFFFFF' ) { $custom_colors = true; }
209
+ if ( $colors['col2'] != '000000' ) { $custom_colors = true; }
210
+
211
+ $custom_size = true;
212
+ if ( ! empty( $raw['popover_size']['usejs'] ) ) { $custom_size = false; }
213
+ if ( 'no' != @$raw['popover_usejs'] ) { $custom_size = false; }
214
+
215
+ $data = array(
216
+ 'name' => $item->popover_title,
217
+ 'content' => $item->popover_content,
218
+ 'order' => $item->popover_order,
219
+ 'active' => (true == $item->popover_active),
220
+ 'size' => @$raw['popover_size'],
221
+ 'color' => $colors,
222
+ 'custom_colors' => $custom_colors,
223
+ 'custom_size' => $custom_size,
224
+ 'style' => $style,
225
+ 'can_hide' => ('no' == @$raw['popoverhideforeverlink']),
226
+ 'close_hides' => ('no' != @$raw['popover_close_hideforever']),
227
+ 'hide_expire' => absint( @$raw['popover_hideforever_expiry'] ),
228
+ 'display' => $display,
229
+ 'display_data' => array(
230
+ 'delay' => absint( @$raw['popoverdelay'] ),
231
+ 'delay_type' => 's',
232
+ 'click' => @$raw['on_click']['selector'],
233
+ 'click_multi' => ! empty( $raw['on_click']['selector'] ),
234
+ ),
235
+ 'rule' => $checks,
236
+ 'rule_data' => array(
237
+ 'count' => @$raw['popover_count'],
238
+ 'referrer' => @$raw['popover_ereg'],
239
+ 'exit' => @$raw['on_exit'],
240
+ 'url' => @$raw['onurl'],
241
+ 'no_url' => @$raw['notonurl'],
242
+ 'adv_url' => @$raw['advanced_urls']['urls'],
243
+ 'no_adv_url' => @$raw['not-advanced_urls']['urls'],
244
+ 'country' => @$raw['incountry'],
245
+ 'no_country' => @$raw['notincountry'],
246
+ 'category' => @$raw['categories'],
247
+ 'no_category' => @$raw['not-categories'],
248
+ 'posttype' => @$raw['post_types'],
249
+ 'no_posttype' => @$raw['not-post_types'],
250
+ 'xprofile' => @$raw['xprofile_value'],
251
+ 'no_xprofile' => @$raw['not-xprofile_value'],
252
+ 'width' => array(
253
+ 'min' => @$raw['max_width']['width'],
254
+ ),
255
+ )
256
+ );
257
+
258
+ // Save the popup as custom posttype.
259
+ $popup = new IncPopupItem( $data );
260
+ $popup->save( false );
261
+
262
+ // Mark Popup as migrated
263
+ $sql = "
264
+ UPDATE {$tbl_popover}
265
+ SET migrated=1
266
+ WHERE id=%s
267
+ ";
268
+ $sql = $wpdb->prepare( $sql, $item->id );
269
+ $wpdb->query( $sql );
270
+
271
+ // Advance counter.
272
+ $count += 1;
273
+ }
274
+ }
275
+
276
+ self::refresh_order();
277
+
278
+ // Create or update the IP cache table.
279
+ $sql = "
280
+ CREATE TABLE {$tbl_ip_cache} (
281
+ IP varchar(12) NOT NULL DEFAULT '',
282
+ country varchar(2) DEFAULT NULL,
283
+ cached bigint(20) DEFAULT NULL,
284
+ PRIMARY KEY (IP),
285
+ KEY cached (cached)
286
+ ) {$charset_collate};";
287
+
288
+ dbDelta( $sql );
289
+
290
+ if ( $count > 0 ) {
291
+ WDev()->message(
292
+ sprintf(
293
+ __(
294
+ '<strong>WordPress PopUp</strong><br />' .
295
+ 'Your installation was successfully updated to use the ' .
296
+ 'latest version of the plugin!<br />' .
297
+ '<em>Note: Some PopUp options changed or were replaced. ' .
298
+ 'You should have a look at your <a href="%s">PopUps</a> ' .
299
+ 'to see if they still look as intended.</em>', PO_LANG
300
+ ),
301
+ admin_url( 'edit.php?post_type=' . IncPopupItem::POST_TYPE )
302
+ )
303
+ );
304
+ }
305
+
306
+ // Migrate the Plugin Settings.
307
+ $old_settings = IncPopupDatabase::_get_option( 'popover-settings', array() );
308
+ $settings = array();
309
+ $cur_method = @$old_settings['loadingmethod'];
310
+ switch ( $cur_method ) {
311
+ case '':
312
+ case 'external': $cur_method = 'ajax'; break;
313
+ case 'frontloading': $cur_method = 'front'; break;
314
+ }
315
+ $settings['loadingmethod'] = $cur_method;
316
+
317
+ // Migrate Add-Ons to new settings.
318
+ // Add-Ons were always saved in the local Options-table by old version.
319
+ self::before_db();
320
+ $addons = get_option( 'popover_activated_addons', array() );
321
+ self::after_db();
322
+
323
+ $rules = array(
324
+ 'class-popup-rule-browser.php',
325
+ 'class-popup-rule-geo.php',
326
+ 'class-popup-rule-popup.php',
327
+ 'class-popup-rule-referrer.php',
328
+ 'class-popup-rule-url.php',
329
+ 'class-popup-rule-user.php',
330
+ 'class-popup-rule-prosite.php',
331
+ );
332
+
333
+ foreach ( $addons as $addon ) {
334
+ switch ( $addon ) {
335
+ case 'anonymous_loading.php':
336
+ case 'testheadfooter.php':
337
+ /* Integrated; no option. */ break;
338
+ case 'localgeodatabase.php':
339
+ $settings['geo_db'] = true; break;
340
+ case 'rules-advanced_url.php':
341
+ $rules[] = 'class-popup-rule-advurl.php'; break;
342
+ case 'rules-categories.php':
343
+ $rules[] = 'class-popup-rule-category.php'; break;
344
+ case 'rules-max_width.php':
345
+ $rules[] = 'class-popup-rule-width.php'; break;
346
+ case 'rules-on_exit.php':
347
+ $rules[] = 'class-popup-rule-events.php'; break;
348
+ case 'rules-onclick.php':
349
+ $rules[] = 'class-popup-rule-events.php'; break;
350
+ case 'rules-post_types.php':
351
+ $rules[] = 'class-popup-rule-posttype.php'; break;
352
+ case 'rules-xprofile_value.php':
353
+ $rules[] = 'class-popup-rule-xprofile.php'; break;
354
+ case 'rules-membership.php':
355
+ $rules[] = 'class-popup-rule-membership.php'; break;
356
+ case 'rules-wp_roles.php':
357
+ $rules[] = 'class-popup-rule-role.php'; break;
358
+ }
359
+ }
360
+ $settings['rules'] = $rules;
361
+
362
+ self::set_settings( $settings );
363
+
364
+ // Save the new DB version to options table.
365
+ self::_set_option( 'popover_installed', PO_BUILD );
366
+ }
367
+
368
+ /**
369
+ * Returns a popup object.
370
+ *
371
+ * @since 4.6
372
+ * @param int $post_id ID of the PopUp
373
+ * @return IncPopupItem
374
+ */
375
+ public function get( $post_id ) {
376
+ $post_id = absint( $post_id );
377
+ $popup = wp_cache_get( $post_id, IncPopupItem::POST_TYPE );
378
+
379
+ if ( false === $popup ) {
380
+ self::before_db();
381
+ $popup = new IncPopupItem( $post_id );
382
+ self::after_db();
383
+ wp_cache_set( $post_id, $popup, IncPopupItem::POST_TYPE );
384
+ }
385
+ return $popup;
386
+ }
387
+
388
+ /**
389
+ * Returns an array with all IDs of the active popups.
390
+ * The IDs are in the correct order (as defined in the admin list)
391
+ *
392
+ * @since 4.6
393
+ * @return array List of active popups.
394
+ */
395
+ public function get_active_ids() {
396
+ global $wpdb;
397
+ static $List = null;
398
+
399
+ if ( null === $List ) {
400
+ self::before_db();
401
+ $sql_get = "
402
+ SELECT ID
403
+ FROM {$wpdb->posts}
404
+ WHERE post_type=%s
405
+ AND post_status=%s
406
+ ORDER BY menu_order
407
+ ";
408
+ $sql = $wpdb->prepare(
409
+ $sql_get,
410
+ IncPopupItem::POST_TYPE,
411
+ 'publish'
412
+ );
413
+ $List = $wpdb->get_col( $sql );
414
+ self::after_db();
415
+ }
416
+
417
+ return $List;
418
+ }
419
+
420
+ /**
421
+ * Returns the next available value for the popup position (order)
422
+ *
423
+ * @since 4.6
424
+ * @return int Next free order position; bottom of the list.
425
+ */
426
+ public function next_order() {
427
+ global $wpdb;
428
+ self::before_db();
429
+
430
+ $sql = "
431
+ SELECT menu_order
432
+ FROM {$wpdb->posts}
433
+ WHERE post_type=%s
434
+ ORDER BY menu_order DESC
435
+ LIMIT 1
436
+ ";
437
+ $sql = $wpdb->prepare(
438
+ $sql,
439
+ IncPopupItem::POST_TYPE
440
+ );
441
+ //wp_die( $sql );
442
+ $pos = $wpdb->get_var( $sql );
443
+ self::after_db();
444
+
445
+ return absint( $pos ) + 1;
446
+ }
447
+
448
+ /**
449
+ * Updates the order of all popups that are not in trash.
450
+ *
451
+ * @since 4.6
452
+ */
453
+ public function refresh_order() {
454
+ global $wpdb;
455
+ self::before_db();
456
+
457
+ // 1. Set all trashed popups to order=999999.
458
+ $sql_fix = "
459
+ UPDATE {$wpdb->posts}
460
+ SET menu_order=999999
461
+ WHERE post_type=%s AND post_status=%s
462
+ ";
463
+ $sql = $wpdb->prepare(
464
+ $sql_fix,
465
+ IncPopupItem::POST_TYPE,
466
+ 'trash'
467
+ );
468
+ $wpdb->query( $sql );
469
+
470
+ // 2. Get all active/inactive popups in correct order.
471
+ $sql_get = "
472
+ SELECT ID, menu_order
473
+ FROM {$wpdb->posts}
474
+ WHERE post_type=%s
475
+ AND post_status IN (%s, %s)
476
+ ORDER BY menu_order
477
+ ";
478
+ $sql = $wpdb->prepare(
479
+ $sql_get,
480
+ IncPopupItem::POST_TYPE,
481
+ 'publish',
482
+ 'draft'
483
+ );
484
+ $list = $wpdb->get_results( $sql );
485
+
486
+ // 3. Update the menu order of all active/inactive popups.
487
+ $sql_fix = "
488
+ UPDATE {$wpdb->posts}
489
+ SET menu_order=%d
490
+ WHERE post_type=%s AND ID=%d
491
+ ";
492
+ foreach ( $list as $ind => $data ) {
493
+ $sql = $wpdb->prepare(
494
+ $sql_fix,
495
+ ($ind + 1),
496
+ IncPopupItem::POST_TYPE,
497
+ $data->ID
498
+ );
499
+ $wpdb->query( $sql );
500
+ }
501
+ self::after_db();
502
+ }
503
+
504
+ /**
505
+ * Count active PopUps
506
+ *
507
+ * @since 4.6
508
+ * @param int $id Optional. Don't count this PopUp in the results.
509
+ * @return int Number of active PopUps
510
+ */
511
+ public function count_active( $id = '' ) {
512
+ global $wpdb;
513
+
514
+ if ( ! is_scalar( $id ) ) { $id = ''; }
515
+ $sql = "
516
+ SELECT COUNT(1)
517
+ FROM {$wpdb->posts}
518
+ WHERE post_type=%s AND post_status=%s AND ID!=%s
519
+ ";
520
+ $sql = $wpdb->prepare( $sql, IncPopupItem::POST_TYPE, 'publish', $id );
521
+ $count = $wpdb->get_var( $sql );
522
+
523
+ return $count;
524
+ }
525
+
526
+ /**
527
+ * Deactivate all active PopUps
528
+ *
529
+ * @since 4.6
530
+ */
531
+ public function deactivate_all() {
532
+ global $wpdb;
533
+
534
+ $sql = "
535
+ UPDATE {$wpdb->posts}
536
+ SET post_status=%s
537
+ WHERE post_type=%s AND post_status=%s
538
+ ";
539
+ $sql = $wpdb->prepare( $sql, 'draft', IncPopupItem::POST_TYPE, 'publish' );
540
+ $wpdb->query( $sql );
541
+ }
542
+
543
+ /**
544
+ * Returns the plugin settings.
545
+ *
546
+ * @since 4.6
547
+ * @return array.
548
+ */
549
+ public function get_settings() {
550
+ $defaults = array(
551
+ 'loadingmethod' => 'ajax',
552
+ 'geo_db' => false,
553
+ 'rules' => array(
554
+ 'class-popup-rule-browser.php',
555
+ 'class-popup-rule-geo.php',
556
+ 'class-popup-rule-popup.php',
557
+ 'class-popup-rule-referrer.php',
558
+ 'class-popup-rule-url.php',
559
+ 'class-popup-rule-user.php',
560
+ 'class-popup-rule-prosite.php',
561
+ )
562
+ );
563
+
564
+ $data = (array) self::_get_option( 'inc_popup-config', array() );
565
+
566
+ if ( ! is_array( $data ) ) { $data = array(); }
567
+ foreach ( $defaults as $key => $def_value ) {
568
+ if ( ! isset( $data[$key] ) ) {
569
+ $data[$key] = $def_value;
570
+ }
571
+ }
572
+
573
+ return $data;
574
+ }
575
+
576
+ /**
577
+ * Saves the plugin settings.
578
+ *
579
+ * @since 4.6
580
+ * @param array $value The value to save.
581
+ */
582
+ public function set_settings( $value ) {
583
+ self::_set_option( 'inc_popup-config', $value );
584
+ }
585
+
586
+ /**
587
+ * Returns the value of a named flag of the current user.
588
+ * Table: User-Meta
589
+ *
590
+ * @since 4.6
591
+ * @param string $key
592
+ * @return mixed
593
+ */
594
+ public function get_flag( $key ) {
595
+ $data = get_user_meta( get_current_user_id(), 'po_data', true );
596
+ if ( is_object( $data ) ) { $data = (array) $data; }
597
+ if ( ! is_array( $data ) ) { $data = array(); }
598
+
599
+ return @$data[$key];
600
+ }
601
+
602
+ /**
603
+ * Saves a flag for the current user.
604
+ * Table: User-Meta
605
+ *
606
+ * @since 4.6
607
+ * @param string $key
608
+ * @param mixed $value
609
+ */
610
+ public function set_flag( $key, $value ) {
611
+ $data = get_user_meta( get_current_user_id(), 'po_data', true );
612
+ if ( is_object( $data ) ) { $data = (array) $data; }
613
+ if ( ! is_array( $data ) ) { $data = array(); }
614
+ $data[$key] = $value;
615
+
616
+ update_user_meta( get_current_user_id(), 'po_data', $data );
617
+ }
618
+
619
+ /**
620
+ * Internal function to get a option value from correct options table.
621
+ * Table: Blog-Options
622
+ *
623
+ * @since 4.6
624
+ */
625
+ static protected function _get_option( $key, $default ) {
626
+ $value = $default;
627
+ self::before_db();
628
+ if ( IncPopup::use_global() ) {
629
+ $value = get_site_option( $key, $default );
630
+ } else {
631
+ $value = get_option( $key, $default );
632
+ }
633
+ self::after_db();
634
+ return $value;
635
+ }
636
+
637
+ /**
638
+ * Internal function to save a value to the correct options table.
639
+ * Table: Blog-Options
640
+ *
641
+ * @since 4.6
642
+ */
643
+ static protected function _set_option( $key, $value ) {
644
+ self::before_db();
645
+ if ( IncPopup::use_global() ) {
646
+ update_site_option( $key, $value );
647
+ } else {
648
+ update_option( $key, $value );
649
+ }
650
+ self::after_db();
651
+ }
652
+
653
+ /**
654
+ * Selects the correct database, in case the PO_GLOBAL flag is true.
655
+ *
656
+ * @since 4.6
657
+ */
658
+ static public function before_db() {
659
+ if ( IncPopup::use_global() ) {
660
+ switch_to_blog( BLOG_ID_CURRENT_SITE );
661
+ }
662
+ }
663
+
664
+ /**
665
+ * Selects the correct database, in case the PO_GLOBAL flag is true.
666
+ *
667
+ * @since 4.6
668
+ */
669
+ static public function after_db() {
670
+ if ( IncPopup::use_global() ) {
671
+ restore_current_blog();
672
+ }
673
+ }
674
+
675
+
676
+ /*==============================*\
677
+ ==================================
678
+ == ==
679
+ == IP CACHE ==
680
+ == ==
681
+ ==================================
682
+ \*==============================*/
683
+
684
+
685
+ /**
686
+ * Returns the country code that is associated with the IP Address from the
687
+ * local cache table.
688
+ *
689
+ * @since 4.6
690
+ * @param string $ip The IP Address.
691
+ * @return string Associated country code (or empty string).
692
+ */
693
+ static public function get_country( $ip ) {
694
+ global $wpdb;
695
+ $Country = array();
696
+
697
+ if ( ! isset( $Country[$ip] ) ) {
698
+ $ip_table = self::db_prefix( self::IP_TABLE );
699
+ $sql = "
700
+ SELECT country
701
+ FROM {$ip_table}
702
+ WHERE IP = %s
703
+ ";
704
+ $sql = $wpdb->prepare( $sql, $ip );
705
+ $Country[$ip] = $wpdb->get_var( $sql );
706
+
707
+ if ( null === $Country[$ip] ) { $Country[$ip] = ''; }
708
+ }
709
+
710
+ return $Country[$ip];
711
+ }
712
+
713
+ /**
714
+ * Adds information to the IP-Cache table.
715
+ *
716
+ * @since 4.6
717
+ * @param string $ip The IP Address.
718
+ * @param string $country Country code.
719
+ */
720
+ static public function add_ip( $ip, $country ) {
721
+ global $wpdb;
722
+
723
+ $ip_table = self::db_prefix( self::IP_TABLE );
724
+
725
+ // Delete the cached data, if it already exists.
726
+ $sql = "
727
+ DELETE FROM $ip_table
728
+ WHERE IP = %s
729
+ ";
730
+ $sql = $wpdb->prepare( $sql, $ip );
731
+ $wpdb->query( $sql );
732
+
733
+ // Insert the new dataset.
734
+ $sql = "
735
+ INSERT INTO $ip_table (IP, country, cached)
736
+ VALUES (%s, %s, %s)
737
+ ";
738
+ $sql = $wpdb->prepare( $sql, $ip, $country, time() );
739
+ $wpdb->query( $sql );
740
+ }
741
+
742
+ }
inc/class-popup-item.php ADDED
@@ -0,0 +1,765 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class represents a single popup object.
5
+ * Data is stored in database as custom posttype.
6
+ */
7
+ class IncPopupItem {
8
+
9
+ // Popups are stored in DB as custom post-types. This is the post type key.
10
+ const POST_TYPE = 'inc_popup';
11
+
12
+ // The styles available for this popup.
13
+ public $styles = null;
14
+
15
+ // The available options for the display setting.
16
+ static public $display_opts = array(
17
+ 'delay' /* show popup after X seconds */,
18
+ 'scroll' /* show popup when user scrolls X % down */,
19
+ 'anchor' /* show popup when user scrolls past element X */,
20
+ );
21
+
22
+ // Internal Popup ID.
23
+ public $id = 0;
24
+
25
+ // Internal Popup title.
26
+ public $name = '';
27
+
28
+ // Popup order.
29
+ public $order = 0;
30
+
31
+ // Status: Active/Inactive/Trash
32
+ public $status = 'inactive';
33
+
34
+ // Original status (used while saving to check if status changed)
35
+ private $orig_status = 'inactive';
36
+
37
+ // -- Content
38
+
39
+ // Popup HTML content.
40
+ public $content = '';
41
+
42
+ // Original HTML content (used while saving to check if the content changed)
43
+ private $orig_content = '';
44
+
45
+ // Popup title.
46
+ public $title = '';
47
+
48
+ // Popup subtitle.
49
+ public $subtitle = '';
50
+
51
+ // Label of the CTA button.
52
+ public $cta_label = '';
53
+
54
+ // Link for the CTA button.
55
+ public $cta_link = '';
56
+
57
+ // Image dispalyed in the popup.
58
+ public $image = '';
59
+
60
+ // Image position (left/right)
61
+ public $image_pos = '';
62
+
63
+ // Show image on mobile devices?
64
+ public $image_mobile = true;
65
+
66
+ // -- Appearance
67
+
68
+ // CSS style of the popup.
69
+ public $style = 'minimal';
70
+
71
+ // Info if the used popup-style is old (4.5 or earlier)
72
+ public $deprecated_style = false;
73
+
74
+ // Checkbox: Use custom size.
75
+ public $custom_size = false;
76
+
77
+ // Popup size (width, height of the box).
78
+ public $size = array();
79
+
80
+ // Checkbox: Use custom colors.
81
+ public $custom_colors = false;
82
+
83
+ // Colors (background, font).
84
+ public $color = array();
85
+
86
+ // CSS option "no rounded corners".
87
+ public $round_corners = true;
88
+
89
+ // -- "Never show again" options
90
+
91
+ // Add button "Never show popup again".
92
+ public $can_hide = false;
93
+
94
+ // "Close button acts as 'Never show popup again'".
95
+ public $close_is_hide = false;
96
+
97
+ // Expiration of "Never show popup again" (in days).
98
+ public $hide_expire = 365;
99
+
100
+ // Close popup when user clicks on the background overlay?
101
+ public $overlay_close = true;
102
+
103
+ // -- Display options
104
+
105
+ // When to display the popup (delay/scroll/anchor).
106
+ public $display = 'delay';
107
+
108
+ // Collection of additional options for the $display option (e.g. delay, ...)
109
+ public $display_data = array();
110
+
111
+ // -- Conditions
112
+
113
+ // Conditions that need to be true in order to use the popup.
114
+ public $rule = array();
115
+
116
+ // Specifies which rule-files are needed to handle all popup conditions.
117
+ public $rule_files = array();
118
+
119
+ // Extra arguments for the conditions
120
+ // (e.g. "rule[0] = count" and "rule_data[count] = 3")
121
+ public $rule_data = array();
122
+
123
+ // This is used to store dynamic properties used by templates, such as the
124
+ // div-ID string or custom css styles.
125
+ public $code = null;
126
+
127
+ // Public collection of details that are passed to frontend javascript to
128
+ // render the popup.
129
+ public $script_data = array();
130
+
131
+ // Flag that defines if the PopUp is displayed in preview-mode.
132
+ public $is_preview = false;
133
+
134
+ // -------------------------------------------------------------------------
135
+
136
+ /**
137
+ * Create and populate a new popup object.
138
+ *
139
+ * @since 4.6
140
+ * @param mixed $data Data to populate the new object with.
141
+ * Not specified .. An empty/new popup will be created.
142
+ * Array .. Popup will be populated with values from array.
143
+ * Number .. Popup will be populated from DB (data = post_id)
144
+ */
145
+ public function __construct( $data = null ) {
146
+ if ( is_int( $data ) ) {
147
+ $this->load( $data );
148
+ } else {
149
+ if ( is_array( $data ) || is_object( $data ) ) {
150
+ $this->populate( $data );
151
+ } else {
152
+ $this->reset();
153
+ }
154
+ }
155
+ }
156
+
157
+ /**
158
+ * Reset the popup object to default values.
159
+ *
160
+ * @since 4.6
161
+ */
162
+ public function reset() {
163
+ $this->id = 0;
164
+ $this->name = '';
165
+ $this->order = 0;
166
+ $this->status = 'inactive';
167
+ $this->orig_status = 'inactive';
168
+ $this->content = '';
169
+ $this->orig_content = '';
170
+ $this->title = '';
171
+ $this->subtitle = '';
172
+ $this->cta_label = '';
173
+ $this->cta_link = '';
174
+ $this->image = '';
175
+ $this->image_pos = 'right';
176
+ $this->image_mobile = true;
177
+ $this->custom_size = false;
178
+ $this->size = array(
179
+ 'width' => '',
180
+ 'height' => '',
181
+ );
182
+ $this->custom_colors = false;
183
+ $this->color = array(
184
+ 'col1' => '',
185
+ 'col2' => '',
186
+ );
187
+ $this->style = 'minimal';
188
+ $this->deprecated_style = false;
189
+ $this->round_corners = true;
190
+ $this->can_hide = false;
191
+ $this->close_hides = false;
192
+ $this->hide_expire = 365;
193
+ $this->overlay_close = true;
194
+ $this->display = 'delay';
195
+ $this->display_data = array(
196
+ 'delay' => 0,
197
+ 'delay_type' => 0,
198
+ 'scroll' => 0,
199
+ 'scroll_type' => '%',
200
+ 'anchor' => '',
201
+ );
202
+ $this->rule = array();
203
+ $this->rule_files = array();
204
+ $this->rule_data = array();
205
+
206
+ $this->code = (object) array();
207
+ $this->code->id = 'a' . md5( date( 'dis' ) );
208
+ $this->code->colors = '';
209
+ }
210
+
211
+ /**
212
+ * Populate the object from the specified data collection.
213
+ *
214
+ * @since 4.6
215
+ * @param array|object $data Describes the data to populate the popup with.
216
+ */
217
+ public function populate( $data ) {
218
+ if ( is_object( $data ) ) {
219
+ $data = (array) $data;
220
+ }
221
+ if ( ! is_array( $data ) ) {
222
+ return;
223
+ }
224
+
225
+ $styles = apply_filters( 'popup-styles', array() );
226
+ $style_keys = array_keys( $styles );
227
+
228
+ isset( $data['id'] ) && $this->id = $data['id'];
229
+ isset( $data['name'] ) && $this->name = $data['name'];
230
+ isset( $data['order'] ) && $this->order = $data['order'];
231
+ isset( $data['active'] ) && $this->status = $data['active'] ? 'active' : 'inactive';
232
+ isset( $data['status'] ) && $this->status = $data['status'];
233
+
234
+ isset( $data['content'] ) && $this->content = $data['content'];
235
+ isset( $data['image'] ) && $this->image = $data['image'];
236
+ isset( $data['image_pos'] ) && $this->image_pos = $data['image_pos'];
237
+ isset( $data['image_mobile'] ) && $this->image_mobile = $data['image_mobile'];
238
+ isset( $data['title'] ) && $this->title = $data['title'];
239
+ isset( $data['subtitle'] ) && $this->subtitle = $data['subtitle'];
240
+ isset( $data['cta_label'] ) && $this->cta_label = $data['cta_label'];
241
+ isset( $data['cta_link'] ) && $this->cta_link = $data['cta_link'];
242
+ isset( $data['custom_size'] ) && $this->custom_size = $data['custom_size'];
243
+
244
+ isset( $data['size']['width'] ) && $this->size['width'] = $data['size']['width'];
245
+ isset( $data['size']['height'] ) && $this->size['height'] = $data['size']['height'];
246
+ is_numeric( @$this->size['width'] ) && $this->size['width'] .= 'px';
247
+ is_numeric( @$this->size['height'] ) && $this->size['height'] .= 'px';
248
+
249
+ is_array( @$data['color'] ) && $this->color = $data['color'];
250
+ if ( isset( $data['custom_colors'] ) ) {
251
+ $this->custom_colors = (true == $data['custom_colors']);
252
+ }
253
+
254
+ in_array( @$data['style'], $style_keys ) && $this->style = $data['style'];
255
+ isset( $data['round_corners'] ) && $this->round_corners = (true == $data['round_corners']);
256
+ isset( $data['can_hide'] ) && $this->can_hide = (true == $data['can_hide']);
257
+ isset( $data['close_hides'] ) && $this->close_hides = (true == $data['close_hides']);
258
+ absint( @$data['hide_expire'] ) > 0 && $this->hide_expire = absint( $data['hide_expire'] );
259
+ isset( $data['overlay_close'] ) && $this->overlay_close = ( true == $data['overlay_close'] );
260
+
261
+ in_array( @$data['display'], self::$display_opts ) && $this->display = $data['display'];
262
+
263
+ is_array( @$data['display_data'] ) || $data['display_data'] = array();
264
+ $this->display_data = $data['display_data'];
265
+
266
+ is_array( @$data['rule'] ) && $this->rule = $data['rule'];
267
+ is_array( @$data['rule_data'] ) && $this->rule_data = $data['rule_data'];
268
+
269
+ $this->validate_data();
270
+ }
271
+
272
+ /**
273
+ * Validates and sanitizes the current popup details.
274
+ *
275
+ * @since 4.6
276
+ */
277
+ protected function validate_data() {
278
+ $styles = apply_filters( 'popup-styles', array() );
279
+
280
+ // Color.
281
+ if ( ! is_array( $this->color ) ) { $this->color = array(); }
282
+ if ( ! isset( $this->color['col1'] ) ) { $this->color['col1'] = ''; }
283
+ if ( ! isset( $this->color['col2'] ) ) { $this->color['col2'] = ''; }
284
+ if ( ! empty( $this->color['col1'] ) && $this->color['col1'][0] !== '#' ) {
285
+ $this->color['col1'] = '#' . $this->color['col1'];
286
+ }
287
+ if ( ! empty( $this->color['col2'] ) && $this->color['col2'][0] !== '#' ) {
288
+ $this->color['col2'] = '#' . $this->color['col2'];
289
+ }
290
+
291
+ // Size.
292
+ if ( ! is_array( $this->size ) ) { $this->size = array(); }
293
+ if ( ! isset( $this->size['width'] ) ) { $this->size['width'] = ''; }
294
+ if ( ! isset( $this->size['height'] ) ) { $this->size['height'] = ''; }
295
+
296
+ // Style.
297
+ if ( ! isset( $styles[ $this->style ] ) ) { $this->style = 'minimal'; } // default style.
298
+ $this->deprecated_style = @$styles[ $this->style ]->deprecated;
299
+
300
+ // Boolean types.
301
+ $this->custom_size = (true == @$this->custom_size);
302
+ $this->custom_colors = (true == @$this->custom_colors);
303
+ $this->deprecated_style = (true == @$this->deprecated_style);
304
+ $this->round_corners = (true == @$this->round_corners);
305
+ $this->can_hide = (true == @$this->can_hide);
306
+ $this->close_hides = (true == @$this->close_hides);
307
+ $this->overlay_close = (true == @$this->overlay_close);
308
+
309
+ // Numeric types.
310
+ $this->hide_expire = absint( $this->hide_expire );
311
+ $this->display_data['delay'] = absint( @$this->display_data['delay'] );
312
+ $this->display_data['scroll'] = absint( @$this->display_data['scroll'] );
313
+ $this->display_data['delay_type'] = @$this->display_data['delay_type'];
314
+ $this->display_data['scroll_type'] = @$this->display_data['scroll_type'];
315
+ $this->display_data['anchor'] = @$this->display_data['anchor'];
316
+
317
+ // Display behavior.
318
+ if ( ! in_array( $this->display, self::$display_opts ) ) { $this->display = 'delay'; }
319
+ if ( 'm' != $this->display_data['delay_type'] ) { $this->display_data['delay_type'] = 's'; }
320
+ if ( 'px' != $this->display_data['scroll_type'] ) { $this->display_data['scroll_type'] = '%'; }
321
+
322
+ // Rules.
323
+ if ( ! is_array( $this->rule ) ) { $this->rule = array(); }
324
+ $this->rule_files = array();
325
+ foreach ( $this->rule as $ind => $key ) {
326
+ if ( empty( $key ) ) { unset( $this->rule[$ind] ); }
327
+
328
+ // Set rule-files.
329
+ $file = IncPopupRules::file_for_rule( $key );
330
+ if ( $file && ! in_array( $file, $this->rule_files ) ) {
331
+ $this->rule_files[] = $file;
332
+ }
333
+ }
334
+ if ( ! is_array( $this->rule_data ) ) { $this->rule_data = array(); }
335
+ foreach ( $this->rule_data as $ind => $key ) {
336
+ if ( empty( $key ) ) { unset( $this->rule_data[$ind] ); }
337
+ }
338
+
339
+ // Generate unique ID.
340
+ $this->code->id = 'a' . md5( $this->id . date( 'dis' ) );
341
+
342
+ // Display data (legacy code for old styles).
343
+ if ( $this->custom_colors ) {
344
+ $this->code->colors = 'color:' . $this->color['col2'] . ';background:' . $this->color['col1'] . ';';
345
+ } else {
346
+ $this->code->colors = 'color:#000000;background:#FFFFFF;';
347
+ }
348
+
349
+ // Display data.
350
+ if ( ! $this->custom_colors || empty ( $this->color['col1'] ) ) {
351
+ $this->code->color1 = '#488CFD';
352
+ } else {
353
+ $this->code->color1 = $this->color['col1'];
354
+ }
355
+ if ( ! $this->custom_colors || empty ( $this->color['col2'] ) ) {
356
+ $this->code->color2 = '#FFFFFF';
357
+ } else {
358
+ $this->code->color2 = $this->color['col2'];
359
+ }
360
+
361
+ $this->script_data['html_id'] = $this->code->id;
362
+ $this->script_data['popup_id'] = $this->id;
363
+ $this->script_data['close_hide'] = $this->close_hides;
364
+ $this->script_data['expiry'] = $this->hide_expire;
365
+ $this->script_data['custom_size'] = $this->custom_size;
366
+ $this->script_data['width'] = trim( str_replace( 'px', '', $this->size['width'] ) );
367
+ $this->script_data['height'] = trim( str_replace( 'px', '', $this->size['height'] ) );
368
+ $this->script_data['overlay_close'] = $this->overlay_close;
369
+ $this->script_data['display'] = $this->display;
370
+ $this->script_data['display_data'] = $this->display_data;
371
+
372
+ // Validation only done when editing popups.
373
+ if ( is_admin() ) {
374
+ // Name.
375
+ if ( empty( $this->name ) ) {
376
+ $this->name = __( 'New PopUp', PO_LANG );
377
+ }
378
+
379
+ // Order.
380
+ if ( empty( $this->id ) || empty( $this->order ) ) {
381
+ $this->order = IncPopupDatabase::next_order();
382
+ }
383
+
384
+ // Rule-files.
385
+ $this->rule_files = array();
386
+ foreach ( $this->rule as $ind => $key ) {
387
+ $file = IncPopupRules::file_for_rule( $key );
388
+ if ( $file && ! in_array( $file, $this->rule_files ) ) {
389
+ $this->rule_files[] = $file;
390
+ }
391
+ }
392
+
393
+ // Check if the "id" is valid!
394
+ if ( $this->id > 0 && self::POST_TYPE !== get_post_type( $this->id ) ) {
395
+ $this->id = 0;
396
+ }
397
+ }
398
+ }
399
+
400
+ /**
401
+ * Populate current popup object from DB.
402
+ *
403
+ * @since 4.6
404
+ * @param int $id The post_id of the popup in database.
405
+ */
406
+ public function load( $id ) {
407
+ $post = get_post( $id );
408
+
409
+ $this->reset();
410
+
411
+ // Item does not exist.
412
+ if ( ! $post || 'auto-draft' == $post->post_status ) {
413
+ return;
414
+ }
415
+
416
+ // Item is a different post type.
417
+ if ( ! self::POST_TYPE == $post->post_type ) {
418
+ return;
419
+ }
420
+
421
+ switch ( $post->post_status ) {
422
+ case 'publish': $status = 'active'; break;
423
+ case 'draft': $status = 'inactive'; break;
424
+ case 'trash': $status = 'trash'; break;
425
+ default: $status = 'inactive'; break;
426
+ }
427
+
428
+ $styles = apply_filters( 'popup-styles', array() );
429
+
430
+ $this->id = $post->ID;
431
+ $this->name = $post->post_title;
432
+ $this->status = $status;
433
+ $this->orig_status = $status;
434
+ $this->content = $post->post_content;
435
+ $this->orig_content = $post->post_content;
436
+ $this->order = $post->menu_order;
437
+
438
+ // Read metadata of the popup.
439
+ $this->title = get_post_meta( $this->id, 'po_title', true );
440
+ $this->image = get_post_meta( $this->id, 'po_image', true );
441
+ $this->image_pos = get_post_meta( $this->id, 'po_image_pos', true );
442
+ $this->image_mobile = get_post_meta( $this->id, 'po_image_mobile', true );
443
+ $this->subtitle = get_post_meta( $this->id, 'po_subtitle', true );
444
+ $this->cta_label = get_post_meta( $this->id, 'po_cta_label', true );
445
+ $this->cta_link = get_post_meta( $this->id, 'po_cta_link', true );
446
+ $this->custom_size = get_post_meta( $this->id, 'po_custom_size', true );
447
+ $this->size = get_post_meta( $this->id, 'po_size', true );
448
+ $this->color = get_post_meta( $this->id, 'po_color', true );
449
+ $this->custom_colors = get_post_meta( $this->id, 'po_custom_colors', true );
450
+ $this->style = get_post_meta( $this->id, 'po_style', true );
451
+ $this->round_corners = get_post_meta( $this->id, 'po_round_corners', true );
452
+ $this->can_hide = get_post_meta( $this->id, 'po_can_hide', true );
453
+ $this->close_hides = get_post_meta( $this->id, 'po_close_hides', true );
454
+ $this->hide_expire = get_post_meta( $this->id, 'po_hide_expire', true );
455
+ $this->overlay_close = get_post_meta( $this->id, 'po_overlay_close', true );
456
+ $this->display = get_post_meta( $this->id, 'po_display', true );
457
+ $this->display_data = get_post_meta( $this->id, 'po_display_data', true );
458
+ $this->rule = get_post_meta( $this->id, 'po_rule', true );
459
+ $this->rule_files = get_post_meta( $this->id, 'po_rule_files', true );
460
+ $this->rule_data = get_post_meta( $this->id, 'po_rule_data', true );
461
+
462
+ $this->validate_data();
463
+ }
464
+
465
+ /**
466
+ * Save the current popup to the database.
467
+ *
468
+ * @since 4.6
469
+ * @param bool $show_message If true then a success message will be
470
+ * displayed. Set to false when saving via ajax.
471
+ */
472
+ public function save( $show_message = true ) {
473
+ global $allowedposttags;
474
+
475
+ $this->validate_data();
476
+
477
+ if ( ! did_action( 'wp_loaded' ) ) {
478
+ add_action( 'wp_loaded', array( $this, 'save' ) );
479
+ return false;
480
+ }
481
+
482
+ switch ( $this->status ) {
483
+ case 'active': $status = 'publish'; break;
484
+ case 'inactive': $status = 'draft'; break;
485
+ case 'trash': $status = 'trash'; break;
486
+ default: $status = 'draft'; break;
487
+ }
488
+
489
+ if ( $status == 'publish' ) {
490
+ // Limit the number of active PopUps.
491
+ if ( 0 != IncPopupDatabase::count_active( $this->id ) ) {
492
+ IncPopupDatabase::deactivate_all();
493
+
494
+ WDev()->message(
495
+ sprintf(
496
+ __(
497
+ 'In the free version you can activate 1 PopUp. ' .
498
+ 'The PRO Version allows you to have unlimited ' .
499
+ 'active PopUps! ' .
500
+ '<a href="%1$s" target="_blank">Find out more &raquo;</a>',
501
+ PO_LANG
502
+ ),
503
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
504
+ )
505
+ );
506
+ }
507
+ }
508
+
509
+ // When the content changed make sure to only allow valid code!
510
+ if ( $this->content != $this->orig_content && ! current_user_can( 'unfiltered_html' ) ) {
511
+ $this->content = wp_kses( $this->content, $allowedposttags );
512
+ }
513
+
514
+ $post = array(
515
+ 'ID' => (0 == $this->id ? '' : $this->id),
516
+ 'post_title' => $this->name,
517
+ 'post_status' => $status,
518
+ 'post_type' => self::POST_TYPE,
519
+ 'post_content' => $this->content,
520
+ 'menu_order' => $this->order,
521
+ );
522
+
523
+ // Save the main popup item.
524
+ $res = wp_insert_post( $post );
525
+
526
+ if ( ! empty( $res ) ) {
527
+ $this->id = $res;
528
+
529
+ // Save metadata of the popup.
530
+ update_post_meta( $this->id, 'po_title', $this->title );
531
+ update_post_meta( $this->id, 'po_image', $this->image );
532
+ update_post_meta( $this->id, 'po_image_pos', $this->image_pos );
533
+ update_post_meta( $this->id, 'po_image_mobile', $this->image_mobile );
534
+ update_post_meta( $this->id, 'po_subtitle', $this->subtitle );
535
+ update_post_meta( $this->id, 'po_cta_label', $this->cta_label );
536
+ update_post_meta( $this->id, 'po_cta_link', $this->cta_link );
537
+ update_post_meta( $this->id, 'po_custom_size', $this->custom_size );
538
+ update_post_meta( $this->id, 'po_size', $this->size );
539
+ update_post_meta( $this->id, 'po_color', $this->color );
540
+ update_post_meta( $this->id, 'po_custom_colors', $this->custom_colors );
541
+ update_post_meta( $this->id, 'po_style', $this->style );
542
+ update_post_meta( $this->id, 'po_round_corners', $this->round_corners );
543
+ update_post_meta( $this->id, 'po_can_hide', $this->can_hide );
544
+ update_post_meta( $this->id, 'po_close_hides', $this->close_hides );
545
+ update_post_meta( $this->id, 'po_hide_expire', $this->hide_expire );
546
+ update_post_meta( $this->id, 'po_overlay_close', $this->overlay_close );
547
+ update_post_meta( $this->id, 'po_display', $this->display );
548
+ update_post_meta( $this->id, 'po_display_data', $this->display_data );
549
+ update_post_meta( $this->id, 'po_rule', $this->rule );
550
+ update_post_meta( $this->id, 'po_rule_files', $this->rule_files );
551
+ update_post_meta( $this->id, 'po_rule_data', $this->rule_data );
552
+ }
553
+
554
+ if ( $show_message ) {
555
+ if ( ! empty( $res ) ) {
556
+ if ( $this->orig_status === $this->status ) {
557
+ $msg = __( 'Saved PopUp "<strong>%1$s</strong>"', PO_LANG );
558
+ } else {
559
+ switch ( $status ) {
560
+ case 'publish':
561
+ $msg = __( 'Activated PopUp "<strong>%1$s</strong>".', PO_LANG );
562
+ break;
563
+
564
+ case 'draft':
565
+ $msg = __( 'Deactivated PopUp "<strong>%1$s</strong>".', PO_LANG );
566
+ break;
567
+
568
+ case 'trash':
569
+ $msg = __( 'Moved PopUp "<strong>%1$s</strong>" to trash.', PO_LANG );
570
+ break;
571
+
572
+ default:
573
+ $msg = __( 'Saved PopUp "<strong>%1$s</strong>".', PO_LANG );
574
+ break;
575
+ }
576
+ }
577
+ WDev()->message( sprintf( $msg, $this->name ) );
578
+ } else {
579
+ WDev()->message( __( 'Could not save PopUp.', PO_LANG ), 'err' );
580
+ }
581
+ }
582
+
583
+ return true;
584
+ }
585
+
586
+ /**
587
+ * Checks whether the current popup uses the specified rule or not.
588
+ *
589
+ * @since 4.6
590
+ * @param string $key Rule-ID.
591
+ * @return bool
592
+ */
593
+ public function uses_rule( $key ) {
594
+ $active = false;
595
+
596
+ foreach ( $this->rule as $ind => $rule_key ) {
597
+ if ( $key == $rule_key ) {
598
+ $active = true;
599
+ break;
600
+ }
601
+ }
602
+
603
+ return $active;
604
+ }
605
+
606
+ /**
607
+ * Load the PopUp HTML code from the popup.php template.
608
+ *
609
+ * @since 4.6
610
+ * @return string HTML code.
611
+ */
612
+ protected function load_html() {
613
+ static $Html = array();
614
+
615
+ if ( ! isset( $Html[ $this->id ] ) ) {
616
+ $styles = apply_filters( 'popup-styles', array() );
617
+ $details = $styles[$this->style];
618
+
619
+ $Html[ $this->id ] = '';
620
+ $tpl_file = $details->dir . 'template.php';
621
+
622
+ if ( file_exists( $tpl_file ) ) {
623
+ ob_start();
624
+ include( $tpl_file );
625
+ $Html[ $this->id ] = ob_get_contents();
626
+ ob_end_clean();
627
+
628
+ $Html[ $this->id ] = str_replace( array( "\t", "\r", "\n", ' ' ), ' ', $Html[ $this->id ] );
629
+ $Html[ $this->id ] = str_replace( array( ' ', ' ', ' ' ), ' ', $Html[ $this->id ] );
630
+ $Html[ $this->id ] = str_replace( '#000001', $this->code->color1, $Html[ $this->id ] );
631
+ $Html[ $this->id ] = str_replace( '#000002', $this->code->color2, $Html[ $this->id ] );
632
+ }
633
+ }
634
+
635
+ return $Html[ $this->id ];
636
+ }
637
+
638
+ /**
639
+ * Load the PopUp CSS styles from the style.css template.
640
+ *
641
+ * @since 4.6
642
+ * @return string CSS code.
643
+ */
644
+ protected function load_styles() {
645
+ static $Code = array();
646
+
647
+ if ( ! isset( $Code[ $this->id ] ) ) {
648
+ $styles = apply_filters( 'popup-styles', array() );
649
+ $details = $styles[$this->style];
650
+
651
+ $Code[ $this->id ] = '';
652
+ $tpl_file = $details->dir . 'style.css';
653
+
654
+ if ( file_exists( $tpl_file ) ) {
655
+ ob_start();
656
+ include( $tpl_file );
657
+ $Code[ $this->id ] = ob_get_contents();
658
+ ob_end_clean();
659
+
660
+ $Code[ $this->id ] = str_replace( '#messagebox', '#' . $this->code->id, $Code[ $this->id ] );
661
+ $Code[ $this->id ] = str_replace( '%styleurl%', $details->url, $Code[ $this->id ] );
662
+ $Code[ $this->id ] = str_replace( '#000001', $this->code->color1, $Code[ $this->id ] );
663
+ $Code[ $this->id ] = str_replace( '#000002', $this->code->color2, $Code[ $this->id ] );
664
+ }
665
+ }
666
+ return $Code[ $this->id ];
667
+ }
668
+
669
+ /**
670
+ * Returns the script-data collection.
671
+ *
672
+ * @since 4.6
673
+ * @param bool $is_preview Optional. Defines if we display a preview of the
674
+ * PopUp (Dashboard) or the real PopUp (Front End)
675
+ * @return array
676
+ */
677
+ public function get_script_data( $is_preview = false ) {
678
+ static $Data = array();
679
+
680
+ if ( ! isset( $Data[ $this->id ] ) ) {
681
+ $this->is_preview = $is_preview;
682
+ $Data[ $this->id ] = $this->script_data;
683
+ $Data[ $this->id ]['html'] = $this->load_html();
684
+ $Data[ $this->id ]['styles'] = $this->load_styles();
685
+
686
+ $Data[ $this->id ] = apply_filters( 'popup-output-data', $Data[ $this->id ], $this );
687
+
688
+ if ( $is_preview ) {
689
+ $Data[ $this->id ] = $this->preview_mode( $Data[ $this->id ] );
690
+ }
691
+ }
692
+
693
+ return $Data[ $this->id ];
694
+ }
695
+
696
+ /**
697
+ * Change some script_data properties for displaying a popup-preview.
698
+ *
699
+ * @since 4.6
700
+ * @param array $data The PopUp data collection.
701
+ * @return array Modified data collection.
702
+ */
703
+ public function preview_mode( $data ) {
704
+ $data['popup_id'] = 'preview-' . $this->id;
705
+ $data['display'] = 'delay';
706
+ $data['display_data']['delay'] = 0;
707
+ $data['display_data']['click_multi'] = false;
708
+ $data['close_hide'] = false;
709
+ $data['preview'] = true;
710
+ return $data;
711
+ }
712
+
713
+
714
+ /*======================================*\
715
+ ==========================================
716
+ == ==
717
+ == STATIC Functions ==
718
+ == ==
719
+ ==========================================
720
+ \*======================================*/
721
+
722
+
723
+ /**
724
+ * Returns an string with the translated condition label.
725
+ *
726
+ * @since 4.6
727
+ * @param string $key Rule ID.
728
+ * @return string Translated rule name.
729
+ */
730
+ static public function condition_label( $key = null ) {
731
+ switch ( $key ) {
732
+ case 'login': return __( 'Visitor is logged in', PO_LANG );
733
+ case 'no_login': return __( 'Visitor is not logged in', PO_LANG );
734
+ case 'url': return __( 'On specific URL', PO_LANG );
735
+ case 'no_url': return __( 'Not on specific URL', PO_LANG );
736
+ case 'country': return __( 'In a specific country', PO_LANG );
737
+ case 'no_country': return __( 'Not in a specific country', PO_LANG );
738
+ case 'prosite': return __( 'Site is not a Pro-site', PO_LANG );
739
+ case 'searchengine': return __( 'Visit via a search engine', PO_LANG );
740
+ case 'no_comment': return __( 'Visitor has never commented', PO_LANG );
741
+ case 'no_internal': return __( 'Visit not via an Internal link', PO_LANG );
742
+ case 'referrer': return __( 'Visit via specific referer', PO_LANG );
743
+ case 'count': return __( 'Popover shown less than x times', PO_LANG );
744
+ default: return apply_filters( 'popup-rule-label', $key, $key );
745
+ }
746
+ }
747
+
748
+ /**
749
+ * Returns the status-label of the specified status key.
750
+ *
751
+ * @since 4.6
752
+ * @param string $key Status Key.
753
+ * @return string Translated status label.
754
+ */
755
+ static public function status_label( $key ) {
756
+ switch ( $key ) {
757
+ case 'active': return __( 'Active', PO_LANG );
758
+ case 'inactive': return __( 'Inactive', PO_LANG );
759
+ case 'trash': return __( 'Trashed', PO_LANG );
760
+ default: return $key;
761
+ }
762
+ }
763
+
764
+
765
+ }
inc/class-popup-posttype.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Defines the custom posttype details for popups.
5
+ */
6
+ class IncPopupPosttype {
7
+
8
+ /**
9
+ * Capability required to use admin interface of the plugin.
10
+ * Defined in constructor.
11
+ * @var string
12
+ */
13
+ static public $perms = '';
14
+
15
+ /**
16
+ * The position of the PopUp main menu.
17
+ * We use a trick to avoid collissions with other menu-items
18
+ * @var int
19
+ */
20
+ static public $menu_pos = 101;
21
+
22
+ /**
23
+ * Returns the singleton instance of the popup database class.
24
+ *
25
+ * @since 4.6
26
+ */
27
+ static public function instance() {
28
+ static $Inst = null;
29
+
30
+ if ( null === $Inst ) {
31
+ $Inst = new IncPopupPosttype();
32
+ }
33
+
34
+ return $Inst;
35
+ }
36
+
37
+ /**
38
+ * Singleton constructor
39
+ */
40
+ private function __construct() {
41
+ /**
42
+ * Allows users to change the required permission for the popup plugin.
43
+ * Default requirement: manage_options
44
+ *
45
+ * @var string
46
+ */
47
+ self::$perms = apply_filters( 'popover-admin-access-capability', 'manage_options' );
48
+
49
+ // Legacy filter (with underscore)
50
+ self::$perms = apply_filters( 'popover-admin-access_capability', self::$perms );
51
+
52
+ /**
53
+ * Allows users to avoid conflicts with other menu items by assigning a
54
+ * different menu position.
55
+ *
56
+ * @var int
57
+ */
58
+ self::$menu_pos = apply_filters( 'popover-admin-menu-position', self::$menu_pos );
59
+
60
+ // Register the posttype
61
+ self::setup_posttype();
62
+ }
63
+
64
+ /**
65
+ * Register the custom post-type details.
66
+ *
67
+ * @since 4.6
68
+ */
69
+ static private function setup_posttype() {
70
+ // Code generated at http://generatewp.com/post-type/
71
+ $manage_popups = ( true == IncPopup::correct_level() );
72
+
73
+ // Register Custom Post Type
74
+ $labels = array(
75
+ 'name' => _x( 'PopUps', 'Post Type General Name', PO_LANG ),
76
+ 'singular_name' => _x( 'PopUp', 'Post Type Singular Name', PO_LANG ),
77
+ 'menu_name' => __( 'PopUp', PO_LANG ),
78
+ 'parent_item_colon' => __( 'Parent Item:', PO_LANG ),
79
+ 'all_items' => __( 'PopUps', PO_LANG ),
80
+ 'view_item' => __( 'View Item', PO_LANG ),
81
+ 'add_new_item' => __( 'Add New PopUp', PO_LANG ),
82
+ 'add_new' => __( 'Add New', PO_LANG ),
83
+ 'edit_item' => __( 'Edit PopUp', PO_LANG ),
84
+ 'update_item' => __( 'Update PopUp', PO_LANG ),
85
+ 'search_items' => __( 'Search PopUp', PO_LANG ),
86
+ 'not_found' => __( 'Not found', PO_LANG ),
87
+ 'not_found_in_trash' => __( 'No PopUp found in Trash', PO_LANG ),
88
+ );
89
+
90
+ if ( IncPopup::use_global() ) {
91
+ $labels['name'] = _x( 'Global PopUps', 'Post Type General Name', PO_LANG );
92
+ $labels['singular_name'] = _x( 'Global PopUp', 'Post Type Singular Name', PO_LANG );
93
+ $labels['all_items'] = __( 'Global PopUps', PO_LANG );
94
+ }
95
+
96
+ $args = array(
97
+ 'label' => __( 'PopUp', PO_LANG ),
98
+ 'description' => __( 'Display PopUp messages on your website!', PO_LANG ),
99
+ 'labels' => $labels,
100
+ 'supports' => array( '' ),
101
+ 'hierarchical' => false,
102
+ 'public' => false,
103
+ 'show_ui' => $manage_popups,
104
+ 'show_in_menu' => $manage_popups,
105
+ 'show_in_nav_menus' => false,
106
+ 'show_in_admin_bar' => $manage_popups,
107
+ 'menu_position' => self::$menu_pos,
108
+ 'menu_icon' => PO_IMG_URL . 'icon.png',
109
+ 'can_export' => true,
110
+ 'has_archive' => false,
111
+ 'exclude_from_search' => true,
112
+ 'publicly_queryable' => false,
113
+ 'rewrite' => false,
114
+ 'capabilities' => array(
115
+ 'edit_post' => self::$perms,
116
+ 'read_post' => self::$perms,
117
+ 'delete_post' => self::$perms,
118
+ 'edit_posts' => self::$perms,
119
+ 'edit_others_posts' => self::$perms,
120
+ 'publish_posts' => self::$perms,
121
+ 'read_private_posts' => self::$perms,
122
+ ),
123
+ );
124
+ register_post_type( IncPopupItem::POST_TYPE, $args );
125
+ }
126
+
127
+ };
inc/class-popup-public.php ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Load dependencies.
3
+ require_once PO_INC_DIR . 'class-popup-base.php';
4
+
5
+ /**
6
+ * Defines the popup class for front end pages
7
+ *
8
+ * @since 4.6
9
+ */
10
+ class IncPopup extends IncPopupBase {
11
+
12
+ /**
13
+ * Defines the current popup that is displayed.
14
+ * @var IncPopupItem
15
+ */
16
+ protected $popup = null;
17
+
18
+ /**
19
+ * Data added to the page via wp_localize_script()
20
+ * @var array
21
+ */
22
+ protected $script_data = array();
23
+
24
+ /**
25
+ * Returns the singleton instance of the popup (front end) class.
26
+ *
27
+ * @since 4.6
28
+ */
29
+ static public function instance() {
30
+ static $Inst = null;
31
+
32
+ if ( null === $Inst ) {
33
+ $Inst = new IncPopup();
34
+ }
35
+
36
+ return $Inst;
37
+ }
38
+
39
+ /**
40
+ * Private constructor (singleton)
41
+ *
42
+ * @since 4.6
43
+ */
44
+ protected function __construct() {
45
+ parent::__construct();
46
+
47
+ // Init loading-process of the PopUp.
48
+ add_action(
49
+ 'wp', // "wp", not "init"!
50
+ array( $this, 'init_public' )
51
+ );
52
+ }
53
+
54
+
55
+ /*==================================*\
56
+ ======================================
57
+ == ==
58
+ == LOAD METHODS ==
59
+ == ==
60
+ ======================================
61
+ \*==================================*/
62
+
63
+
64
+ /**
65
+ * Initialize the public part of the plugin on every front-end page:
66
+ * Determine how the popup is loaded.
67
+ *
68
+ * @since 4.6
69
+ */
70
+ public function init_public() {
71
+ // Load plugin settings.
72
+ $settings = IncPopupDatabase::get_settings();
73
+
74
+ // Initialize javascript-data.
75
+ $this->script_data['ajaxurl'] = '';
76
+ $this->script_data['do'] = 'get-data';
77
+
78
+ // Find the current loading method.
79
+ $cur_method = @$settings['loadingmethod'];
80
+ if ( empty( $cur_method ) ) { $cur_method = 'ajax'; }
81
+
82
+ /*
83
+ * Apply the specific loading method to include the popup on the page.
84
+ * Details to the loading methods are documented in the header comment
85
+ * of the "load_method_xyz()" functions.
86
+ */
87
+ switch ( $cur_method ) {
88
+ case 'ajax': // former 'external'
89
+ $this->load_method_ajax();
90
+ break;
91
+
92
+ case 'front': // former 'frontloading'
93
+ $this->load_method_front();
94
+
95
+ if ( @$_GET['action'] == 'inc_popup' ) {
96
+ $this->ajax_load_popup();
97
+ }
98
+ break;
99
+
100
+ case 'footer':
101
+ $this->load_method_footer();
102
+ break;
103
+
104
+ default:
105
+ /**
106
+ * Custom loading handler can be processed by an add-on.
107
+ */
108
+ do_action( 'popup-init-loading-method', $cur_method, $this );
109
+ break;
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Enqueues the PopUp javascripts and data.
115
+ *
116
+ * @since 4.6
117
+ */
118
+ public function load_scripts() {
119
+ if ( ! did_action( 'wp' ) ) {
120
+ // We have to make sure that wp is fully initialized:
121
+ // Some rules that use filter 'popup-ajax-data' depend on this.
122
+ add_action(
123
+ 'wp',
124
+ array( __CLASS__, 'load_scripts' )
125
+ );
126
+ return;
127
+ }
128
+
129
+ wp_register_script(
130
+ 'popup-public',
131
+ PO_JS_URL . 'public.min.js',
132
+ array( 'jquery' ),
133
+ false,
134
+ true
135
+ );
136
+
137
+ $popup_data = apply_filters( 'popup-ajax-data', $this->script_data );
138
+
139
+ wp_localize_script(
140
+ 'popup-public',
141
+ '_popup_data',
142
+ $popup_data
143
+ );
144
+
145
+ wp_enqueue_script( 'popup-public' );
146
+ }
147
+
148
+ /**
149
+ * Load-Method: External
150
+ *
151
+ * PopUp data is loaded via a normal WordPress ajax request, directed at
152
+ * the admin-ajax.php handler.
153
+ *
154
+ * @since 4.6
155
+ */
156
+ protected function load_method_ajax() {
157
+ global $pagenow;
158
+
159
+ if ( ! in_array( $pagenow, array( 'wp-login.php', 'wp-register.php' ) ) ) {
160
+ // Data is loaded via a normal WordPress ajax request.
161
+ $this->script_data['ajaxurl'] = admin_url( 'admin-ajax.php' );
162
+ $this->load_scripts();
163
+ }
164
+ }
165
+
166
+ /**
167
+ * Load-Method: Front/Frontloading
168
+ *
169
+ * PopUp data is loaded in an ajax request. The ajax request is directed
170
+ * at the same URL that is currently displayed, but a few URL-parameters are
171
+ * added to instruct the plugin to return popup-data instead the the normal
172
+ * webpage.
173
+ *
174
+ * @since 4.6
175
+ */
176
+ protected function load_method_front() {
177
+ global $pagenow;
178
+
179
+ if ( ! in_array( $pagenow, array( 'wp-login.php', 'wp-register.php' ) ) ) {
180
+ /*
181
+ * Data is loaded via the public URL of the page, simply by adding
182
+ * some URL parameters.
183
+ */
184
+ $this->script_data['ajaxurl'] = '';
185
+ $this->load_scripts();
186
+ }
187
+ }
188
+
189
+ /**
190
+ * Load-Method: Footer
191
+ *
192
+ * The PopUp styles and html is directly injected into the webpage header
193
+ * and footer. The PopUp is ready when the page is loaded. No ajax request
194
+ * is made.
195
+ *
196
+ * @since 4.6
197
+ */
198
+ protected function load_method_footer() {
199
+ /**
200
+ * Set up the rquest information from here.
201
+ * These values are used by some rules and need to be set manually here
202
+ * In an ajax request they would already be defined by the ajax url.
203
+ */
204
+ $_REQUEST['thereferrer'] = @$_SERVER['HTTP_REFERER'];
205
+ $_REQUEST['thefrom'] = WDev()->current_url();
206
+
207
+ // Populates $this->popups
208
+ $this->select_popup();
209
+
210
+ if ( empty( $this->popups ) ) { return; }
211
+
212
+ $data = $this->get_popup_data();
213
+ foreach ( $data as $ind => $item ) {
214
+ unset( $data[$ind]['html'] );
215
+ unset( $data[$ind]['styles'] );
216
+ }
217
+ $this->script_data['popup'] = $data;
218
+ $this->load_scripts();
219
+
220
+ add_action(
221
+ 'wp_head',
222
+ array( $this, 'show_header')
223
+ );
224
+
225
+ add_action(
226
+ 'wp_footer',
227
+ array( $this, 'show_footer')
228
+ );
229
+ }
230
+
231
+ /**
232
+ * Used by "load_method_footer" to print the popup CSS styles.
233
+ *
234
+ * @since 4.6
235
+ */
236
+ public function show_header() {
237
+ if ( empty( $this->popups ) ) { return; }
238
+
239
+ $code = '';
240
+ $data = $this->get_popup_data();
241
+ foreach ( $data as $ind => $item ) {
242
+ $code .= $item['styles'];
243
+ }
244
+ echo '<style type="text/css">' . $code . '</style>';
245
+ }
246
+
247
+ /**
248
+ * Used by "load_method_footer" to print the popup HTML code.
249
+ *
250
+ * @since 4.6
251
+ */
252
+ public function show_footer() {
253
+ if ( empty( $this->popups ) ) { return; }
254
+
255
+ $code = '';
256
+ $data = $this->get_popup_data();
257
+ foreach ( $data as $ind => $item ) {
258
+ $code .= $item['html'];
259
+ }
260
+ echo '' . $code;
261
+ }
262
+
263
+ };
inc/class-popup-rule.php ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Rule-Collection
5
+ */
6
+ class IncPopupRules {
7
+ // List of classes.
8
+ static public $classes = array();
9
+
10
+ // List of all rules.
11
+ static public $rules = array();
12
+
13
+ /**
14
+ * Register a new rule class.
15
+ *
16
+ * @since 4.6
17
+ * @param string $classname Class-name (not object!)
18
+ */
19
+ static public function register( $classname ) {
20
+ self::$classes[] = new $classname();
21
+ }
22
+
23
+
24
+ /**
25
+ * Checks which php file defines the specified rule-ID
26
+ *
27
+ * @since 4.6
28
+ * @param string $key Rule-ID.
29
+ * @return string filename of the rule-file.
30
+ */
31
+ static public function file_for_rule( $key ) {
32
+ $file = '';
33
+
34
+ foreach ( self::$rules as $prio => $list ) {
35
+ if ( isset( $list[ $key ] ) ) {
36
+ $file = $list[ $key ]->filename;
37
+ break;
38
+ }
39
+ }
40
+
41
+ return $file;
42
+ }
43
+
44
+ /**
45
+ * Registers a rule.
46
+ *
47
+ * @since 4.6
48
+ * @param IncPopupRule $obj
49
+ * @param string $filename
50
+ * @param string $id
51
+ * @param string $label
52
+ * @param string $description
53
+ * @param string $exclude Optional. Rule-ID that is excluded when this
54
+ * rule is activated.
55
+ * @param int $priority Defines if the rule is displayed in the top of
56
+ * the list (0) or the bottom (100)
57
+ */
58
+ static public function add_rule( $obj, $filename, $id, $label, $description, $exclude = '', $priority = 10 ) {
59
+ if ( ! isset( self::$rules[ $priority ] ) ) {
60
+ self::$rules[ $priority ] = array();
61
+ }
62
+
63
+ self::$rules[$priority][$id] = (object) array(
64
+ 'obj' => $obj,
65
+ 'filename' => $filename,
66
+ 'label' => $label,
67
+ 'description' => $description,
68
+ 'exclude' => $exclude,
69
+ );
70
+
71
+ ksort( self::$rules, SORT_NUMERIC );
72
+ }
73
+
74
+ /**
75
+ * Register hooks.
76
+ *
77
+ * @since 1.0.0
78
+ */
79
+ public function init() {
80
+ add_filter(
81
+ 'popup-rule-label',
82
+ array( __CLASS__, '_label' ),
83
+ 10, 2
84
+ );
85
+
86
+ add_action(
87
+ 'popup-rule-forms',
88
+ array( __CLASS__, '_admin_rule_form' ),
89
+ 10, 1
90
+ );
91
+
92
+ add_action(
93
+ 'popup-rule-switch',
94
+ array( __CLASS__, '_admin_rule_list' ),
95
+ 10, 1
96
+ );
97
+
98
+ add_filter(
99
+ 'popup-save-rules',
100
+ array( __CLASS__, '_save' ),
101
+ 10, 1
102
+ );
103
+
104
+ add_filter(
105
+ 'popup-apply-rules',
106
+ array( __CLASS__, '_apply' ),
107
+ 10, 2
108
+ );
109
+ }
110
+
111
+
112
+ /*----- INTERNAL FUNCTIONS (handlers) ------*/
113
+
114
+
115
+ /**
116
+ * Filter that returns the rule name if $key is the current rule-ID.
117
+ * Handles filter `popup-rule-label`
118
+ *
119
+ * @since 1.0.0
120
+ */
121
+ static public function _label( $rule, $key ) {
122
+ foreach ( self::$rules as $prio => $list ) {
123
+ if ( isset( $list[ $key ] ) ) {
124
+ return $list[ $key ]->label;
125
+ }
126
+ }
127
+ return '';
128
+ }
129
+
130
+ /**
131
+ * Apply the rule-logic to the specified popup
132
+ *
133
+ * @since 1.0.0
134
+ * @param bool $show Current decission whether popup should be displayed.
135
+ * @param Object $popup The popup that is evaluated.
136
+ * @return bool Updated decission to display popup or not.
137
+ */
138
+ static public function _apply( $show, $popup ) {
139
+ if ( ! $show ) { return false; }
140
+
141
+ foreach ( self::$rules as $prio => $list ) {
142
+ foreach ( $list as $key => $rule ) {
143
+ if ( ! $popup->uses_rule( $key ) ) { continue; }
144
+
145
+ if ( ! $rule->obj->_apply( $key, $show, $popup ) ) {
146
+ return false;
147
+ }
148
+ }
149
+ }
150
+ return true;
151
+ }
152
+
153
+ /**
154
+ * Update and return the $settings array to save the form values.
155
+ *
156
+ * @since 1.0.0
157
+ * @param array $data Collection of rule-settings.
158
+ * @return array The updated rule-settings collection.
159
+ */
160
+ static public function _save( $data ) {
161
+ foreach ( self::$rules as $prio => $list ) {
162
+ foreach ( $list as $key => $rule ) {
163
+ $data = $rule->obj->_save( $key, $data );
164
+ }
165
+ }
166
+ return $data;
167
+ }
168
+
169
+ /**
170
+ * Display the rule form inside the "active rules" list
171
+ *
172
+ * @since 1.0.0
173
+ * @param InPopupItem $popup
174
+ */
175
+ static public function _admin_rule_form( $popup ) {
176
+ foreach ( self::$rules as $prio => $list ) {
177
+ foreach ( $list as $key => $rule ) {
178
+ $rule->obj->_admin_rule_form( $key, $rule, $popup );
179
+ }
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Display the rule-switch in the "all rules" list (no options, only a
185
+ * function to activate/deactivate the rule)
186
+ *
187
+ * @since 1.0.0
188
+ */
189
+ static public function _admin_rule_list( $popup ) {
190
+ foreach ( self::$rules as $prio => $list ) {
191
+ foreach ( $list as $key => $rule ) {
192
+ $rule->obj->_admin_rule_list( $key, $rule, $popup );
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ IncPopupRules::init();
199
+
200
+
201
+ /*===============================*\
202
+ ===================================
203
+ == ==
204
+ == RULE BASE ==
205
+ == ==
206
+ ===================================
207
+ \*===============================*/
208
+
209
+
210
+ /**
211
+ * Base class for PopUp conditions
212
+ */
213
+ abstract class IncPopupRule {
214
+
215
+ /**
216
+ * Name of the file (set by the child class)
217
+ * @var string
218
+ */
219
+ public $filename = '';
220
+
221
+ /*--------------- OVERWRITABLE functions ----------------*/
222
+
223
+ /**
224
+ * Initialize the rule object.
225
+ * Overwrite this function!
226
+ *
227
+ * @since 4.6
228
+ */
229
+ protected function init() {
230
+ /*
231
+ // Register new rule
232
+ $this->add_rule( 'id', 'label', 'description' );
233
+
234
+ // Add custom hooks for the rule
235
+ add_action( 'wp_footer', array( $this, 'footer_code' ) );
236
+ */
237
+ }
238
+
239
+ /**
240
+ * Apply the rule-logic to the specified popup:
241
+ * Create a function with name "apply_" + rule-ID
242
+ *
243
+ * Example:
244
+ * protected function apply_url( $data ) {
245
+ * return true; // Condition for rule "url"
246
+ * }
247
+ *
248
+ * @since 4.6
249
+ * @param mixed $data Rule-data which was saved via the save_() handler.
250
+ * @return bool Decission to display popup or not.
251
+ */
252
+ protected function apply_( $data ) {
253
+ return true;
254
+ }
255
+
256
+ /**
257
+ * Output the Admin-Form for a single rule:
258
+ * Create a function with name "form_" + rule-ID
259
+ *
260
+ * Example:
261
+ * protected function form_url( $data ) {
262
+ * echo 'Form for rule "url"...';
263
+ * }
264
+ *
265
+ * @since 4.6
266
+ * @param mixed $data Rule-data which was saved via the save_() handler.
267
+ */
268
+ protected function form_( $data ) {
269
+ echo '';
270
+ }
271
+
272
+ /**
273
+ * Update and return rule-config which should be saved in DB.
274
+ * Create a function with name "save_" + rule-ID
275
+ *
276
+ * Example:
277
+ * protected function save_url() {
278
+ * return array();
279
+ * }
280
+ *
281
+ * @since 4.6
282
+ * @return mixed Data collection of this rule.
283
+ */
284
+ protected function save_() {
285
+ return false;
286
+ }
287
+
288
+ /*--------------- PUBLIC functions ----------------*/
289
+
290
+ /**
291
+ * Registers a rule.
292
+ *
293
+ * @since 4.6
294
+ * @param string $id
295
+ * @param string $label
296
+ * @param string $description
297
+ * @param string $exclude
298
+ * @param int $priority
299
+ */
300
+ protected function add_rule( $id, $label, $description, $exclude = '', $priority = 10 ) {
301
+ IncPopupRules::add_rule(
302
+ $this,
303
+ $this->filename,
304
+ $id, $label, $description, $exclude, $priority
305
+ );
306
+ }
307
+
308
+ /*--------------- INTERNAL functions ----------------*/
309
+
310
+ /**
311
+ * Create the rule object.
312
+ * This is _only_ done by IncPopupRules::register() above!
313
+ *
314
+ * @since 1.0.0
315
+ */
316
+ public function __construct() {
317
+ $this->init();
318
+ }
319
+
320
+ /**
321
+ * Apply the rule-logic to the specified popup
322
+ *
323
+ * @since 1.0.0
324
+ * @param bool $show Current decission whether popup should be displayed.
325
+ * @param Object $popup The popup that is evaluated.
326
+ * @return bool Updated decission to display popup or not.
327
+ */
328
+ public function _apply( $key, $show, $popup ) {
329
+ if ( ! $show ) { return $show; }
330
+
331
+ // Skip the rule if the popup does not use it.
332
+ if ( ! in_array( $key, $popup->rule ) ) { return; }
333
+
334
+ $method = 'apply_' . $key;
335
+ if ( method_exists( $this, $method ) ) {
336
+ if ( ! $this->$method( @$popup->rule_data[$key], $popup ) ) {
337
+ $show = false;
338
+ }
339
+ }
340
+
341
+ return $show;
342
+ }
343
+
344
+ /**
345
+ * Output the Admin-Form for the active rule.
346
+ *
347
+ * @since 1.0.0
348
+ * @param Object $popup The popup that is edited.
349
+ * @param string $key Rule-ID.
350
+ */
351
+ public function _form( $popup, $key ) {
352
+ $method = 'form_' . $key;
353
+ if ( method_exists( $this, $method ) ) {
354
+ echo '<div class="rule-form">';
355
+ $this->$method( @$popup->rule_data[$key] );
356
+ echo '</div>';
357
+ }
358
+ }
359
+
360
+ /**
361
+ * Update and return the $settings array to save the form values.
362
+ *
363
+ * @since 1.0.0
364
+ * @param array $data Collection of rule-settings.
365
+ * @return array The updated rule-settings collection.
366
+ */
367
+ public function _save( $key, $data ) {
368
+ $method = 'save_' . $key;
369
+ if ( method_exists( $this, $method ) ) {
370
+ $data[$key] = $this->$method();
371
+ }
372
+
373
+ return $data;
374
+ }
375
+
376
+ /**
377
+ * Display the rule form inside the "active rules" list
378
+ *
379
+ * @since 1.0.0
380
+ * @param InPopupItem $popup
381
+ */
382
+ public function _admin_rule_form( $key, $data, $popup ) {
383
+ $active = $popup->uses_rule( $key );
384
+ $class = $active ? 'on' : 'off';
385
+ ?>
386
+ <li id="po-rule-<?php echo esc_attr( $key ); ?>"
387
+ class="rule <?php echo esc_attr( $class )?>"
388
+ data-key="<?php echo esc_attr( $key ); ?>">
389
+ <div class="rule-title">
390
+ <?php echo esc_html( $data->label ); ?>
391
+ </div>
392
+ <span class="rule-toggle dashicons"></span>
393
+ <div class="rule-inner">
394
+ <div class="rule-description">
395
+ <em><?php echo esc_html( $data->description ); ?></em>
396
+ </div>
397
+ <?php $this->_form( $popup, $key ); ?>
398
+ </div>
399
+ </li>
400
+ <?php
401
+ }
402
+
403
+ /**
404
+ * Display the rule-switch in the "all rules" list (no options, only a
405
+ * function to activate/deactivate the rule)
406
+ *
407
+ * @since 1.0.0
408
+ */
409
+ public function _admin_rule_list( $key, $data, $popup ) {
410
+ $active = $popup->uses_rule( $key );
411
+ $class = $active ? 'on' : 'off';
412
+ ?>
413
+ <li class="rule rule-<?php echo esc_attr( $key ); ?> <?php echo esc_attr( $class ); ?>">
414
+ <div class="wpmui-toggle">
415
+ <input type="checkbox"
416
+ class="wpmui-toggle-checkbox"
417
+ id="rule-<?php echo esc_attr( $key ); ?>"
418
+ data-form="#po-rule-<?php echo esc_attr( $key ); ?>"
419
+ data-exclude="<?php echo esc_attr( @$data->exclude ); ?>"
420
+ name="po_rule[]"
421
+ value="<?php echo esc_attr( $key ); ?>"
422
+ <?php checked( $active ); ?> />
423
+ <label class="wpmui-toggle-label" for="rule-<?php echo esc_attr( $key ); ?>">
424
+ <span class="wpmui-toggle-inner"></span>
425
+ <span class="wpmui-toggle-switch"></span>
426
+ </label>
427
+ </div>
428
+ <?php echo esc_html( $data->label ); ?>
429
+ </li>
430
+ <?php
431
+ }
432
+
433
+ };
inc/config-defaults.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Defines default plugin configuration values.
4
+ * These values can be overridden inside wp-config.php
5
+ */
6
+
7
+ // Multi-Site setting
8
+ // True .. the plugin operates on a global site-admin basis
9
+ // False .. the plugin operates on a blog by blog basis
10
+ if ( ! defined( 'PO_GLOBAL' ) ) {
11
+ define( 'PO_GLOBAL', false, true );
12
+ }
13
+
14
+ // The url that we are using to return the country.
15
+ // It should only return the country code for the passed IP address!
16
+ if ( ! defined( 'PO_REMOTE_IP_URL' ) ) {
17
+ define( 'PO_REMOTE_IP_URL', 'http://api.hostip.info/country.php?ip=%ip%', true );
18
+ }
19
+
20
+ // Fallback value in case the PO_REMOTE_IP_URL did not return any value.
21
+ // Either set to a valid country code (US, DE, AU, ...)
22
+ // Or set to False to not show the popup when country could not be resolved.
23
+ if ( ! defined( 'PO_DEFAULT_COUNTRY' ) ) {
24
+ define( 'PO_DEFAULT_COUNTRY', 'US', true );
25
+ }
26
+
27
+ // Set default cookie expiry time (in days).
28
+ if ( ! defined( 'PO_DEFAULT_EXPIRY' ) ) {
29
+ define( 'PO_DEFAULT_EXPIRY', 365, true );
30
+ }
inc/external/wpmu-lib/changelog.txt ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Plugin Name: WPMU Dev code library
2
+ Author: Philipp Stracker
3
+
4
+ Change Log:
5
+ ----------------------------------------------------------------------
6
+
7
+ 1.0.9 - 2014-08-15
8
+ ----------------------------------------------------------------------
9
+ - Add the UI files 'vnav': WDev()->add_ui( 'vnav' );
10
+ - Fix bug that happened when enqueuing the very first script/style using WDev()
11
+
12
+ 1.0.8 - 2014-08-12
13
+ ----------------------------------------------------------------------
14
+ - Methods now must be called via "WDev()->method()" and not "TheLib::method()".
15
+ - Situations when plugins include different versions of the library are resolved correctly now.
16
+
17
+ 1.0.7 - 2014-07-28
18
+ ----------------------------------------------------------------------
19
+ - Make message() persitent: Message is displayed even after redirect
20
+ - add_js() and add_css() now accept a script-alias instead of url to load core WordPress scripts.
21
+ - New function TheLib::current_url()
22
+
23
+ 1.0.6 - 2014-07-21
24
+ ----------------------------------------------------------------------
25
+ - New javascript function "wpmUi.obj()": Convert JS array to object.
26
+
27
+ 1.0.5 - 2014-07-11
28
+ ----------------------------------------------------------------------
29
+ - Fix buddypress warning caused by calling get_current_user_id too early.
30
+ - Add new parameter to ajax().load_http() to specify the target frame.
31
+ - Change function name "load_textlang" to "translate_plugin"
32
+ - Fix issues with url translation (css_url / js_url)
33
+
34
+ 1.0.4 - 2014-07-10
35
+ ----------------------------------------------------------------------
36
+ - Fix warning about static functions.
37
+
38
+ 1.0.3 - 2014-07-09
39
+ ----------------------------------------------------------------------
40
+ - Support for Windows server (fixes javascript errors)
41
+
42
+ 1.0.2 - 2014-07-09
43
+ ----------------------------------------------------------------------
44
+ - Correct the "pointer" function to dismis pointers correctly.
45
+
46
+ 1.0.1 - 2014-07-09
47
+ ----------------------------------------------------------------------
48
+ - PHP 5.2 compatibility
49
+
50
+ 1.0 - 2014-07-01
51
+ ----------------------------------------------------------------------
52
+ - First version.
inc/external/wpmu-lib/core.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: WPMU Dev code library
4
+ Plugin URI: http://premium.wpmudev.org/
5
+ Description: Framework to support creating WordPress plugins and themes.
6
+ Version: 1.0.9
7
+ Author: WPMU DEV
8
+ Author URI: http://premium.wpmudev.org/
9
+ Textdomain: wpmu-lib
10
+ */
11
+
12
+ $version = '1.0.9'; // Remember to update the class-name in functions-wpmulib.php!!
13
+
14
+ /**
15
+ * Load TheLib class definition if not some other plugin already loaded it.
16
+ */
17
+ $dirname = dirname( __FILE__ ) . '/';
18
+ $class_file = 'functions-wpmulib.php';
19
+ $class_name = 'TheLib_' . str_replace( '.', '_', $version );
20
+ if ( ! class_exists( $class_name ) && file_exists( $dirname . $class_file ) ) {
21
+ require_once( $dirname . $class_file );
22
+ }
23
+
24
+ if ( ! class_exists( 'TheLibWrap' ) ) {
25
+ /**
26
+ * The wrapper class is used to handle situations when some plugins include
27
+ * different versions of TheLib.
28
+ *
29
+ * TheLibWrap will always keep the latest version of TheLib for later usage.
30
+ */
31
+ class TheLibWrap {
32
+ static public $version = '0.0.0';
33
+ static public $object = null;
34
+
35
+ static public function set_obj( $version, $obj ) {
36
+ if ( version_compare( $version, self::$version, '>' ) ) {
37
+ self::$version = $version;
38
+ self::$object = $obj;
39
+ }
40
+ }
41
+ };
42
+ }
43
+ $obj = new $class_name();
44
+ TheLibWrap::set_obj( $version, $obj );
45
+
46
+ if ( ! function_exists( 'WDev' ) ) {
47
+ /**
48
+ * This is a shortcut function to access the latest TheLib object.
49
+ *
50
+ * Usage:
51
+ * WDev()->message();
52
+ */
53
+ function WDev() {
54
+ return TheLibWrap::$object;
55
+ }
56
+ }
inc/external/wpmu-lib/css/select2.css ADDED
@@ -0,0 +1 @@
 
1
+ .select2-container{margin:0;position:relative;display:inline-block;zoom:1;*display:inline;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;height:26px;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #aaa;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;border-radius:4px;background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));background-image:-webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);background-image:-moz-linear-gradient(center bottom, #eee 0%, #fff 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);background-image:linear-gradient(to top, #eee 0%, #fff 50%)}html[dir="rtl"] .select2-container .select2-choice{padding:0 8px 0 0}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));background-image:-webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);background-image:-moz-linear-gradient(center bottom, #eee 0%, #fff 90%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);background-image:linear-gradient(to bottom, #eee 0%, #fff 90%)}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;float:none;width:auto}html[dir="rtl"] .select2-container .select2-choice>.select2-chosen{margin-left:26px;margin-right:0}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url('../img/select2.png?1404482879') right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:9999;top:100%;background:#fff;color:#000;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;-webkit-box-shadow:0 4px 5px rgba(0,0,0,0.15);box-shadow:0 4px 5px rgba(0,0,0,0.15)}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #aaa;border-bottom:0;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,0.15);box-shadow:0 -4px 5px rgba(0,0,0,0.15)}.select2-drop-active{border:1px solid #5897fb;border-top:none}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-left:1px solid #aaa;border-radius:0 4px 4px 0;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));background-image:-webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);background-image:-moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);background-image:linear-gradient(to top, #ccc 0%, #eee 60%)}html[dir="rtl"] .select2-container .select2-choice .select2-arrow{left:0;right:auto;border-left:none;border-right:1px solid #aaa;border-radius:4px 0 0 4px}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url('../img/select2.png?1404482879') no-repeat 0 1px}html[dir="rtl"] .select2-container .select2-choice .select2-arrow b{background-position:2px 1px}.select2-search{display:inline-block;width:100%;min-height:26px;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;height:auto !important;min-height:26px;padding:4px 20px 4px 5px;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url('../img/select2.png?1404482879') no-repeat 100% -22px;background:url('../img/select2.png?1404482879') no-repeat 100% -22px,-webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));background:url('../img/select2.png?1404482879') no-repeat 100% -22px,-webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/select2.png?1404482879') no-repeat 100% -22px,-moz-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/select2.png?1404482879') no-repeat 100% -22px,linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0}html[dir="rtl"] .select2-search input{padding:4px 5px 4px 20px;background:#fff url('../img/select2.png?1404482879') no-repeat -37px -22px;background:url('../img/select2.png?1404482879') no-repeat -37px -22px,-webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));background:url('../img/select2.png?1404482879') no-repeat -37px -22px,-webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/select2.png?1404482879') no-repeat -37px -22px,-moz-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/select2.png?1404482879') no-repeat -37px -22px,linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url('../img/spinner.gif?1402931905') no-repeat 100%;background:url('../img/spinner.gif?1402931905') no-repeat 100%,-webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));background:url('../img/spinner.gif?1402931905') no-repeat 100%,-webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/spinner.gif?1402931905') no-repeat 100%,-moz-linear-gradient(center bottom, #fff 85%, #eee 99%);background:url('../img/spinner.gif?1402931905') no-repeat 100%,linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:none;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);box-shadow:0 0 5px rgba(0,0,0,0.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#eee;background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));background-image:-webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);background-image:-moz-linear-gradient(center bottom, #fff 0%, #eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);background-image:linear-gradient(to top, #fff 0%, #eee 50%)}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));background-image:-webkit-linear-gradient(center top, #fff 0%, #eee 50%);background-image:-moz-linear-gradient(center top, #fff 0%, #eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%)}.select2-dropdown-open .select2-choice .select2-arrow{background:transparent;border-left:none;filter:none}html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow{border-right:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b{background-position:-16px 1px}.select2-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.select2-results{max-height:200px;padding:0 0 0 4px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:transparent}html[dir="rtl"] .select2-results{padding:0 4px 0 0;margin:4px 0 4px 4px}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:bold}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results-dept-1 .select2-result-label{padding-left:20px}.select2-results-dept-2 .select2-result-label{padding-left:40px}.select2-results-dept-3 .select2-result-label{padding-left:60px}.select2-results-dept-4 .select2-result-label{padding-left:80px}.select2-results-dept-5 .select2-result-label{padding-left:100px}.select2-results-dept-6 .select2-result-label{padding-left:110px}.select2-results-dept-7 .select2-result-label{padding-left:120px}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:transparent}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item;padding-left:5px}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url('../img/spinner.gif?1402931905') no-repeat 100%}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto !important;height:1%;margin:0;padding:0 5px 0 0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));background-image:-webkit-linear-gradient(top, #eee 1%, #fff 15%);background-image:-moz-linear-gradient(top, #eee 1%, #fff 15%);background-image:linear-gradient(to bottom, #eee 1%, #fff 15%)}html[dir="rtl"] .select2-container-multi .select2-choices{padding:0 0 0 5px}.select2-locked{padding:3px 5px 3px 5px !important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:none;-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);box-shadow:0 0 5px rgba(0,0,0,0.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}html[dir="rtl"] .select2-container-multi .select2-choices li{float:right}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:transparent !important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url('../img/spinner.gif?1402931905') no-repeat 100% !important}.select2-default{color:#999 !important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaaaaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);background-image:-webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));background-image:-webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);background-image:-moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);background-image:linear-gradient(to top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%)}html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice{margin:3px 5px 3px 0;padding:3px 18px 3px 5px}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:none;background:url('../img/select2.png?1404482879') right top no-repeat}html[dir="rtl"] .select2-search-choice-close{right:auto;left:3px}.select2-container-multi .select2-search-choice-close{left:3px}html[dir="rtl"] .select2-container-multi .select2-search-choice-close{left:auto;right:2px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px 3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:none}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0) !important;width:1px !important;height:1px !important;border:0 !important;margin:0 !important;padding:0 !important;overflow:hidden !important;position:absolute !important;outline:0 !important;left:0px !important;top:0px !important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx){.select2-search input,.select2-search-choice-close,.select2-container .select2-choice abbr,.select2-container .select2-choice .select2-arrow b{background-image:url('../img/select2x2.png?1404482879') !important;background-repeat:no-repeat !important;background-size:60px 40px !important}.select2-search input{background-position:100% -21px !important}}
inc/external/wpmu-lib/css/wpmu-ui.css ADDED
@@ -0,0 +1 @@
 
1
+ .wpmui-loading{position:relative}.wpmui-loading:after{content:'';position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(255,255,255,0.8) url(../img/spinner.gif) center no-repeat;z-index:1000;cursor:default}.wpmui-overlay{background:#000;opacity:0.7;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none}.wpmui-has-overlay .wpmui-overlay{display:block}.wpmui-has-overlay #wpwrap{-webkit-filter:grayscale(75%);-moz-filter:grayscale(75%);filter:gray;filter:grayscale(75%)}.wpmui-no-scroll{overflow:hidden}.wpmui-wnd{background:#F5F5F5;position:fixed;box-shadow:0 2px 20px rgba(0,0,0,0.4);z-index:1051;top:50%;left:50%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wpmui-wnd-title{line-height:50px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 70px 0 20px;border-bottom:1px solid #E5E5E5;background:#F8F8F8;height:50px;display:block;font-size:23px;font-weight:100;z-index:5}.wpmui-wnd-close{position:absolute;top:0;right:0;width:50px;line-height:50px;height:50px;text-align:center;text-decoration:none;color:#666;border-left:1px solid #E5E5E5;cursor:pointer;z-index:10}.wpmui-wnd-close .dashicons{line-height:50px}.wpmui-wnd-close:hover,.wpmui-wnd-close:focus,.wpmui-wnd-close:active{background:#FCFCFC;color:#333}.wpmui-wnd-content{position:absolute;top:51px;left:0;right:0;bottom:0;overflow:auto;padding:20px 20px 20px 20px;z-index:1}.wpmui-wnd-content:after{content:'';display:block;clear:both;padding:50px 0 0 0}.wpmui-wnd.no-buttons .wpmui-wnd-content:after{padding-top:0}.wpmui-wnd hr{margin:15px -20px;border:0;border-top:1px solid #E5E5E5}.wpmui-wnd .buttons{text-align:right;position:absolute;bottom:0;right:0;background:rgba(245,245,245,0.8);padding:10px 20px 10px;left:0;height:50px;border-top:1px solid #E5E5E5;margin:0;z-index:2;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wpmui-msg{position:relative;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wpmui-msg .wpmui-close{float:right;margin-top:8px;width:20px;height:20px;line-height:20px;text-align:center;cursor:pointer;text-decoration:none;font-size:16px;padding:0;color:#CCC}.wpmui-msg .wpmui-close:hover,.wpmui-msg .wpmui-close:focus,.wpmui-msg .wpmui-close:active{color:#333}.wpmui-msg .debug{padding:5px;color:#666;font-size:12px;font-family:monospace;margin-bottom:0.5em;background:#F8F8F8}.wpmui-tip-box{position:relative}.wpmui-tip{position:absolute;display:none;padding:8px;z-index:100;background:#333;color:#EEE;box-shadow:0 1px 8px rgba(0,0,0,0.4);border-radius:2px}.wpmui-tip.wpmui-visible{display:block}.wpmui-tip:before{content:'';position:absolute;border:5px solid transparent;left:50%;top:50%;margin-left:-5px;margin-top:-5px}.wpmui-tip.top:before{border-top-color:#333;bottom:-10px;top:auto}.wpmui-tip.bottom:before{border-bottom-color:#333;top:-5px}.wpmui-tip.left:before{border-left-color:#333;right:-10px;left:auto}.wpmui-tip.right:before{border-right-color:#333;left:-5px}.wpmui-pointer{margin-top:30px}.wpmui-pointer h3{background:transparent;color:#333;border:0;margin:0;padding:8px 15px 5px}.wpmui-pointer h3:before{content:'';display:none}.wpmui-pointer p{padding:0 15px;margin:2px 0}.wpmui-pointer .wp-pointer-content{border-left:2px solid #0074A2;background:#FAFDFF}.wpmui-pointer .wp-pointer-buttons{position:absolute;top:0;right:0;white-space:nowrap}.wpmui-pointer .wp-pointer-buttons a.close:before{position:static;float:right;line-height:14px;margin:3px 0 1px 5px}.wpmui-pointer .wp-pointer-arrow{border:0;position:absolute;top:50%;left:0;margin:-5px 0 0}.wpmui-pointer .wp-pointer-arrow:before{border:5px solid transparent;border-right-color:#0074A2;margin:0;left:-10px;position:absolute;top:0}.wpmui-pointer .wp-pointer-arrow-inner{display:none}.wpmui-pointer.wp-pointer-left{padding-left:8px}.wpmui-pointer.wp-pointer-left .wp-pointer-arrow{left:8px}.wpmui-form label{display:block;line-height:26px;font-size:14px;font-weight:500}.wpmui-form input[type='text'],.wpmui-form input[type='password'],.wpmui-form textarea,.wpmui-form select{width:100%;margin:0;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wpmui-form .hint{color:#666;font-size:12px}.wpmui-form .button-link,.wpmui-wnd .button-link{display:inline-block;text-decoration:underline;font-size:13px;line-height:26px;height:28px;margin:0;padding:0 10px 1px;cursor:pointer;white-space:nowrap;color:#0074A2;background:transparent;border:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition-property:border, background, color;transition-property:border, background, color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out}.wpmui-form .button-link:hover,.wpmui-form .button-link:active,.wpmui-form .button-link:focus{color:#2EA2CC}.wpmui-grid-8 *,.wpmui-grid-12 *,.wpmui-grid-8 *:after,.wpmui-grid-12 *:after,.wpmui-grid-8 *:before,.wpmui-grid-12 *:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wpmui-grid-8 [class*='col-'],.wpmui-grid-12 [class*='col-']{float:left;padding-right:20px}.wpmui-grid-8 [class*='col-']:last-of-type,.wpmui-grid-12 [class*='col-']:last-of-type{padding-right:0px}.wpmui-grid-8,.wpmui-grid-12{width:100%;margin:0;overflow:hidden;padding:10px 0 0}.wpmui-grid-8:after,.wpmui-grid-12:after{content:'';display:table;clear:both}.wpmui-grid-8 .col-8,.wpmui-grid-12 .col-12{width:100%}.wpmui-grid-12 .col-11{width:91.66%}.wpmui-grid-8 .col-7{width:87.5%}.wpmui-grid-12 .col-10{width:83.333%}.wpmui-grid-8 .col-6,.wpmui-grid-12 .col-9{width:75%}.wpmui-grid-12 .col-8{width:66.66%}.wpmui-grid-8 .col-5{width:62.5%}.wpmui-grid-12 .col-7{width:58.33%}.wpmui-grid-8 .col-4,.wpmui-grid-12 .col-6{width:50%}.wpmui-grid-12 .col-5{width:41.66%}.wpmui-grid-8 .col-3{width:37.5%}.wpmui-grid-12 .col-4{width:33.33%}.wpmui-grid-8 .col-2,.wpmui-grid-12 .col-3{width:25%}.wpmui-grid-12 .col-2{width:16.667%}.wpmui-grid-8 .col-1{width:12.5%}.wpmui-grid-12 .col-1{width:8.33%}@media handheld, only screen and (max-width: 767px){.wpmui-grid-8,.wpmui-grid-12{width:100%;min-width:0;margin-left:0px;margin-right:0px;padding-left:0px;padding-right:0px}.wpmui-grid-8 [class*='col-'],.wpmui-grid-12 [class*='col-']{width:auto;float:none;margin-left:0px;margin-right:0px;margin-top:10px;margin-bottom:10px;padding-left:20px;padding-right:20px}}.wpmui-box{margin-bottom:10px;padding:0;line-height:1;position:relative;min-width:255px;border:1px solid #E5E5E5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);background:#FFF}.wpmui-box>h3{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;border-bottom:1px solid #EEE;cursor:pointer}.wpmui-box>h3 .toggle{cursor:pointer;float:right;width:36px;height:36px;color:#AAA;text-decoration:none;margin:-8px -12px;text-align:center;position:relative;line-height:36px}.wpmui-box>h3:hover .toggle,.wpmui-box .toggle:hover,.wpmui-box .toggle:focus,.wpmui-box .toggle:active{color:#777}.wpmui-box>h3 .toggle:before{content:'\f142';font:400 20px/36px dashicons;speak:none;display:inline-block;position:absolute;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none !important;width:100%;height:100%;top:0;right:0}.wpmui-box>.inside{margin:6px 0 0;position:relative;padding:0 12px 12px;line-height:1.4em;font-size:13px}.wpmui-box>.inside:after{content:'';display:table;clear:both}.wpmui-box.closed>h3 .toggle:before{content:'\f140'}.wpmui-box.closed>.inside{display:none}.wpmui-box.static>h3{cursor:default}.wpmui-box.static>h3 .toggle{display:none}.wpmui-box.static>.inside{display:block}.wpmui-tabs{border-bottom:1px solid #EEE;padding-bottom:0;padding-left:10px;list-style:none;margin:20px 0 0}.wpmui-tabs .tab{border:1px solid #EEE;background:#F0F0F0;color:#999;display:inline-block;text-decoration:none;margin:0 4px -1px 0;padding:0 12px;font-weight:600;font-size:13px;line-height:34px}.wpmui-tabs .tab:hover,.wpmui-tabs .tab:focus,.wpmui-tabs .tab:active{background:#F4F4F4;color:#777}.wpmui-tabs .tab.active{border-bottom:1px solid #FFF;background:#FFF;color:#444}.wpmui-tab-contents{padding:12px}.wpmui-tab-contents .tab{display:none}.wpmui-tab-contents .tab.active{display:block}.wpmui-box>.inside>.wpmui-tabs{margin-left:-12px;margin-right:-12px;padding-left:22px}.wpmui-box>.inside>.wpmui-tab-contents{margin-left:-12px;margin-right:-12px;margin-bottom:-12px}.select2-container a{transition:none !important}.wpmui-toggle{position:relative;width:26px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.wpmui-toggle-checkbox{display:none !important}.wpmui-toggle-label{display:block;overflow:hidden;cursor:pointer;border:1px solid #CCC;border-radius:50px}.wpmui-toggle-inner{display:block;width:200%;margin-left:-100%;-moz-transition:margin 0.3s ease-in 0s;-webkit-transition:margin 0.3s ease-in 0s;-o-transition:margin 0.3s ease-in 0s;transition:margin 0.3s ease-in 0s}.wpmui-toggle-inner:before,.wpmui-toggle-inner:after{display:block;float:left;width:50%;height:5px;padding:0;line-height:5px;font-size:10px;color:white;font-family:Trebuchet, Arial, sans-serif;font-weight:bold;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;box-shadow:0 1px 0 rgba(0,0,0,0.2) inset}.wpmui-toggle-inner:before{content:"";padding-left:5px;background-color:#0074A2}.wpmui-toggle-inner:after{content:"";padding-right:5px;background-color:#EEEEEE;text-align:right}.wpmui-toggle-switch{display:block;width:14px;margin:-3.5px;background:#F8F8F8;border:1px solid #CCC;border-radius:15px;position:absolute;top:0;bottom:0;right:20px;-moz-transition:all 0.3s ease-in 0s;-webkit-transition:all 0.3s ease-in 0s;-o-transition:all 0.3s ease-in 0s;transition:all 0.3s ease-in 0s;box-shadow:-1px 1px 2px rgba(0,0,0,0.1)}.wpmui-toggle-checkbox:checked+.wpmui-toggle-label .wpmui-toggle-inner{margin-left:0}.wpmui-toggle-checkbox:checked+.wpmui-toggle-label .wpmui-toggle-switch{right:0px}.no-pad-top{padding-top:0 !important;margin-top:0 !important}.no-pad-bottom{padding-bottom:0 !important;margin-bottom:0 !important}.no-pad{padding-top:0 !important;padding-bottom:0 !important;margin-top:0 !important;margin-bottom:0 !important}.dashicons.light{opacity:.5}.cf:before,.cf:after{content:'';display:table}.cf:after{clear:both}.wpmui-left{float:left}.wpmui-right{float:right}.button .dashicons,.button-primary .dashicons{line-height:26px;height:26px;float:left;margin-right:6px}
inc/external/wpmu-lib/css/wpmu-vnav.css ADDED
@@ -0,0 +1 @@
 
1
+ .lst-vnav{list-style:none;padding:0;position:relative}.lst-vnav-item{padding:0;margin:0}.lst-vnav-sep{border-bottom:1px solid #E8E8E8;padding:0;margin:0;padding-bottom:5px;margin-bottom:5px}.lst-vnav-item h3{width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 5px;margin:0;height:22px;line-height:22px;font-size:15px;color:#0074A2;cursor:pointer;position:relative;z-index:2;font-weight:normal;border:1px solid transparent}.lst-vnav-item h3:hover{color:#2EA2CC}.lst-vnav-item.active h3{color:#333;background-color:#FDFDFD;border:1px solid #DEDEDE;border-right-color:#FDFDFD}.lst-vnav-item>.data{display:none;margin:0;border:1px solid #DEDEDE;padding:10px;top:0;right:0;left:191px;position:absolute;background-color:#FDFDFD}.lst-vnav-item.active>.data{display:block;z-index:1}.lst-vnav-item .form-table tbody>tr:first-child>th,.lst-vnav-item .form-table tbody>tr:first-child>td{padding-top:0}.lst-vnav-item .form-table tbody>tr:last-child>th,.lst-vnav-item .form-table tbody>tr:last-child>td{padding-bottom:0}.lst-vnav-item .widefat thead>tr>th,.lst-vnav-item .widefat thead>tr>td,.lst-vnav-item .widefat tfoot>tr>th,.lst-vnav-item .widefat tfoot>tr>td{padding:8px 10px}@media screen and (max-width: 1024px){.lst-vnav-item h3{width:150px}.lst-vnav-item>.data{left:161px;padding:5px}.lst-vnav-item .form-table th{width:170px}}@media screen and (max-width: 782px){.lst-vnav{margin-bottom:40px}.lst-vnav-item h3{width:auto;background-color:#F8F8F8;display:none;font-weight:bold}.lst-vnav-item.active h3{display:block;background-color:#F1F1F1;border-bottom-color:transparent;border-right-color:#DEDEDE}.lst-vnav.open .lst-vnav-item h3{display:block;border-top-style:none;border-bottom-style:none;border-left-color:#999;border-right-color:#999}.lst-vnav.open .lst-vnav-item:first-child h3{border-top:1px solid #999}.lst-vnav.open .lst-vnav-item:last-child h3{border-bottom:1px solid #999}.lst-vnav-item>.data{left:0;top:30px;border-top-style:none;min-height:0 !important}.lst-vnav-item .form-table th{width:auto}.lst-vnav-item .form-table td{padding-left:16px}}
inc/external/wpmu-lib/functions-wpmulib.php ADDED
@@ -0,0 +1,582 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Based on Jigsaw plugin by Jared Novack (http://jigsaw.upstatement.com/)
4
+ class TheLib_1_0_9 {
5
+
6
+ // --- Start of 5.2 compatibility functions
7
+
8
+ /**
9
+ * Internal data collection used to pass arguments to callback functions.
10
+ * Only used for 5.2 version as alternative to closures.
11
+ * @var array
12
+ */
13
+ protected $data = array();
14
+
15
+ protected function _have( $key ) {
16
+ return isset( $this->data[ $key ] );
17
+ }
18
+
19
+ protected function _add( $key, $value ) {
20
+ if ( ! is_array( @$this->data[ $key ] ) ) {
21
+ $this->data[ $key ] = array();
22
+ }
23
+ $this->data[ $key ][] = $value;
24
+ }
25
+
26
+ protected function _get( $key ) {
27
+ if ( ! is_array( @$this->data[ $key ] ) ) {
28
+ $this->data[ $key ] = array();
29
+ }
30
+ return $this->data[ $key ];
31
+ }
32
+
33
+ protected function _clear( $key ) {
34
+ $this->data[ $key ] = array();
35
+ }
36
+
37
+
38
+ // --- End of 5.2 compatibility functions
39
+
40
+ // --- Start of Session access
41
+
42
+ protected function _sess_have( $key ) {
43
+ return isset( $_SESSION[ '_lib_persist_' . $key ] );
44
+ }
45
+
46
+ protected function _sess_add( $key, $value ) {
47
+ if ( ! session_id() ) { session_start(); }
48
+
49
+ if ( ! is_array( @$_SESSION[ '_lib_persist_' . $key ] ) ) {
50
+ $_SESSION[ '_lib_persist_' . $key ] = array();
51
+ }
52
+ $_SESSION[ '_lib_persist_' . $key ][] = $value;
53
+ }
54
+
55
+ protected function _sess_get( $key ) {
56
+ if ( ! session_id() ) { session_start(); }
57
+
58
+ if ( ! is_array( @$_SESSION[ '_lib_persist_' . $key ] ) ) {
59
+ $_SESSION[ '_lib_persist_' . $key ] = array();
60
+ }
61
+ return $_SESSION[ '_lib_persist_' . $key ];
62
+ }
63
+
64
+ protected function _sess_clear( $key ) {
65
+ if ( ! session_id() ) { session_start(); }
66
+
67
+ unset( $_SESSION[ '_lib_persist_' . $key ] );
68
+ }
69
+
70
+ // --- End of Session access
71
+
72
+ public function __construct() {
73
+ if ( ! session_id() ) { session_start(); }
74
+
75
+ // Check for persistent data from last request that needs to be processed.
76
+ $this->check_persistent_data();
77
+ }
78
+
79
+ /**
80
+ * Returns the full URL to an internal CSS file of the code library.
81
+ *
82
+ * @since 1.0.0
83
+ * @private
84
+ * @param string $file The filename, relative to this plugins folder.
85
+ * @return string
86
+ */
87
+ protected function _css_url( $file ) {
88
+ static $Url = null;
89
+ if ( null === $Url ) {
90
+ $Url = plugins_url( 'css/', __FILE__ );
91
+ }
92
+ return $Url . $file;
93
+ }
94
+
95
+ /**
96
+ * Returns the full URL to an internal JS file of the code library.
97
+ *
98
+ * @since 1.0.0
99
+ * @private
100
+ * @param string $file The filename, relative to this plugins folder.
101
+ * @return string
102
+ */
103
+ protected function _js_url( $file ) {
104
+ static $Url = null;
105
+ if ( null === $Url ) {
106
+ $Url = plugins_url( 'js/', __FILE__ );
107
+ }
108
+ return $Url . $file;
109
+ }
110
+
111
+ /**
112
+ * Returns the full path to an internal php partial of the code library.
113
+ *
114
+ * @since 1.0.0
115
+ * @private
116
+ * @param string $file The filename, relative to this plugins folder.
117
+ * @return string
118
+ */
119
+ protected function _include_path( $file ) {
120
+ static $Path = null;
121
+ if ( null === $Path ) {
122
+ $basedir = dirname( __FILE__ ) . '/';
123
+ $Path = $basedir . 'inc/';
124
+ }
125
+ return $Path . $file;
126
+ }
127
+
128
+
129
+
130
+ /**
131
+ * Enqueue core UI files (CSS/JS).
132
+ *
133
+ * Defined modules:
134
+ * - core
135
+ * - scrollbar
136
+ * - select
137
+ *
138
+ * @since 1.0.0
139
+ * @param string $modules The module to load.
140
+ * @param string $onpage A page hook; files will only be loaded on this page.
141
+ */
142
+ public function add_ui( $module = 'core', $onpage = null ) {
143
+ switch ( $module ) {
144
+ case 'core':
145
+ $this->add_css( $this->_css_url( 'wpmu-ui.css' ), $onpage );
146
+ $this->add_js( $this->_js_url( 'wpmu-ui.min.js' ), $onpage );
147
+ break;
148
+
149
+ case 'scrollbar':
150
+ $this->add_js( $this->_js_url( 'tiny-scrollbar.min.js' ), $onpage );
151
+ break;
152
+
153
+ case 'select':
154
+ $this->add_css( $this->_css_url( 'select2.css' ), $onpage );
155
+ $this->add_js( $this->_js_url( 'select2.min.js' ), $onpage );
156
+ break;
157
+
158
+ case 'vnav':
159
+ $this->add_css( $this->_css_url( 'wpmu-vnav.css' ), $onpage );
160
+ $this->add_js( $this->_js_url( 'wpmu-vnav.min.js' ), $onpage );
161
+ break;
162
+
163
+ default:
164
+ $ext = strrchr( $module, '.' );
165
+ if ( '.css' === $ext ) {
166
+ $this->add_css( $module, $onpage );
167
+ } else if ( '.js' === $ext ) {
168
+ $this->add_js( $module, $onpage );
169
+ }
170
+ }
171
+ }
172
+
173
+ /**
174
+ * Adds a variable to javascript.
175
+ *
176
+ * @since 1.0.7
177
+ * @param string $name Name of the variable
178
+ * @param mixed $data Value of the variable
179
+ */
180
+ public function add_data( $name, $data ) {
181
+ wp_localize_script( 'jquery', $name, $data );
182
+ }
183
+
184
+ /**
185
+ * Enqueue a javascript file.
186
+ *
187
+ * @since 1.0.0
188
+ * @param string $url Full URL to the javascript file.
189
+ * @param string $onpage A page hook; files will only be loaded on this page.
190
+ */
191
+ public function add_js( $url, $onpage = null ) {
192
+ $this->_prepare_js_or_css( $url, 'js', $onpage );
193
+ }
194
+
195
+ /**
196
+ * Enqueue a css file.
197
+ *
198
+ * @since 1.0.0
199
+ * @param string $url Full URL to the css filename.
200
+ * @param string $onpage A page hook; files will only be loaded on this page.
201
+ */
202
+ public function add_css( $url, $onpage = null ) {
203
+ $this->_prepare_js_or_css( $url, 'css', $onpage );
204
+ }
205
+
206
+ /**
207
+ * Prepare to enqueue a javascript or css file.
208
+ *
209
+ * @since 1.0.7
210
+ * @private
211
+ * @param string $url Full URL to the javascript/css file.
212
+ * @param string $type 'css' or 'js'
213
+ * @param string $onpage A page hook; files will only be loaded on this page.
214
+ */
215
+ protected function _prepare_js_or_css( $url, $type, $onpage ) {
216
+ $hooked = $this->_have( 'js_or_css' );
217
+ $this->_add( 'js_or_css', compact( 'url', 'type', 'onpage' ) );
218
+
219
+ if ( ! did_action( 'init' ) ) {
220
+ $hooked || add_action(
221
+ 'init',
222
+ array( $this, '_add_admin_js_or_css' )
223
+ );
224
+ } else {
225
+ $this->_add_admin_js_or_css();
226
+ }
227
+ }
228
+
229
+ /**
230
+ * Returns the JS/CSS handle of the item.
231
+ * This is a private helper function used by array_map()
232
+ *
233
+ * @since 1.0.7
234
+ * @private
235
+ */
236
+ public function _get_script_handle( $item ) {
237
+ return @$item->handle;
238
+ }
239
+
240
+ /**
241
+ * Enqueues either a css or javascript file
242
+ *
243
+ * @since 1.0.0
244
+ * @private
245
+ */
246
+ public function _add_admin_js_or_css() {
247
+ if ( ! is_admin() ) {
248
+ return;
249
+ }
250
+
251
+ $scripts = $this->_get( 'js_or_css' );
252
+ $this->_clear( 'js_or_css' );
253
+
254
+ foreach ( $scripts as $script ) {
255
+ extract( $script ); // url, type, onpage
256
+
257
+ $type = ( 'css' == $type || 'style' == $type ? 'css' : 'js' );
258
+
259
+ // The $handle values are intentionally not cached:
260
+ // Any plugin/theme could add new handles at any moment...
261
+ $handles = array();
262
+ if ( 'css' == $type ) {
263
+ global $wp_styles;
264
+ if ( ! is_a( $wp_styles, 'WP_Styles' ) ) {
265
+ $wp_styles = new WP_Styles();
266
+ }
267
+ $handles = array_values(
268
+ array_map(
269
+ array( $this, '_get_script_handle' ),
270
+ $wp_styles->registered
271
+ )
272
+ );
273
+ } else {
274
+ global $wp_scripts;
275
+ if ( ! is_a( $wp_scripts, 'WP_Scripts' ) ) {
276
+ $wp_scripts = new WP_Scripts();
277
+ }
278
+ $handles = array_values(
279
+ array_map(
280
+ array( $this, '_get_script_handle' ),
281
+ $wp_scripts->registered
282
+ )
283
+ );
284
+ }
285
+
286
+ if ( in_array( $url, $handles ) ) {
287
+ $alias = $url;
288
+ $url = '';
289
+ } else {
290
+ // Get the filename from the URL, then sanitize it and prefix "wpmu-"
291
+ $urlparts = explode( '?', $url, 2 );
292
+ $alias = 'wpmu-' . sanitize_title( basename( reset( $urlparts ) ) );
293
+ }
294
+ $onpage = empty( $onpage ) ? '' : $onpage;
295
+
296
+ $item = compact( 'url', 'alias', 'onpage' );
297
+ if ( 'css' == $type ) {
298
+ $this->_have( 'css' ) || add_action(
299
+ 'admin_enqueue_scripts',
300
+ array( $this, '_enqueue_style_callback' ),
301
+ 15 // Load custom styles a bit later than core styles.
302
+ );
303
+ $this->_add( 'css', $item );
304
+ } else {
305
+ $this->_have( 'js' ) || add_action(
306
+ 'admin_enqueue_scripts',
307
+ array( $this, '_enqueue_script_callback' ),
308
+ 15 // Load custom scripts a bit later than core scripts.
309
+ );
310
+ $this->_add( 'js', $item );
311
+ }
312
+ }
313
+ }
314
+
315
+ /**
316
+ * Action hook for enqueue style (for PHP <5.3 only)
317
+ *
318
+ * @since 1.0.1
319
+ * @private
320
+ * @param string $hook The current admin page that is rendered.
321
+ */
322
+ public function _enqueue_style_callback( $hook ) {
323
+ $items = $this->_get( 'css' );
324
+ foreach ( $items as $item ) {
325
+ extract( $item ); // url, alias, onpage
326
+ if ( '' !== $onpage && $hook != $onpage ) { continue; }
327
+
328
+ if ( empty( $url ) ) {
329
+ wp_enqueue_style( $alias );
330
+ } else {
331
+ wp_enqueue_style( $alias, $url );
332
+ }
333
+ }
334
+ }
335
+
336
+ /**
337
+ * Action hook for enqueue script (for PHP <5.3 only)
338
+ *
339
+ * @since 1.0.1
340
+ * @private
341
+ * @param string $hook The current admin page that is rendered.
342
+ */
343
+ public function _enqueue_script_callback( $hook ) {
344
+ $items = $this->_get( 'js' );
345
+ foreach ( $items as $item ) {
346
+ extract( $item ); // url, alias, onpage
347
+ if ( '' !== $onpage && $hook != $onpage ) { continue; }
348
+
349
+ if ( empty( $url ) ) {
350
+ wp_enqueue_script( $alias );
351
+ } else {
352
+ wp_enqueue_script( $alias, $url, array( 'jquery' ), false, true );
353
+ }
354
+ }
355
+ }
356
+
357
+
358
+
359
+ /**
360
+ * Displays a WordPress pointer on the current admin screen.
361
+ *
362
+ * @since 1.0.0
363
+ * @param string $pointer_id Internal ID of the pointer, make sure it is unique!
364
+ * @param string $html_el HTML element to point to (e.g. '#menu-appearance')
365
+ * @param string $title The title of the pointer.
366
+ * @param string $body Text of the pointer.
367
+ */
368
+ public function pointer( $pointer_id, $html_el, $title, $body ) {
369
+ if ( ! is_admin() ) {
370
+ return;
371
+ }
372
+
373
+ $this->_have( 'init_pointer' ) || add_action(
374
+ 'init',
375
+ array( $this, '_init_pointer' )
376
+ );
377
+ $this->_add( 'init_pointer', compact( 'pointer_id', 'html_el', 'title', 'body' ) );
378
+ }
379
+
380
+ /**
381
+ * Action handler for plugins_loaded. This decides if the pointer will be displayed.
382
+ *
383
+ * @since 1.0.2
384
+ * @private
385
+ */
386
+ public function _init_pointer() {
387
+ $items = $this->_get( 'init_pointer' );
388
+ foreach ( $items as $item ) {
389
+ extract( $item );
390
+
391
+ // Find out which pointer IDs this user has already seen.
392
+ $seen = (string) get_user_meta(
393
+ get_current_user_id(),
394
+ 'dismissed_wp_pointers',
395
+ true
396
+ );
397
+ $seen_list = explode( ',', $seen );
398
+
399
+ // Handle our first pointer announcing the plugin's new settings screen.
400
+ if ( ! in_array( $pointer_id, $seen_list ) ) {
401
+ $this->_have( 'pointer' ) || add_action(
402
+ 'admin_print_footer_scripts',
403
+ array( $this, '_pointer_print_scripts' )
404
+ );
405
+ $this->_have( 'pointer' ) || add_action(
406
+ 'admin_enqueue_scripts',
407
+ array( $this, '_enqueue_pointer' )
408
+ );
409
+ $this->_add( 'pointer', $item );
410
+ }
411
+ }
412
+ }
413
+
414
+ /**
415
+ * Enqueue wp-pointer (for PHP <5.3 only)
416
+ *
417
+ * @since 1.0.1
418
+ * @private
419
+ */
420
+ public function _enqueue_pointer() {
421
+ // Load the JS/CSS for WP Pointers
422
+ wp_enqueue_script( 'wp-pointer' );
423
+ wp_enqueue_style( 'wp-pointer' );
424
+ }
425
+
426
+ /**
427
+ * Action hook for admin footer scripts (for PHP <5.3 only)
428
+ *
429
+ * @since 1.0.1
430
+ * @private
431
+ */
432
+ public function _pointer_print_scripts() {
433
+ $items = $this->_get( 'pointer' );
434
+ foreach ( $items as $item ) {
435
+ extract( $item ); // pointer_id, html_el, title, body
436
+ include $this->_include_path( 'pointer.php' );
437
+ }
438
+ }
439
+
440
+
441
+
442
+ /**
443
+ * Display an admin notice.
444
+ *
445
+ * @since 1.0.0
446
+ * @param string $text Text to display.
447
+ * @param string $class Message-type [updated|error]
448
+ * @param string $screen Limit message to this screen-ID
449
+ */
450
+ public function message( $text, $class = '', $screen = '' ) {
451
+ if ( 'red' == $class || 'err' == $class || 'error' == $class ) {
452
+ $class = 'error';
453
+ } else {
454
+ $class = 'updated';
455
+ }
456
+
457
+ // Check if the message is already queued...
458
+ $items = $this->_sess_get( 'message' );
459
+ foreach ( $items as $key => $data ) {
460
+ if (
461
+ $data['text'] == $text &&
462
+ $data['class'] == $class &&
463
+ $data['screen'] == $screen
464
+ ) {
465
+ return; // Don't add duplicate message to queue.
466
+ }
467
+ }
468
+
469
+ $this->_sess_add( 'message', compact( 'text', 'class', 'screen' ) );
470
+
471
+ if ( did_action( 'admin_notices' ) ) {
472
+ $this->_admin_notice_callback();
473
+ } else {
474
+ $this->_have( '_admin_notice' ) || add_action(
475
+ 'admin_notices',
476
+ array( $this, '_admin_notice_callback' ),
477
+ 1
478
+ );
479
+ $this->_add( '_admin_notice', true );
480
+ }
481
+ }
482
+
483
+ /**
484
+ * Action hook for admin notices (for PHP <5.3 only)
485
+ *
486
+ * @since 1.0.1
487
+ * @private
488
+ */
489
+ public function _admin_notice_callback() {
490
+ $items = $this->_sess_get( 'message' );
491
+ $this->_sess_clear( 'message' );
492
+ $screen_info = get_current_screen();
493
+ $screen_id = $screen_info->id;
494
+
495
+ foreach ( $items as $item ) {
496
+ extract( $item ); // text, class, screen
497
+ if ( empty( $screen ) || $screen_id == $screen ) {
498
+ echo '<div class="' . esc_attr( $class ) . '"><p>' . $text . '</p></div>';
499
+ }
500
+ }
501
+ }
502
+
503
+
504
+
505
+ /**
506
+ * Short way to load the textdomain of a plugin.
507
+ *
508
+ * @since 1.0.0
509
+ * @param string $domain Translations will be mapped to this domain.
510
+ * @param string $rel_dir Path to the dictionary folder; relative to ABSPATH.
511
+ */
512
+ public function translate_plugin( $domain, $rel_dir ) {
513
+ $this->_have( 'textdomain' ) || add_action(
514
+ 'plugins_loaded',
515
+ array( $this, '_translate_plugin_callback' )
516
+ );
517
+ $this->_add( 'textdomain', compact( 'domain', 'rel_dir' ) );
518
+ }
519
+
520
+ /**
521
+ * Create function callback for load textdomain (for PHP <5.3 only)
522
+ *
523
+ * @since 1.0.1
524
+ * @private
525
+ */
526
+ public function _translate_plugin_callback() {
527
+ $items = $this->_get( 'textdomain' );
528
+ foreach ( $items as $item ) {
529
+ extract( $item ); // domain, rel_dir
530
+ load_plugin_textdomain( $domain, false, $rel_dir );
531
+ }
532
+ }
533
+
534
+
535
+
536
+ /**
537
+ * Checks the DB for persistent data from last request.
538
+ * If persistent data exists the appropriate hooks are set to process them.
539
+ *
540
+ * @since 1.0.7
541
+ */
542
+ public function check_persistent_data() {
543
+ // $this->message()
544
+ if ( $this->_sess_have( 'message' ) ) {
545
+ $this->_have( '_admin_notice' ) || add_action(
546
+ 'admin_notices',
547
+ array( $this, '_admin_notice_callback' ),
548
+ 1
549
+ );
550
+ $this->_add( '_admin_notice', true );
551
+ }
552
+ }
553
+
554
+ /**
555
+ * Returns the current URL.
556
+ * This URL is not guaranteed to look exactly same as the user sees it.
557
+ * E.g. Hashtags are missing ("index.php#section-a")
558
+ *
559
+ * @since 1.0.7
560
+ * @return string Full URL to current page.
561
+ */
562
+ public function current_url() {
563
+ $Url = null;
564
+
565
+ if ( null === $Url ) {
566
+ if ( isset( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) == 'on' ) {
567
+ $Url .= 'https://';
568
+ } else {
569
+ $Url = 'http://';
570
+ }
571
+
572
+ if ( $_SERVER['SERVER_PORT'] != '80' ) {
573
+ $Url .= $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI'];
574
+ } else {
575
+ $Url .= $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
576
+ }
577
+ $Url = trailingslashit( $Url );
578
+ }
579
+
580
+ return $Url;
581
+ }
582
+ };
inc/external/wpmu-lib/img/select2.png ADDED
Binary file
inc/external/wpmu-lib/img/select2x2.png ADDED
Binary file
inc/external/wpmu-lib/img/spinner.gif ADDED
Binary file
inc/external/wpmu-lib/inc/pointer.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Code-snippet for WordPress pointers.
4
+ * Used in function WDev()->pointer()
5
+ *
6
+ * Variables:
7
+ * - $pointer_id
8
+ * - $html_el
9
+ * - $title
10
+ * - $body
11
+ */
12
+ $code = <<<EOC
13
+ <div class="wpmui-pointer prepared">
14
+ <h3>$title</h3>
15
+ <p>$body</p>
16
+ </div>
17
+ EOC;
18
+ $code = str_replace( array("\r", "\n"), '', $code );
19
+ ?>
20
+ <script>
21
+ jQuery(document).ready(function() {
22
+ if ( typeof( jQuery().pointer ) != 'undefined' ) {
23
+ jQuery( '<?php echo esc_attr( $html_el ); ?>' ).pointer({
24
+ content: '<?php echo '' . $code; ?>',
25
+ position: {
26
+ edge: 'left',
27
+ align: 'center'
28
+ },
29
+ close: function() {
30
+ jQuery.post( ajaxurl, {
31
+ pointer: '<?php echo esc_js( $pointer_id ) ?>',
32
+ action: 'dismiss-wp-pointer'
33
+ });
34
+ }
35
+ }).pointer('open');
36
+ jQuery( '.wpmui-pointer.prepared' ).each(function() {
37
+ var me = jQuery(this),
38
+ ptr = me.closest('.wp-pointer');
39
+ me.removeClass('wpmui-pointer prepared');
40
+ ptr.addClass('wpmui-pointer');
41
+ });
42
+ }
43
+ });
44
+ </script>
inc/external/wpmu-lib/js/select2.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(e){"undefined"==typeof e.fn.each2&&e.extend(e.fn,{each2:function(t){for(var s=e([0]),i=-1,n=this.length;++i<n&&(s.context=s[0]=this[i])&&t.call(s[0],i,s)!==!1;);return this}})}(jQuery),function(e,t){"use strict";function s(t){var s=e(document.createTextNode(""));t.before(s),s.before(t),s.remove()}function i(e){function t(e){return W[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(e,t){for(var s=0,i=t.length;i>s;s+=1)if(a(e,t[s]))return s;return-1}function o(){var t=e(z);t.appendTo("body");var s={width:t.width()-t[0].clientWidth,height:t.height()-t[0].clientHeight};return t.remove(),s}function a(e,s){return e===s?!0:e===t||s===t?!1:null===e||null===s?!1:e.constructor===String?e+""==s+"":s.constructor===String?s+""==e+"":!1}function r(t,s){var i,n,o;if(null===t||t.length<1)return[];for(i=t.split(s),n=0,o=i.length;o>n;n+=1)i[n]=e.trim(i[n]);return i}function c(e){return e.outerWidth(!1)-e.width()}function l(s){var i="keyup-change-value";s.on("keydown",function(){e.data(s,i)===t&&e.data(s,i,s.val())}),s.on("keyup",function(){var n=e.data(s,i);n!==t&&s.val()!==n&&(e.removeData(s,i),s.trigger("keyup-change"))})}function h(s){s.on("mousemove",function(s){var i=F;(i===t||i.x!==s.pageX||i.y!==s.pageY)&&e(s.target).trigger("mousemove-filtered",s)})}function u(e,s,i){i=i||t;var n;return function(){var t=arguments;window.clearTimeout(n),n=window.setTimeout(function(){s.apply(i,t)},e)}}function d(e,t){var s=u(e,function(e){t.trigger("scroll-debounced",e)});t.on("scroll",function(e){n(e.target,t.get())>=0&&s(e)})}function p(e){e[0]!==document.activeElement&&window.setTimeout(function(){var t,s=e[0],i=e.val().length;e.focus();var n=s.offsetWidth>0||s.offsetHeight>0;n&&s===document.activeElement&&(s.setSelectionRange?s.setSelectionRange(i,i):s.createTextRange&&(t=s.createTextRange(),t.collapse(!1),t.select()))},0)}function f(t){t=e(t)[0];var s=0,i=0;if("selectionStart"in t)s=t.selectionStart,i=t.selectionEnd-s;else if("selection"in document){t.focus();var n=document.selection.createRange();i=document.selection.createRange().text.length,n.moveStart("character",-t.value.length),s=n.text.length-i}return{offset:s,length:i}}function g(e){e.preventDefault(),e.stopPropagation()}function m(e){e.preventDefault(),e.stopImmediatePropagation()}function v(t){if(!L){var s=t[0].currentStyle||window.getComputedStyle(t[0],null);L=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:s.fontSize,fontFamily:s.fontFamily,fontStyle:s.fontStyle,fontWeight:s.fontWeight,letterSpacing:s.letterSpacing,textTransform:s.textTransform,whiteSpace:"nowrap"}),L.attr("class","select2-sizer"),e("body").append(L)}return L.text(t.val()),L.width()}function w(t,s,i){var n,o,a=[];n=e.trim(t.attr("class")),n&&(n=""+n,e(n.split(/\s+/)).each2(function(){0===this.indexOf("select2-")&&a.push(this)})),n=e.trim(s.attr("class")),n&&(n=""+n,e(n.split(/\s+/)).each2(function(){0!==this.indexOf("select2-")&&(o=i(this),o&&a.push(o))})),t.attr("class",a.join(" "))}function b(e,t,s,n){var o=i(e.toUpperCase()).indexOf(i(t.toUpperCase())),a=t.length;return 0>o?(s.push(n(e)),void 0):(s.push(n(e.substring(0,o))),s.push("<span class='select2-match'>"),s.push(n(e.substring(o,o+a))),s.push("</span>"),s.push(n(e.substring(o+a,e.length))),void 0)}function C(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})}function S(s){var i,n=null,o=s.quietMillis||100,a=s.url,r=this;return function(c){window.clearTimeout(i),i=window.setTimeout(function(){var i=s.data,o=a,l=s.transport||e.fn.select2.ajaxDefaults.transport,h={type:s.type||"GET",cache:s.cache||!1,jsonpCallback:s.jsonpCallback||t,dataType:s.dataType||"json"},u=e.extend({},e.fn.select2.ajaxDefaults.params,h);i=i?i.call(r,c.term,c.page,c.context):null,o="function"==typeof o?o.call(r,c.term,c.page,c.context):o,n&&"function"==typeof n.abort&&n.abort(),s.params&&(e.isFunction(s.params)?e.extend(u,s.params.call(r)):e.extend(u,s.params)),e.extend(u,{url:o,dataType:s.dataType,data:i,success:function(e){var t=s.results(e,c.page,c);c.callback(t)}}),n=l.call(r,u)},o)}}function y(t){var s,i,n=t,o=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var a=n();return a.text&&(o=a.text,e.isFunction(o)||(s=a.text,o=function(e){return e[s]})),function(t){var s,i=t.term,a={results:[]};return""===i?(t.callback(n()),void 0):(s=function(n,a){var r,c;if(n=n[0],n.children){r={};for(c in n)n.hasOwnProperty(c)&&(r[c]=n[c]);r.children=[],e(n.children).each2(function(e,t){s(t,r.children)}),(r.children.length||t.matcher(i,o(r),n))&&a.push(r)}else t.matcher(i,o(n),n)&&a.push(n)},e(n().results).each2(function(e,t){s(t,a.results)}),t.callback(a),void 0)}}function E(s){var i=e.isFunction(s);return function(n){var o=n.term,a={results:[]},r=i?s(n):s;e.isArray(r)&&(e(r).each(function(){var e=this.text!==t,s=e?this.text:this;(""===o||n.matcher(o,s))&&a.results.push(e?this:{id:this,text:this})}),n.callback(a))}}function x(t,s){if(e.isFunction(t))return!0;if(!t)return!1;if("string"==typeof t)return!0;throw new Error(s+" must be a string, function, or falsy value")}function T(t,s){if(e.isFunction(t)){var i=Array.prototype.slice.call(arguments,2);return t.apply(s,i)}return t}function O(t){var s=0;return e.each(t,function(e,t){t.children?s+=O(t.children):s++}),s}function P(e,s,i,n){var o,r,c,l,h,u=e,d=!1;if(!n.createSearchChoice||!n.tokenSeparators||n.tokenSeparators.length<1)return t;for(;;){for(r=-1,c=0,l=n.tokenSeparators.length;l>c&&(h=n.tokenSeparators[c],r=e.indexOf(h),!(r>=0));c++);if(0>r)break;if(o=e.substring(0,r),e=e.substring(r+h.length),o.length>0&&(o=n.createSearchChoice.call(this,o,s),o!==t&&null!==o&&n.id(o)!==t&&null!==n.id(o))){for(d=!1,c=0,l=s.length;l>c;c++)if(a(n.id(o),n.id(s[c]))){d=!0;break}d||i(o)}}return u!==e?e:void 0}function I(){var t=this;e.each(arguments,function(e,s){t[s].remove(),t[s]=null})}function k(t,s){var i=function(){};return i.prototype=new t,i.prototype.constructor=i,i.prototype.parent=t.prototype,i.prototype=e.extend(i.prototype,s),i}if(window.Select2===t){var A,R,D,H,M,L,N,U,F={x:0,y:0},A={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){switch(e=e.which?e.which:e){case A.LEFT:case A.RIGHT:case A.UP:case A.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case A.SHIFT:case A.CTRL:case A.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&123>=e}},z="<div class='select2-measure-scrollbar'></div>",W={"Ⓐ":"A",A:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","Ⓑ":"B",B:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","Ⓒ":"C",C:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","Ⓓ":"D",D:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",Ḏ:"D",Đ:"D",Ƌ:"D",Ɗ:"D",Ɖ:"D",Ꝺ:"D",DZ:"DZ",DŽ:"DZ",Dz:"Dz",Dž:"Dz","Ⓔ":"E",E:"E",È:"E",É:"E",Ê:"E",Ề:"E",Ế:"E",Ễ:"E",Ể:"E",Ẽ:"E",Ē:"E",Ḕ:"E",Ḗ:"E",Ĕ:"E",Ė:"E",Ë:"E",Ẻ:"E",Ě:"E",Ȅ:"E",Ȇ:"E",Ẹ:"E",Ệ:"E",Ȩ:"E",Ḝ:"E",Ę:"E",Ḙ:"E",Ḛ:"E",Ɛ:"E",Ǝ:"E","Ⓕ":"F",F:"F",Ḟ:"F",Ƒ:"F",Ꝼ:"F","Ⓖ":"G",G:"G",Ǵ:"G",Ĝ:"G",Ḡ:"G",Ğ:"G",Ġ:"G",Ǧ:"G",Ģ:"G",Ǥ:"G",Ɠ:"G","Ꞡ":"G",Ᵹ:"G",Ꝿ:"G","Ⓗ":"H",H:"H",Ĥ:"H",Ḣ:"H",Ḧ:"H",Ȟ:"H",Ḥ:"H",Ḩ:"H",Ḫ:"H",Ħ:"H",Ⱨ:"H",Ⱶ:"H","Ɥ":"H","Ⓘ":"I",I:"I",Ì:"I",Í:"I",Î:"I",Ĩ:"I",Ī:"I",Ĭ:"I",İ:"I",Ï:"I",Ḯ:"I",Ỉ:"I",Ǐ:"I",Ȉ:"I",Ȋ:"I",Ị:"I",Į:"I",Ḭ:"I",Ɨ:"I","Ⓙ":"J",J:"J",Ĵ:"J",Ɉ:"J","Ⓚ":"K",K:"K",Ḱ:"K",Ǩ:"K",Ḳ:"K",Ķ:"K",Ḵ:"K",Ƙ:"K",Ⱪ:"K",Ꝁ:"K",Ꝃ:"K",Ꝅ:"K","Ꞣ":"K","Ⓛ":"L",L:"L",Ŀ:"L",Ĺ:"L",Ľ:"L",Ḷ:"L",Ḹ:"L",Ļ:"L",Ḽ:"L",Ḻ:"L",Ł:"L",Ƚ:"L",Ɫ:"L",Ⱡ:"L",Ꝉ:"L",Ꝇ:"L",Ꞁ:"L",LJ:"LJ",Lj:"Lj","Ⓜ":"M",M:"M",Ḿ:"M",Ṁ:"M",Ṃ:"M",Ɱ:"M",Ɯ:"M","Ⓝ":"N",N:"N",Ǹ:"N",Ń:"N",Ñ:"N",Ṅ:"N",Ň:"N",Ṇ:"N",Ņ:"N",Ṋ:"N",Ṉ:"N",Ƞ:"N",Ɲ:"N","Ꞑ":"N","Ꞥ":"N",NJ:"NJ",Nj:"Nj","Ⓞ":"O",O:"O",Ò:"O",Ó:"O",Ô:"O",Ồ:"O",Ố:"O",Ỗ:"O",Ổ:"O",Õ:"O",Ṍ:"O",Ȭ:"O",Ṏ:"O",Ō:"O",Ṑ:"O",Ṓ:"O",Ŏ:"O",Ȯ:"O",Ȱ:"O",Ö:"O",Ȫ:"O",Ỏ:"O",Ő:"O",Ǒ:"O",Ȍ:"O",Ȏ:"O",Ơ:"O",Ờ:"O",Ớ:"O",Ỡ:"O",Ở:"O",Ợ:"O",Ọ:"O",Ộ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Ɔ:"O",Ɵ:"O",Ꝋ:"O",Ꝍ:"O",Ƣ:"OI",Ꝏ:"OO",Ȣ:"OU","Ⓟ":"P",P:"P",Ṕ:"P",Ṗ:"P",Ƥ:"P",Ᵽ:"P",Ꝑ:"P",Ꝓ:"P",Ꝕ:"P","Ⓠ":"Q",Q:"Q",Ꝗ:"Q",Ꝙ:"Q",Ɋ:"Q","Ⓡ":"R",R:"R",Ŕ:"R",Ṙ:"R",Ř:"R",Ȑ:"R",Ȓ:"R",Ṛ:"R",Ṝ:"R",Ŗ:"R",Ṟ:"R",Ɍ:"R",Ɽ:"R",Ꝛ:"R","Ꞧ":"R",Ꞃ:"R","Ⓢ":"S",S:"S",ẞ:"S",Ś:"S",Ṥ:"S",Ŝ:"S",Ṡ:"S",Š:"S",Ṧ:"S",Ṣ:"S",Ṩ:"S",Ș:"S",Ş:"S","Ȿ":"S","Ꞩ":"S",Ꞅ:"S","Ⓣ":"T",T:"T",Ṫ:"T",Ť:"T",Ṭ:"T",Ț:"T",Ţ:"T",Ṱ:"T",Ṯ:"T",Ŧ:"T",Ƭ:"T",Ʈ:"T",Ⱦ:"T",Ꞇ:"T",Ꜩ:"TZ","Ⓤ":"U",U:"U",Ù:"U",Ú:"U",Û:"U",Ũ:"U",Ṹ:"U",Ū:"U",Ṻ:"U",Ŭ:"U",Ü:"U",Ǜ:"U",Ǘ:"U",Ǖ:"U",Ǚ:"U",Ủ:"U",Ů:"U",Ű:"U",Ǔ:"U",Ȕ:"U",Ȗ:"U",Ư:"U",Ừ:"U",Ứ:"U",Ữ:"U",Ử:"U",Ự:"U",Ụ:"U",Ṳ:"U",Ų:"U",Ṷ:"U",Ṵ:"U",Ʉ:"U","Ⓥ":"V",V:"V",Ṽ:"V",Ṿ:"V",Ʋ:"V",Ꝟ:"V",Ʌ:"V",Ꝡ:"VY","Ⓦ":"W",W:"W",Ẁ:"W",Ẃ:"W",Ŵ:"W",Ẇ:"W",Ẅ:"W",Ẉ:"W",Ⱳ:"W","Ⓧ":"X",X:"X",Ẋ:"X",Ẍ:"X","Ⓨ":"Y",Y:"Y",Ỳ:"Y",Ý:"Y",Ŷ:"Y",Ỹ:"Y",Ȳ:"Y",Ẏ:"Y",Ÿ:"Y",Ỷ:"Y",Ỵ:"Y",Ƴ:"Y",Ɏ:"Y",Ỿ:"Y","Ⓩ":"Z",Z:"Z",Ź:"Z",Ẑ:"Z",Ż:"Z",Ž:"Z",Ẓ:"Z",Ẕ:"Z",Ƶ:"Z",Ȥ:"Z","Ɀ":"Z",Ⱬ:"Z",Ꝣ:"Z","ⓐ":"a",a:"a",ẚ:"a",à:"a",á:"a",â:"a",ầ:"a",ấ:"a",ẫ:"a",ẩ:"a",ã:"a",ā:"a",ă:"a",ằ:"a",ắ:"a",ẵ:"a",ẳ:"a",ȧ:"a",ǡ:"a",ä:"a",ǟ:"a",ả:"a",å:"a",ǻ:"a",ǎ:"a",ȁ:"a",ȃ:"a",ạ:"a",ậ:"a",ặ:"a",ḁ:"a",ą:"a",ⱥ:"a",ɐ:"a",ꜳ:"aa",æ:"ae",ǽ:"ae",ǣ:"ae",ꜵ:"ao",ꜷ:"au",ꜹ:"av",ꜻ:"av",ꜽ:"ay","ⓑ":"b",b:"b",ḃ:"b",ḅ:"b",ḇ:"b",ƀ:"b",ƃ:"b",ɓ:"b","ⓒ":"c",c:"c",ć:"c",ĉ:"c",ċ:"c",č:"c",ç:"c",ḉ:"c",ƈ:"c",ȼ:"c",ꜿ:"c",ↄ:"c","ⓓ":"d",d:"d",ḋ:"d",ď:"d",ḍ:"d",ḑ:"d",ḓ:"d",ḏ:"d",đ:"d",ƌ:"d",ɖ:"d",ɗ:"d",ꝺ:"d",dz:"dz",dž:"dz","ⓔ":"e",e:"e",è:"e",é:"e",ê:"e",ề:"e",ế:"e",ễ:"e",ể:"e",ẽ:"e",ē:"e",ḕ:"e",ḗ:"e",ĕ:"e",ė:"e",ë:"e",ẻ:"e",ě:"e",ȅ:"e",ȇ:"e",ẹ:"e",ệ:"e",ȩ:"e",ḝ:"e",ę:"e",ḙ:"e",ḛ:"e",ɇ:"e",ɛ:"e",ǝ:"e","ⓕ":"f",f:"f",ḟ:"f",ƒ:"f",ꝼ:"f","ⓖ":"g",g:"g",ǵ:"g",ĝ:"g",ḡ:"g",ğ:"g",ġ:"g",ǧ:"g",ģ:"g",ǥ:"g",ɠ:"g","ꞡ":"g",ᵹ:"g",ꝿ:"g","ⓗ":"h",h:"h",ĥ:"h",ḣ:"h",ḧ:"h",ȟ:"h",ḥ:"h",ḩ:"h",ḫ:"h",ẖ:"h",ħ:"h",ⱨ:"h",ⱶ:"h",ɥ:"h",ƕ:"hv","ⓘ":"i",i:"i",ì:"i",í:"i",î:"i",ĩ:"i",ī:"i",ĭ:"i",ï:"i",ḯ:"i",ỉ:"i",ǐ:"i",ȉ:"i",ȋ:"i",ị:"i",į:"i",ḭ:"i",ɨ:"i",ı:"i","ⓙ":"j",j:"j",ĵ:"j",ǰ:"j",ɉ:"j","ⓚ":"k",k:"k",ḱ:"k",ǩ:"k",ḳ:"k",ķ:"k",ḵ:"k",ƙ:"k",ⱪ:"k",ꝁ:"k",ꝃ:"k",ꝅ:"k","ꞣ":"k","ⓛ":"l",l:"l",ŀ:"l",ĺ:"l",ľ:"l",ḷ:"l",ḹ:"l",ļ:"l",ḽ:"l",ḻ:"l",ſ:"l",ł:"l",ƚ:"l",ɫ:"l",ⱡ:"l",ꝉ:"l",ꞁ:"l",ꝇ:"l",lj:"lj","ⓜ":"m",m:"m",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m",ɯ:"m","ⓝ":"n",n:"n",ǹ:"n",ń:"n",ñ:"n",ṅ:"n",ň:"n",ṇ:"n",ņ:"n",ṋ:"n",ṉ:"n",ƞ:"n",ɲ:"n",ʼn:"n","ꞑ":"n","ꞥ":"n",nj:"nj","ⓞ":"o",o:"o",ò:"o",ó:"o",ô:"o",ồ:"o",ố:"o",ỗ:"o",ổ:"o",õ:"o",ṍ:"o",ȭ:"o",ṏ:"o",ō:"o",ṑ:"o",ṓ:"o",ŏ:"o",ȯ:"o",ȱ:"o",ö:"o",ȫ:"o",ỏ:"o",ő:"o",ǒ:"o",ȍ:"o",ȏ:"o",ơ:"o",ờ:"o",ớ:"o",ỡ:"o",ở:"o",ợ:"o",ọ:"o",ộ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",ɔ:"o",ꝋ:"o",ꝍ:"o",ɵ:"o",ƣ:"oi",ȣ:"ou",ꝏ:"oo","ⓟ":"p",p:"p",ṕ:"p",ṗ:"p",ƥ:"p",ᵽ:"p",ꝑ:"p",ꝓ:"p",ꝕ:"p","ⓠ":"q",q:"q",ɋ:"q",ꝗ:"q",ꝙ:"q","ⓡ":"r",r:"r",ŕ:"r",ṙ:"r",ř:"r",ȑ:"r",ȓ:"r",ṛ:"r",ṝ:"r",ŗ:"r",ṟ:"r",ɍ:"r",ɽ:"r",ꝛ:"r","ꞧ":"r",ꞃ:"r","ⓢ":"s",s:"s",ß:"s",ś:"s",ṥ:"s",ŝ:"s",ṡ:"s",š:"s",ṧ:"s",ṣ:"s",ṩ:"s",ș:"s",ş:"s",ȿ:"s","ꞩ":"s",ꞅ:"s",ẛ:"s","ⓣ":"t",t:"t",ṫ:"t",ẗ:"t",ť:"t",ṭ:"t",ț:"t",ţ:"t",ṱ:"t",ṯ:"t",ŧ:"t",ƭ:"t",ʈ:"t",ⱦ:"t",ꞇ:"t",ꜩ:"tz","ⓤ":"u",u:"u",ù:"u",ú:"u",û:"u",ũ:"u",ṹ:"u",ū:"u",ṻ:"u",ŭ:"u",ü:"u",ǜ:"u",ǘ:"u",ǖ:"u",ǚ:"u",ủ:"u",ů:"u",ű:"u",ǔ:"u",ȕ:"u",ȗ:"u",ư:"u",ừ:"u",ứ:"u",ữ:"u",ử:"u",ự:"u",ụ:"u",ṳ:"u",ų:"u",ṷ:"u",ṵ:"u",ʉ:"u","ⓥ":"v",v:"v",ṽ:"v",ṿ:"v",ʋ:"v",ꝟ:"v",ʌ:"v",ꝡ:"vy","ⓦ":"w",w:"w",ẁ:"w",ẃ:"w",ŵ:"w",ẇ:"w",ẅ:"w",ẘ:"w",ẉ:"w",ⱳ:"w","ⓧ":"x",x:"x",ẋ:"x",ẍ:"x","ⓨ":"y",y:"y",ỳ:"y",ý:"y",ŷ:"y",ỹ:"y",ȳ:"y",ẏ:"y",ÿ:"y",ỷ:"y",ẙ:"y",ỵ:"y",ƴ:"y",ɏ:"y",ỿ:"y","ⓩ":"z",z:"z",ź:"z",ẑ:"z",ż:"z",ž:"z",ẓ:"z",ẕ:"z",ƶ:"z",ȥ:"z",ɀ:"z",ⱬ:"z",ꝣ:"z",Ά:"Α",Έ:"Ε",Ή:"Η",Ί:"Ι",Ϊ:"Ι",Ό:"Ο",Ύ:"Υ",Ϋ:"Υ",Ώ:"Ω",ά:"α",έ:"ε",ή:"η",ί:"ι",ϊ:"ι",ΐ:"ι",ό:"ο",ύ:"υ",ϋ:"υ",ΰ:"υ",ω:"ω",ς:"σ"};N=e(document),M=function(){var e=1;return function(){return e++}}(),R=k(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(s){var i,n,a=".select2-results";this.opts=s=this.prepareOpts(s),this.id=s.id,s.element.data("select2")!==t&&null!==s.element.data("select2")&&s.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(s.element.attr("id")||"autogen"+M()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",s.element.attr("title")),this.body=e("body"),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",s.element.attr("style")),this.container.css(T(s.containerCss,this.opts.element)),this.container.addClass(T(s.containerCssClass,this.opts.element)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",g),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(T(s.dropdownCssClass,this.opts.element)),this.dropdown.data("select2",this),this.dropdown.on("click",g),this.results=i=this.container.find(a),this.search=n=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",g),h(this.results),this.dropdown.on("mousemove-filtered",a,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",a,this.bind(function(e){this._touchEvent=!0,this.highlightUnderEvent(e)})),this.dropdown.on("touchmove",a,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",a,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),d(80,this.results),this.dropdown.on("scroll-debounced",a,this.bind(this.loadMoreIfNeeded)),e(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),e(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),e.fn.mousewheel&&i.mousewheel(function(e,t,s,n){var o=i.scrollTop();n>0&&0>=o-n?(i.scrollTop(0),g(e)):0>n&&i.get(0).scrollHeight-i.scrollTop()+n<=i.height()&&(i.scrollTop(i.get(0).scrollHeight-i.height()),g(e))}),l(n),n.on("keyup-change input paste",this.bind(this.updateResults)),n.on("focus",function(){n.addClass("select2-focused")}),n.on("blur",function(){n.removeClass("select2-focused")}),this.dropdown.on("mouseup",a,this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=t,e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==s.maximumInputLength&&this.search.attr("maxlength",s.maximumInputLength);var r=s.element.prop("disabled");r===t&&(r=!1),this.enable(!r);var c=s.element.prop("readonly");c===t&&(c=!1),this.readonly(c),U=U||o(),this.autofocus=s.element.prop("autofocus"),s.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",s.searchInputPlaceholder)},destroy:function(){var e=this.opts.element,s=e.data("select2");this.close(),e.length&&e[0].detachEvent&&e.each(function(){this.detachEvent("onpropertychange",this._sync)}),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),this._sync=null,s!==t&&(s.container.remove(),s.liveRegion.remove(),s.dropdown.remove(),e.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?e.attr({tabindex:this.elementTabIndex}):e.removeAttr("tabindex"),e.show()),I.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(e){return e.is("option")?{id:e.prop("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:e.prop("disabled"),locked:a(e.attr("locked"),"locked")||a(e.data("locked"),!0)}:e.is("optgroup")?{text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")}:void 0},prepareOpts:function(s){var i,n,o,c,l=this;if(i=s.element,"select"===i.get(0).tagName.toLowerCase()&&(this.select=n=s.element),n&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in s)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),s=e.extend({},{populateResults:function(i,n,o){var a,r=this.opts.id,c=this.liveRegion;a=function(i,n,h){var u,d,p,f,g,m,v,w,b,C;i=s.sortResults(i,n,o);var S=[];for(u=0,d=i.length;d>u;u+=1)p=i[u],g=p.disabled===!0,f=!g&&r(p)!==t,m=p.children&&p.children.length>0,v=e("<li></li>"),v.addClass("select2-results-dept-"+h),v.addClass("select2-result"),v.addClass(f?"select2-result-selectable":"select2-result-unselectable"),g&&v.addClass("select2-disabled"),m&&v.addClass("select2-result-with-children"),v.addClass(l.opts.formatResultCssClass(p)),v.attr("role","presentation"),w=e(document.createElement("div")),w.addClass("select2-result-label"),w.attr("id","select2-result-label-"+M()),w.attr("role","option"),C=s.formatResult(p,w,o,l.opts.escapeMarkup),C!==t&&(w.html(C),v.append(w)),m&&(b=e("<ul></ul>"),b.addClass("select2-result-sub"),a(p.children,b,h+1),v.append(b)),v.data("select2-data",p),S.push(v[0]);n.append(S),c.text(s.formatMatches(i.length))},a(n,i,0)}},e.fn.select2.defaults,s),"function"!=typeof s.id&&(o=s.id,s.id=function(e){return e[o]}),e.isArray(s.element.data("select2Tags"))){if("tags"in s)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+s.element.attr("id");s.tags=s.element.data("select2Tags")}if(n?(s.query=this.bind(function(e){var s,n,o,a={results:[],more:!1},r=e.term;o=function(t,s){var i;t.is("option")?e.matcher(r,t.text(),t)&&s.push(l.optionToData(t)):t.is("optgroup")&&(i=l.optionToData(t),t.children().each2(function(e,t){o(t,i.children)}),i.children.length>0&&s.push(i))},s=i.children(),this.getPlaceholder()!==t&&s.length>0&&(n=this.getPlaceholderOption(),n&&(s=s.not(n))),s.each2(function(e,t){o(t,a.results)}),e.callback(a)}),s.id=function(e){return e.id}):"query"in s||("ajax"in s?(c=s.element.data("ajax-url"),c&&c.length>0&&(s.ajax.url=c),s.query=S.call(s.element,s.ajax)):"data"in s?s.query=y(s.data):"tags"in s&&(s.query=E(s.tags),s.createSearchChoice===t&&(s.createSearchChoice=function(t){return{id:e.trim(t),text:e.trim(t)}}),s.initSelection===t&&(s.initSelection=function(t,i){var n=[];e(r(t.val(),s.separator)).each(function(){var t={id:this,text:this},i=s.tags;e.isFunction(i)&&(i=i()),e(i).each(function(){return a(this.id,t.id)?(t=this,!1):void 0}),n.push(t)}),i(n)}))),"function"!=typeof s.query)throw"query function not defined for Select2 "+s.element.attr("id");if("top"===s.createSearchChoicePosition)s.createSearchChoicePosition=function(e,t){e.unshift(t)};else if("bottom"===s.createSearchChoicePosition)s.createSearchChoicePosition=function(e,t){e.push(t)};else if("function"!=typeof s.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return s},monitorSource:function(){var s,i=this.opts.element,n=this;i.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),this._sync=this.bind(function(){var e=i.prop("disabled");e===t&&(e=!1),this.enable(!e);var s=i.prop("readonly");s===t&&(s=!1),this.readonly(s),w(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(T(this.opts.containerCssClass,this.opts.element)),w(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(T(this.opts.dropdownCssClass,this.opts.element))}),i.length&&i[0].attachEvent&&i.each(function(){this.attachEvent("onpropertychange",n._sync)}),s=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,s!==t&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new s(function(t){e.each(t,n._sync)}),this.propertyObserver.observe(i.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(t){var s=e.Event("select2-selecting",{val:this.id(t),object:t,choice:t});return this.opts.element.trigger(s),!s.isDefaultPrevented()},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var e=this._enabled&&!this._readonly,t=!e;return e===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",t),this.close(),this.enabledInterface=e,!0)},enable:function(e){e===t&&(e=!0),this._enabled!==e&&(this._enabled=e,this.opts.element.prop("disabled",!e),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(e){e===t&&(e=!1),this._readonly!==e&&(this._readonly=e,this.opts.element.prop("readonly",e),this.enableInterface())},opened:function(){return this.container?this.container.hasClass("select2-dropdown-open"):!1},positionDropdown:function(){var t,s,i,n,o,a=this.dropdown,r=this.container.offset(),c=this.container.outerHeight(!1),l=this.container.outerWidth(!1),h=a.outerHeight(!1),u=e(window),d=u.width(),p=u.height(),f=u.scrollLeft()+d,g=u.scrollTop()+p,m=r.top+c,v=r.left,w=g>=m+h,b=r.top-h>=u.scrollTop(),C=a.outerWidth(!1),S=f>=v+C,y=a.hasClass("select2-drop-above");y?(s=!0,!b&&w&&(i=!0,s=!1)):(s=!1,!w&&b&&(i=!0,s=!0)),i&&(a.hide(),r=this.container.offset(),c=this.container.outerHeight(!1),l=this.container.outerWidth(!1),h=a.outerHeight(!1),f=u.scrollLeft()+d,g=u.scrollTop()+p,m=r.top+c,v=r.left,C=a.outerWidth(!1),S=f>=v+C,a.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(o=e(".select2-results",a)[0],a.addClass("select2-drop-auto-width"),a.css("width",""),C=a.outerWidth(!1)+(o.scrollHeight===o.clientHeight?0:U.width),C>l?l=C:C=l,h=a.outerHeight(!1),S=f>=v+C):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(t=this.body.offset(),m-=t.top,v-=t.left),S||(v=r.left+this.container.outerWidth(!1)-C),n={left:v,width:l},s?(n.top=r.top-h,n.bottom="auto",this.container.addClass("select2-drop-above"),a.addClass("select2-drop-above")):(n.top=m,n.bottom="auto",this.container.removeClass("select2-drop-above"),a.removeClass("select2-drop-above")),n=e.extend(n,T(this.opts.dropdownCss,this.opts.element)),a.css(n)},shouldOpen:function(){var t;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(t=e.Event("select2-opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),N.on("mousemove.select2Event",function(e){F.x=e.pageX,F.y=e.pageY}),!0):!1},opening:function(){var t,i=this.containerEventName,n="scroll."+i,o="resize."+i,a="orientationchange."+i;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),t=e("#select2-drop-mask"),0==t.length&&(t=e(document.createElement("div")),t.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),t.hide(),t.appendTo(this.body),t.on("mousedown touchstart click",function(i){s(t);var n,o=e("#select2-drop");o.length>0&&(n=o.data("select2"),n.opts.selectOnBlur&&n.selectHighlighted({noFocus:!0}),n.close(),i.preventDefault(),i.stopPropagation())})),this.dropdown.prev()[0]!==t[0]&&this.dropdown.before(t),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),t.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var r=this;this.container.parents().add(window).each(function(){e(this).on(o+" "+n+" "+a,function(){r.opened()&&r.positionDropdown()})})},close:function(){if(this.opened()){var t=this.containerEventName,s="scroll."+t,i="resize."+t,n="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).off(s).off(i).off(n)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),N.off("mousemove.select2Event"),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(e.Event("select2-close"))}},externalSearch:function(e){this.open(),this.search.val(e),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return T(this.opts.maximumSelectionSize,this.opts.element)},ensureHighlightVisible:function(){var t,s,i,n,o,a,r,c,l=this.results;if(s=this.highlight(),!(0>s)){if(0==s)return l.scrollTop(0),void 0;t=this.findHighlightableChoices().find(".select2-result-label"),i=e(t[s]),c=(i.offset()||{}).top||0,n=c+i.outerHeight(!0),s===t.length-1&&(r=l.find("li.select2-more-results"),r.length>0&&(n=r.offset().top+r.outerHeight(!0))),o=l.offset().top+l.outerHeight(!0),n>o&&l.scrollTop(l.scrollTop()+(n-o)),a=c-l.offset().top,0>a&&"none"!=i.css("display")&&l.scrollTop(l.scrollTop()+a)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(t){for(var s=this.findHighlightableChoices(),i=this.highlight();i>-1&&i<s.length;){i+=t;var n=e(s[i]);if(n.hasClass("select2-result-selectable")&&!n.hasClass("select2-disabled")&&!n.hasClass("select2-selected")){this.highlight(i);break}}},highlight:function(t){var s,i,o=this.findHighlightableChoices();return 0===arguments.length?n(o.filter(".select2-highlighted")[0],o.get()):(t>=o.length&&(t=o.length-1),0>t&&(t=0),this.removeHighlight(),s=e(o[t]),s.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",s.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(s.text()),i=s.data("select2-data"),i&&this.opts.element.trigger({type:"select2-highlight",val:this.id(i),choice:i}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var s=e(t.target).closest(".select2-result-selectable");if(s.length>0&&!s.is(".select2-highlighted")){var i=this.findHighlightableChoices();this.highlight(i.index(s))}else 0==s.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var e,t=this.results,s=t.find("li.select2-more-results"),i=this.resultsPage+1,n=this,o=this.search.val(),a=this.context;0!==s.length&&(e=s.offset().top-t.offset().top-t.height(),e<=this.opts.loadMorePadding&&(s.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:a,matcher:this.opts.matcher,callback:this.bind(function(e){n.opened()&&(n.opts.populateResults.call(this,t,e.results,{term:o,page:i,context:a}),n.postprocessResults(e,!1,!1),e.more===!0?(s.detach().appendTo(t).text(T(n.opts.formatLoadMore,n.opts.element,i+1)),window.setTimeout(function(){n.loadMoreIfNeeded()},10)):s.remove(),n.positionDropdown(),n.resultsPage=i,n.context=e.context,this.opts.element.trigger({type:"select2-loaded",items:e}))})})))},tokenize:function(){},updateResults:function(s){function i(){l.removeClass("select2-active"),d.positionDropdown(),h.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?d.liveRegion.text(h.text()):d.liveRegion.text(d.opts.formatMatches(h.find(".select2-result-selectable").length))}function n(e){h.html(e),i()}var o,r,c,l=this.search,h=this.results,u=this.opts,d=this,p=l.val(),f=e.data(this.container,"select2-last-term");if((s===!0||!f||!a(p,f))&&(e.data(this.container,"select2-last-term",p),s===!0||this.showSearchInput!==!1&&this.opened())){c=++this.queryCount;var g=this.getMaximumSelectionSize();if(g>=1&&(o=this.data(),e.isArray(o)&&o.length>=g&&x(u.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+T(u.formatSelectionTooBig,u.element,g)+"</li>"),void 0;if(l.val().length<u.minimumInputLength)return x(u.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+T(u.formatInputTooShort,u.element,l.val(),u.minimumInputLength)+"</li>"):n(""),s&&this.showSearch&&this.showSearch(!0),void 0;if(u.maximumInputLength&&l.val().length>u.maximumInputLength)return x(u.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+T(u.formatInputTooLong,u.element,l.val(),u.maximumInputLength)+"</li>"):n(""),void 0;u.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+T(u.formatSearching,u.element)+"</li>"),l.addClass("select2-active"),this.removeHighlight(),r=this.tokenize(),r!=t&&null!=r&&l.val(r),this.resultsPage=1,u.query({element:u.element,term:l.val(),page:this.resultsPage,context:null,matcher:u.matcher,callback:this.bind(function(o){var r;if(c==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&""!==l.val()&&(r=this.opts.createSearchChoice.call(d,l.val(),o.results),r!==t&&null!==r&&d.id(r)!==t&&null!==d.id(r)&&0===e(o.results).filter(function(){return a(d.id(this),d.id(r))}).length&&this.opts.createSearchChoicePosition(o.results,r)),0===o.results.length&&x(u.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+T(u.formatNoMatches,u.element,l.val())+"</li>"),void 0;h.empty(),d.opts.populateResults.call(this,h,o.results,{term:l.val(),page:this.resultsPage,context:null}),o.more===!0&&x(u.formatLoadMore,"formatLoadMore")&&(h.append("<li class='select2-more-results'>"+u.escapeMarkup(T(u.formatLoadMore,u.element,this.resultsPage))+"</li>"),window.setTimeout(function(){d.loadMoreIfNeeded()},10)),this.postprocessResults(o,s),i(),this.opts.element.trigger({type:"select2-loaded",items:o})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){p(this.search)},selectHighlighted:function(e){if(this._touchMoved)return this.clearTouchMoved(),void 0;var t=this.highlight(),s=this.results.find(".select2-highlighted"),i=s.closest(".select2-result").data("select2-data");i?(this.highlight(t),this.onSelect(i,e)):e&&e.noFocus&&this.close()},getPlaceholder:function(){var e;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((e=this.getPlaceholderOption())!==t?e.text():t)},getPlaceholderOption:function(){if(this.select){var s=this.select.children("option").first();if(this.opts.placeholderOption!==t)return"first"===this.opts.placeholderOption&&s||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===e.trim(s.text())&&""===s.val())return s}},initContainerWidth:function(){function s(){var s,i,n,o,a,r;
2
+ if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(s=this.opts.element.attr("style"),s!==t)for(i=s.split(";"),o=0,a=i.length;a>o;o+=1)if(r=i[o].replace(/\s/g,""),n=r.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==n&&n.length>=1)return n[1];return"resolve"===this.opts.width?(s=this.opts.element.css("width"),s.indexOf("%")>0?s:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var i=s.call(this);null!==i&&this.container.css("width",i)}}),D=k(R,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return t},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var s,i,n;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),s=this.search.get(0),s.createTextRange?(i=s.createTextRange(),i.collapse(!1),i.select()):s.setSelectionRange&&(n=this.search.val().length,s.setSelectionRange(n,n))),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){e("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),I.call(this,"selection","focusser")},initContainer:function(){var t,i,n=this.container,o=this.dropdown,a=M();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=t=n.find(".select2-choice"),this.focusser=n.find(".select2-focusser"),t.find(".select2-chosen").attr("id","select2-chosen-"+a),this.focusser.attr("aria-labelledby","select2-chosen-"+a),this.results.attr("id","select2-results-"+a),this.search.attr("aria-owns","select2-results-"+a),this.focusser.attr("id","s2id_autogen"+a),i=e("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(i.text()).attr("for",this.focusser.attr("id"));var r=this.opts.element.attr("title");this.opts.element.attr("title",r||i.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text(e("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){if(e.which===A.PAGE_UP||e.which===A.PAGE_DOWN)return g(e),void 0;switch(e.which){case A.UP:case A.DOWN:return this.moveHighlight(e.which===A.UP?-1:1),g(e),void 0;case A.ENTER:return this.selectHighlighted(),g(e),void 0;case A.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case A.ESC:return this.cancel(e),g(e),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==A.TAB&&!A.isControl(e)&&!A.isFunctionKey(e)&&e.which!==A.ESC){if(this.opts.openOnEnter===!1&&e.which===A.ENTER)return g(e),void 0;if(e.which==A.DOWN||e.which==A.UP||e.which==A.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),g(e),void 0}return e.which==A.DELETE||e.which==A.BACKSPACE?(this.opts.allowClear&&this.clear(),g(e),void 0):void 0}})),l(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),t.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),m(e),this.close(),this.selection.focus())})),t.on("mousedown touchstart",this.bind(function(i){s(t),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),g(i)})),o.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),t.on("focus",this.bind(function(e){g(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(e.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(t){var s=this.selection.data("select2-data");if(s){var i=e.Event("select2-clearing");if(this.opts.element.trigger(i),i.isDefaultPrevented())return;var n=this.getPlaceholderOption();this.opts.element.val(n?n.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),t!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(s),choice:s}),this.triggerChange({removed:s}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var e=this;this.opts.initSelection.call(null,this.opts.element,function(s){s!==t&&null!==s&&(e.updateSelection(s),e.close(),e.setPlaceholder(),e.nextSearchTerm=e.opts.nextSearchTerm(s,e.search.val()))})}},isPlaceholderOptionSelected:function(){var e;return this.getPlaceholder()===t?!1:(e=this.getPlaceholderOption())!==t&&e.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===t||null===this.opts.element.val()},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),s=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=e.find("option").filter(function(){return this.selected&&!this.disabled});t(s.optionToData(i))}:"data"in t&&(t.initSelection=t.initSelection||function(s,i){var n=s.val(),o=null;t.query({matcher:function(e,s,i){var r=a(n,t.id(i));return r&&(o=i),r},callback:e.isFunction(i)?function(){i(o)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===t?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&e!==t){if(this.select&&this.getPlaceholderOption()===t)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(e,t,s){var i=0,n=this;if(this.findHighlightableChoices().each2(function(e,t){return a(n.id(t.data("select2-data")),n.opts.element.val())?(i=e,!1):void 0}),s!==!1&&(t===!0&&i>=0?this.highlight(i):this.highlight(0)),t===!0){var o=this.opts.minimumResultsForSearch;o>=0&&this.showSearch(O(e.results)>=o)}},showSearch:function(t){this.showSearchInput!==t&&(this.showSearchInput=t,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!t),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!t),e(this.dropdown,this.container).toggleClass("select2-with-searchbox",t))},onSelect:function(e,t){if(this.triggerSelect(e)){var s=this.opts.element.val(),i=this.data();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"select2-selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.close(),t&&t.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),a(s,this.id(e))||this.triggerChange({added:e,removed:i})}},updateSelection:function(e){var s,i,n=this.selection.find(".select2-chosen");this.selection.data("select2-data",e),n.empty(),null!==e&&(s=this.opts.formatSelection(e,n,this.opts.escapeMarkup)),s!==t&&n.append(s),i=this.opts.formatSelectionCssClass(e,n),i!==t&&n.addClass(i),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.container.addClass("select2-allowclear")},val:function(){var e,s=!1,i=null,n=this,o=this.data();if(0===arguments.length)return this.opts.element.val();if(e=arguments[0],arguments.length>1&&(s=arguments[1]),this.select)this.select.val(e).find("option").filter(function(){return this.selected}).each2(function(e,t){return i=n.optionToData(t),!1}),this.updateSelection(i),this.setPlaceholder(),s&&this.triggerChange({added:i,removed:o});else{if(!e&&0!==e)return this.clear(s),void 0;if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){n.opts.element.val(e?n.id(e):""),n.updateSelection(e),n.setPlaceholder(),s&&n.triggerChange({added:e,removed:o})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var s,i=!1;return 0===arguments.length?(s=this.selection.data("select2-data"),s==t&&(s=null),s):(arguments.length>1&&(i=arguments[1]),e?(s=this.data(),this.opts.element.val(e?this.id(e):""),this.updateSelection(e),i&&this.triggerChange({added:e,removed:s})):this.clear(i),void 0)}}),H=k(R,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments),s=this;return"select"===t.element.get(0).tagName.toLowerCase()?t.initSelection=function(e,t){var i=[];e.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(e,t){i.push(s.optionToData(t))}),t(i)}:"data"in t&&(t.initSelection=t.initSelection||function(s,i){var n=r(s.val(),t.separator),o=[];t.query({matcher:function(s,i,r){var c=e.grep(n,function(e){return a(e,t.id(r))}).length;return c&&o.push(r),c},callback:e.isFunction(i)?function(){for(var e=[],s=0;s<n.length;s++)for(var r=n[s],c=0;c<o.length;c++){var l=o[c];if(a(r,t.id(l))){e.push(l),o.splice(c,1);break}}i(e)}:e.noop})}),t},selectChoice:function(e){var t=this.container.find(".select2-search-choice-focus");t.length&&e&&e[0]==t[0]||(t.length&&this.opts.element.trigger("choice-deselected",t),t.removeClass("select2-search-choice-focus"),e&&e.length&&(this.close(),e.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",e)))},destroy:function(){e("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),I.call(this,"searchContainer","selection")},initContainer:function(){var t,s=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=t=this.container.find(s);var i=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){i.search[0].focus(),i.selectChoice(e(this))}),this.search.attr("id","s2id_autogen"+M()),this.search.prev().text(e("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.search.attr("placeholder")&&0==this.search.val().length||this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var s=t.find(".select2-search-choice-focus"),i=s.prev(".select2-search-choice:not(.select2-locked)"),n=s.next(".select2-search-choice:not(.select2-locked)"),o=f(this.search);if(s.length&&(e.which==A.LEFT||e.which==A.RIGHT||e.which==A.BACKSPACE||e.which==A.DELETE||e.which==A.ENTER)){var a=s;return e.which==A.LEFT&&i.length?a=i:e.which==A.RIGHT?a=n.length?n:null:e.which===A.BACKSPACE?this.unselect(s.first())&&(this.search.width(10),a=i.length?i:n):e.which==A.DELETE?this.unselect(s.first())&&(this.search.width(10),a=n.length?n:null):e.which==A.ENTER&&(a=null),this.selectChoice(a),g(e),a&&a.length||this.open(),void 0}if((e.which===A.BACKSPACE&&1==this.keydowns||e.which==A.LEFT)&&0==o.offset&&!o.length)return this.selectChoice(t.find(".select2-search-choice:not(.select2-locked)").last()),g(e),void 0;if(this.selectChoice(null),this.opened())switch(e.which){case A.UP:case A.DOWN:return this.moveHighlight(e.which===A.UP?-1:1),g(e),void 0;case A.ENTER:return this.selectHighlighted(),g(e),void 0;case A.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case A.ESC:return this.cancel(e),g(e),void 0}if(e.which!==A.TAB&&!A.isControl(e)&&!A.isFunctionKey(e)&&e.which!==A.BACKSPACE&&e.which!==A.ESC){if(e.which===A.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===A.PAGE_UP||e.which===A.PAGE_DOWN)&&g(e),e.which===A.ENTER&&g(e)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(t){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),t.stopImmediatePropagation(),this.opts.element.trigger(e.Event("select2-blur"))})),this.container.on("click",s,this.bind(function(t){this.isInterfaceEnabled()&&(e(t.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.open(),this.focusSearch(),t.preventDefault()))})),this.container.on("focus",s,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(e.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var e=this;this.opts.initSelection.call(null,this.opts.element,function(s){s!==t&&null!==s&&(e.updateSelection(s),e.close(),e.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder(),s=this.getMaxSearchWidth();e!==t&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.search.width(s>0?s:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger(e.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var s=[],i=[],o=this;e(t).each(function(){n(o.id(this),s)<0&&(s.push(o.id(this)),i.push(this))}),t=i,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){o.addSelectedChoice(this)}),o.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer.call(this,e,this.data(),this.bind(this.onSelect),this.opts),null!=e&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,s){this.triggerSelect(e)&&(this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.nextSearchTerm=this.opts.nextSearchTerm(e,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(e,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=t&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),s&&s.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(s){var i,n,o=!s.locked,a=e("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),r=e("<li class='select2-search-choice select2-locked'><div></div></li>"),c=o?a:r,l=this.id(s),h=this.getVal();i=this.opts.formatSelection(s,c.find("div"),this.opts.escapeMarkup),i!=t&&c.find("div").replaceWith("<div>"+i+"</div>"),n=this.opts.formatSelectionCssClass(s,c.find("div")),n!=t&&c.addClass(n),o&&c.find(".select2-search-choice-close").on("mousedown",g).on("click dblclick",this.bind(function(t){this.isInterfaceEnabled()&&(this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),g(t),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),c.data("select2-data",s),c.insertBefore(this.searchContainer),h.push(l),this.setVal(h)},unselect:function(t){var s,i,o=this.getVal();if(t=t.closest(".select2-search-choice"),0===t.length)throw"Invalid argument: "+t+". Must be .select2-search-choice";if(s=t.data("select2-data")){var a=e.Event("select2-removing");if(a.val=this.id(s),a.choice=s,this.opts.element.trigger(a),a.isDefaultPrevented())return!1;for(;(i=n(this.id(s),o))>=0;)o.splice(i,1),this.setVal(o),this.select&&this.postprocessResults();return t.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(s),choice:s}),this.triggerChange({removed:s}),!0}},postprocessResults:function(e,t,s){var i=this.getVal(),o=this.results.find(".select2-result"),a=this.results.find(".select2-result-with-children"),r=this;o.each2(function(e,t){var s=r.id(t.data("select2-data"));n(s,i)>=0&&(t.addClass("select2-selected"),t.find(".select2-result-selectable").addClass("select2-selected"))}),a.each2(function(e,t){t.is(".select2-result-selectable")||0!==t.find(".select2-result-selectable:not(.select2-selected)").length||t.addClass("select2-selected")}),-1==this.highlight()&&s!==!1&&r.highlight(0),!this.opts.createSearchChoice&&!o.filter(".select2-result:not(.select2-selected)").length>0&&(!e||e&&!e.more&&0===this.results.find(".select2-no-results").length)&&x(r.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+T(r.opts.formatNoMatches,r.opts.element,r.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-c(this.search)},resizeSearch:function(){var e,t,s,i,n,o=c(this.search);e=v(this.search)+10,t=this.search.offset().left,s=this.selection.width(),i=this.selection.offset().left,n=s-(t-i)-o,e>n&&(n=s-o),40>n&&(n=s-o),0>=n&&(n=e),this.search.width(Math.floor(n))},getVal:function(){var e;return this.select?(e=this.select.val(),null===e?[]:e):(e=this.opts.element.val(),r(e,this.opts.separator))},setVal:function(t){var s;this.select?this.select.val(t):(s=[],e(t).each(function(){n(this,s)<0&&s.push(this)}),this.opts.element.val(0===s.length?"":s.join(this.opts.separator)))},buildChangeDetails:function(e,t){for(var t=t.slice(0),e=e.slice(0),s=0;s<t.length;s++)for(var i=0;i<e.length;i++)a(this.opts.id(t[s]),this.opts.id(e[i]))&&(t.splice(s,1),s>0&&s--,e.splice(i,1),i--);return{added:t,removed:e}},val:function(s,i){var n,o=this;if(0===arguments.length)return this.getVal();if(n=this.data(),n.length||(n=[]),!s&&0!==s)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),i&&this.triggerChange({added:this.data(),removed:n}),void 0;if(this.setVal(s),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),i&&this.triggerChange(this.buildChangeDetails(n,this.data()));else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var s=e.map(t,o.id);o.setVal(s),o.updateSelection(t),o.clearSearch(),i&&o.triggerChange(o.buildChangeDetails(n,o.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],s=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(s.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t,s){var i,n,o=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get():(n=this.data(),t||(t=[]),i=e.map(t,function(e){return o.opts.id(e)}),this.setVal(i),this.updateSelection(t),this.clearSearch(),s&&this.triggerChange(this.buildChangeDetails(n,this.data())),void 0)}}),e.fn.select2=function(){var s,i,o,a,r,c=Array.prototype.slice.call(arguments,0),l=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],h=["opened","isFocused","container","dropdown"],u=["val","data"],d={search:"externalSearch"};return this.each(function(){if(0===c.length||"object"==typeof c[0])s=0===c.length?{}:e.extend({},c[0]),s.element=e(this),"select"===s.element.get(0).tagName.toLowerCase()?r=s.element.prop("multiple"):(r=s.multiple||!1,"tags"in s&&(s.multiple=r=!0)),i=r?new window.Select2["class"].multi:new window.Select2["class"].single,i.init(s);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(n(c[0],l)<0)throw"Unknown method: "+c[0];if(a=t,i=e(this).data("select2"),i===t)return;if(o=c[0],"container"===o?a=i.container:"dropdown"===o?a=i.dropdown:(d[o]&&(o=d[o]),a=i[o].apply(i,c.slice(1))),n(c[0],h)>=0||n(c[0],u)>=0&&1==c.length)return!1}}),a===t?this:a},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,s,i){var n=[];return b(e.text,s.term,n,i),n.join("")},formatSelection:function(e,s,i){return e?i(e.text):t},sortResults:function(e){return e},formatResultCssClass:function(e){return e.css},formatSelectionCssClass:function(){return t},formatMatches:function(e){return 1===e?"One result is available, press enter to select it.":e+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var s=t-e.length;return"Please enter "+s+" or more character"+(1==s?"":"s")},formatInputTooLong:function(e,t){var s=e.length-t;return"Please delete "+s+" character"+(1==s?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(1==e?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==t?null:e.id},matcher:function(e,t){return i(""+t).toUpperCase().indexOf(i(""+e).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:P,escapeMarkup:C,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return t},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(e){var t="ontouchstart"in window||navigator.msMaxTouchPoints>0;return t?e.opts.minimumResultsForSearch<0?!1:!0:!0}},e.fn.select2.ajaxDefaults={transport:e.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:S,local:y,tags:E},util:{debounce:u,markMatch:b,escapeMarkup:C,stripDiacritics:i},"class":{"abstract":R,single:D,multi:H}}}}(jQuery);
inc/external/wpmu-lib/js/tiny-scrollbar.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){"use strict";function e(e,n){function s(){return m.update(),h(),m}function c(){z.css(g,m.contentPosition/m.trackRatio),l.css(g,-m.contentPosition),S.css(P,m.trackSize),f.css(P,m.trackSize),z.css(P,m.thumbSize)}function h(){b?p[0].ontouchstart=function(t){1===t.touches.length&&(t.stopPropagation(),a(t.touches[0]))}:(z.bind("mousedown",a),f.bind("mousedown",r)),t(window).resize(function(){m.update("relative")}),m.options.wheel&&window.addEventListener?e[0].addEventListener(k,u,!1):m.options.wheel&&(e[0].onmousewheel=u)}function a(e){t("body").addClass("noSelect"),v=w?e.pageX:e.pageY,m.thumbPosition=parseInt(z.css(g),10)||0,b?(document.ontouchmove=function(t){t.preventDefault(),r(t.touches[0])},document.ontouchend=d):(t(document).bind("mousemove",r),t(document).bind("mouseup",d),z.bind("mouseup",d))}function u(i){if(m.contentRatio<1){var o=i||window.event,n="delta"+m.options.axis.toUpperCase(),s=-(o[n]||o.detail||-1/3*o.wheelDelta)/40;m.contentPosition-=s*m.options.wheelSpeed,m.contentPosition=Math.min(m.contentSize-m.viewportSize,Math.max(0,m.contentPosition)),e.trigger("move"),z.css(g,m.contentPosition/m.trackRatio),l.css(g,-m.contentPosition),(m.options.wheelLock||m.contentPosition!==m.contentSize-m.viewportSize&&0!==m.contentPosition)&&(o=t.event.fix(o),o.preventDefault())}}function r(t){if(m.contentRatio<1){var i=w?t.pageX:t.pageY,o=i-v;m.options.scrollInvert&&b&&(o=v-i);var n=Math.min(m.trackSize-m.thumbSize,Math.max(0,m.thumbPosition+o));m.contentPosition=n*m.trackRatio,e.trigger("move"),z.css(g,n),l.css(g,-m.contentPosition)}}function d(){t("body").removeClass("noSelect"),t(document).unbind("mousemove",r),t(document).unbind("mouseup",d),z.unbind("mouseup",d),document.ontouchmove=document.ontouchend=null}this.options=t.extend({},o,n),this._defaults=o,this._name=i;var m=this,p=e.find(".viewport"),l=e.find(".overview"),S=e.find(".scrollbar"),f=S.find(".track"),z=S.find(".thumb"),v=0,w="x"===this.options.axis,b="ontouchstart"in document.documentElement,k="onwheel"in document||document.documentMode>=9?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll",P=w?"width":"height",g=w?"left":"top";return this.contentPosition=0,this.viewportSize=0,this.contentSize=0,this.contentRatio=0,this.trackSize=0,this.trackRatio=0,this.thumbSize=0,this.thumbPosition=0,this.update=function(t){var e=P.charAt(0).toUpperCase()+P.slice(1).toLowerCase();switch(this.viewportSize=p[0]["offset"+e],this.contentSize=l[0]["scroll"+e],this.contentRatio=this.viewportSize/this.contentSize,this.trackSize=this.options.trackSize||this.viewportSize,this.thumbSize=Math.min(this.trackSize,Math.max(0,this.options.thumbSize||this.trackSize*this.contentRatio)),this.trackRatio=this.options.thumbSize?(this.contentSize-this.viewportSize)/(this.trackSize-this.thumbSize):this.contentSize/this.trackSize,S.toggleClass("disable",this.contentRatio>=1),t){case"bottom":this.contentPosition=this.contentSize-this.viewportSize;break;case"relative":this.contentPosition=Math.min(Math.max(this.contentSize-this.viewportSize,0),Math.max(0,this.contentPosition));break;default:this.contentPosition=parseInt(t,10)||0}return c(),m},s()}var i="tinyscrollbar",o={axis:"y",wheel:!0,wheelSpeed:40,wheelLock:!0,scrollInvert:!1,trackSize:!1,thumbSize:!1};t.fn[i]=function(o){return this.each(function(){t.data(this,"plugin_"+i)||t.data(this,"plugin_"+i,new e(t(this),o))})}});
inc/external/wpmu-lib/js/wpmu-ui.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){function e(){null==s&&(r=jQuery(document),s=jQuery("html"),c=jQuery("body"),o(),a(),t.upgrade_multiselect(),t.upgrade_tooltips())}function i(){null===u&&(u=jQuery("<div></div>").addClass("wpmui-overlay").appendTo(c)),c.addClass("wpmui-has-overlay"),s.addClass("wpmui-no-scroll")}function n(){c.removeClass("wpmui-has-overlay"),s.removeClass("wpmui-no-scroll")}function o(){var t=function(t){var e=jQuery(this).closest(".wpmui-box");return t.preventDefault(),e.hasClass("static")?!1:(e.toggleClass("closed"),!1)};c.on("click",".wpmui-box > h3",t),c.on("click",".wpmui-box > h3 > .toggle",t)}function a(){var t=function(t){var e=jQuery(this),i=e.closest(".wpmui-tabs"),n=i.next(".wpmui-tab-contents"),o=i.find(".active.tab"),a=e.attr("href"),r=o.attr("href"),s=n.find(a);return content_active=n.find(r),e.hasClass("active")||(o.removeClass("active"),content_active.removeClass("active")),e.addClass("active"),s.addClass("active"),t.preventDefault(),!1};c.on("click",".wpmui-tabs .tab",t)}var r=null,s=null,c=null,u=null;t.popup=function(){return e(),new l},t.ajax=function(t,i){return e(),new d(t,i)},t.upgrade_multiselect=function(t){e(),t=jQuery(t||c);var i={closeOnSelect:!1,width:"100%"};t.find("select[multiple]").each(function(){var t=jQuery(this);"1"!=t.data("wpmui-chosen")&&(t.data("wpmui-chosen","1"),window.setTimeout(function(){t.select2(i)},1))})},t.message=function(t){var i,n,o,a;e();var r=function(t){return t.preventDefault(),n.remove(),!1},s=function(){var t=jQuery(this).closest(".wpmui-msg");t.find(".debug").toggle()};return"undefined"==typeof t?!1:(("string"==typeof t||t instanceof Array)&&(t={message:t}),t.message instanceof Array&&(t.message=t.message.join("<br />")),t.message?(t.type=void 0==t.type?"ok":t.type.toString().toLowerCase(),t.close=void 0==t.close?!0:t.close,t.parent=void 0==t.parent?".wrap":t.parent,t.insert_after=void 0==t.insert_after?"h2":t.insert_after,t.id=void 0==t.id?"":t.id.toString().toLowerCase(),t["class"]=void 0==t["class"]?"":t["class"].toString().toLowerCase(),t.details=void 0==t.details?!1:t.details,("error"==t.type||"red"==t.type)&&(t.type="err"),("success"==t.type||"green"==t.type)&&(t.type="ok"),i=jQuery(t.parent).first(),i.length?(t.id&&jQuery('.wpmui-msg[data-id="'+t.id+'"]').length?(n=jQuery('.wpmui-msg[data-id="'+t.id+'"]').first(),a=!1):(n=jQuery("<div><p></p></div>"),t.id&&n.attr("data-id",t.id),a=!0),n.find("p").html(t.message),"err"==t.type&&t.details&&window.JSON&&(jQuery('<div class="debug" style="display:none"></div>').appendTo(n).text(JSON.stringify(t.details)),jQuery('<i class="dashicons dashicons-editor-help light"></i>').prependTo(n.find("p:first")).click(s).after(" ")),n.removeClass().addClass("updated wpmui-msg "+t["class"]),"err"==t.type&&n.addClass("error"),a&&(t.close&&(o=jQuery('<a href="#" class="wpmui-close">&times;</a>'),o.prependTo(n),o.click(r)),t.insert_after&&i.find(t.insert_after).length?(i=i.find(t.insert_after).first(),i.after(n)):i.prepend(n)),!0):!1):!1)},t.tooltip=function(t,i){var n,o;e();var a=function(e){var n=e.outerWidth(),o=e.outerHeight(),a=5,r=t.outerWidth(),s=t.outerHeight(),c={};switch(c.left=(r-n)/2,c.top=(s-o)/2,c[i.pos]="auto",i.pos){case"top":c.bottom=s+a;break;case"bottom":c.top=s+a;break;case"left":c.right=r+a;break;case"right":c.left=r+a}e.css(c)},r=function(){var t=jQuery(this).closest(".wpmui-tip-box").find(".wpmui-tip");t.addClass("wpmui-visible"),t.show(),a(t),setTimeout(function(){a(t)},35)},s=function(){var t=jQuery(this).closest(".wpmui-tip-box").find(".wpmui-tip");t.removeClass("wpmui-visible"),t.hide()},c=function(t){n.hasClass("wpmui-visible")?s.call(this,t):r.call(this,t)};return"string"==typeof i&&(i={content:i}),void 0===i.content?!1:(t=jQuery(t),t.length?(i.trigger=void 0==i.trigger?"hover":i.trigger.toString().toLowerCase(),i.pos=void 0==i.pos?"top":i.pos.toString().toLowerCase(),i["class"]=void 0==i["class"]?"":i["class"].toString().toLowerCase(),o=t.parent(),o.hasClass("wpmui-tip-box")||(o=t.wrap('<span class="wpmui-tip-box"></span>').parent().addClass(i["class"]+"-box")),n=o.find("> .wpmui-tip"),n.length||(n=jQuery('<div class="wpmui-tip"></div>'),n.addClass(i["class"]).addClass(i.pos).appendTo(t.parent()).hide(),isNaN(i.width)||n.width(i.width),"hover"==i.trigger?t.hover(r,s):"click"==i.trigger&&t.click(c)),n.html(i.content),!0):!1)},t.upgrade_tooltips=function(){var e=jQuery("[data-tooltip]");e.each(function(){var e=jQuery(this),i={content:e.attr("data-tooltip"),pos:e.attr("data-pos"),trigger:e.attr("data-trigger"),"class":e.attr("data-class"),width:e.attr("data-width")};t.tooltip(e,i)})},t.obj=function(t){var e={};if(t instanceof Object)e=t;else if(t instanceof Array)if("function"==typeof t.reduce)e=t.reduce(function(t,e,i){return t[i]=e,t},{});else for(var i=t.length-1;i>0;i-=1)void 0!==t[i]&&(e[i]=t[i]);else"string"==typeof t?e.scalar=t:"number"==typeof t?e.scalar=t:"boolean"==typeof t&&(e.scalar=t);return e},jQuery(function(){e()});var l=function(){function t(){C=jQuery('<div class="wpmui-wnd"></div>'),x=jQuery('<div class="wpmui-wnd-title"><span class="the-title"></span></div>'),_=jQuery('<a href="#" class="wpmui-wnd-close"><i class="dashicons dashicons-no-alt"></i></a>'),T=jQuery('<div class="wpmui-wnd-content"></div>'),x.appendTo(C),T.appendTo(C),_.appendTo(x),C.appendTo(c).hide(),e(),f=!1,a()}function e(){C&&(C.on("click",".wpmui-wnd-close",p.close),C.on("click","thead .check-column :checkbox",l),C.on("click","tfoot .check-column :checkbox",l),C.on("click","tbody .check-column :checkbox",d),jQuery(window).on("resize",s))}function o(){C&&(C.off("click",".wpmui-wnd-close",p.close),C.off("click",".check-column :checkbox",l),jQuery(window).off("resize",s))}function a(t,e){if(!C)return!1;t=t||m,e=e||v;var o={width:t,height:e,"margin-left":-1*(t/2),"margin-top":-1*(e/2)};if(x.find(".the-title").text(y),g){C.find(".buttons").remove(),C.addClass("no-buttons"),w instanceof jQuery?T.html(w.html()):T.html(jQuery(w).html());var a=T.find(".buttons");a.length&&(a.appendTo(C),C.removeClass("no-buttons")),g=!1}C.is(":visible")?C.animate(o,200):C.css(o),u instanceof jQuery&&u.off("click",r),f?(C.show(),h&&i(),u.on("click",r),j&&(j=!1,s())):(C.hide(),n())}function r(){return C?!u instanceof jQuery?!1:(u.off("click",r),p.close(),void 0):!1}function s(){if(!C)return!1;var t=jQuery(this),e=t.innerWidth(),i=t.innerHeight(),n=m,o=v;m>e&&(n=e),v>i&&(o=i),a(n,o)}function l(t){{var e=jQuery(this),i=e.prop("checked");t.shiftKey}e.closest("table").children("tbody, thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",i)}function d(){var t=jQuery(this),e=t.closest("tbody").find(":checkbox").filter(":visible").not(":checked");return t.closest("table").children("thead, tfoot").find(":checkbox").prop("checked",0===e.length),!0}var p=this,f=!1,h=!1,m=740,v=400,y="Window",w="",g=!1,j=!1,b=null,Q=null,k=null,C=null,x=null,_=null,T=null;this.modal=function(t){return h=t?!0:!1,a(),p},this.size=function(t,e){var i=Math.abs(parseFloat(t)),n=Math.abs(parseFloat(e));return isNaN(i)||(m=i),isNaN(n)||(v=n),j=!0,a(),p},this.title=function S(S){return y=S,a(),p},this.content=function(t){return w=t,j=!0,g=!0,a(),p},this.onshow=function(t){return b=t,p},this.onhide=function(t){return Q=t,p},this.onclose=function(t){return k=t,p},this.loading=function(t){return t?C.addClass("wpmui-loading"):C.removeClass("wpmui-loading"),p},this.show=function(){return f=!0,j=!0,a(),"function"==typeof b&&b.apply(p,[p.$()]),p},this.hide=function(){return f=!1,a(),"function"==typeof Q&&Q.apply(p,[p.$()]),p},this.close=function(){p.hide(),"function"==typeof k&&k.apply(p,[p.$()]),o(),C.remove(),C=null},this.$=function(){return C},p=this,t()},d=function(t,e){function i(){t||"string"!=typeof window.ajaxurl||(t=window.ajaxurl),p=c.find("#wpmui_void"),p.length||(p=jQuery("<iframe></iframe>").attr("name","wpmui_void").attr("id","wpmui_void").css({width:1,height:1,display:"none",visibility:"hidden",position:"absolute",left:-1e3,top:-1e3}).hide().appendTo(c)),n(),d.reset()}function n(){var t=document.createElement("INPUT"),e=new XMLHttpRequest;t.type="file",y="files"in t,v=!!(e&&"upload"in e&&"onprogress"in e.upload),w=!!window.FormData}function o(){var t=new window.XMLHttpRequest;return v&&(t.upload.addEventListener("progress",function(t){if(t.lengthComputable){var e=t.loaded/t.total;a(e)}else a(-1)},!1),t.addEventListener("progress",function(t){if(t.lengthComputable){var e=t.loaded/t.total;a(e)}else a(-1)},!1)),t}function a(t){v&&"function"==typeof h&&h(t)}function r(t,e,i){a(100),"function"==typeof m&&m(t,e,i)}function s(t,e){var i={};if(e=e&&w,f instanceof jQuery)if(f.find(".wp-editor-area").each(function(){var t=jQuery(this).attr("id"),e="#wp-"+t+"-wrap",i=jQuery(e),n=tinyMCE.get(t);n&&i.hasClass("tmce-active")&&n.save()}),e)i=new FormData(f[0]);else{i={};var n={},o={validate:/^[a-zA-Z][a-zA-Z0-9_-]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,push:/^$/,fixed:/^\d+$/,named:/^[a-zA-Z0-9_-]+$/},a=function(t,e,i){return t[e]=i,t},r=function(t){return void 0===n[t]&&(n[t]=0),n[t]++};jQuery.each(f.serializeArray(),function(){if(o.validate.test(this.name)){for(var t,e=this.name.match(o.key),n=this.value,s=this.name;void 0!==(t=e.pop());)s=s.replace(new RegExp("\\["+t+"\\]$"),""),t.match(o.push)?n=a([],r(s),n):t.match(o.fixed)?n=a([],t,n):t.match(o.named)&&(n=a({},t,n));i=jQuery.extend(!0,i,n)}}),f.find("input[type=file]").each(function(){var t=jQuery(this),e=t.attr("name"),n=t.clone(!0)[0];i[":files"]=i[":files"]||{},i[":files"][e]=n})}else if("string"==typeof f){temp=f.split("&").map(function(t){return t.split("=",2)}),i=e?new FormData:{};for(var s in temp){var c=decodeURI(temp[s][0]),u=decodeURI(temp[s][1]);e?i.append(c,u):void 0!==i[c]?("object"!=typeof i[c]&&(i[c]=[i[c]]),i[c].push(u)):i[c]=u}}else if("object"==typeof f)if(e){i=new FormData;for(var c in f)f.hasOwnProperty(c)&&i.append(c,f[c])}else i=jQuery.extend({},f);return i instanceof FormData?i.append("action",t):i.action=t,i}function u(e,i){var n=s(e,!0),c={},u=null,l=!1;"json"!=i&&(i="text"),a(-1),c={url:t,type:"POST",dataType:"html",data:n,xhr:o,success:function(t){if(l=!0,u=t,"json"==i)try{u=jQuery.parseJSON(t)}catch(e){u={status:"ERR",data:t}}},error:function(t,e,i){l=!1,u=i},complete:function(t){u instanceof Object&&"ERR"==u.status&&(l=!1),r(u,l,t)}},n instanceof FormData&&(c.processData=!1,c.contentType=!1),jQuery.ajax(c)}function l(e,i){var n=s(e,!1),o=jQuery("<form></form>"),a="";for(var r in n)if(n.hasOwnProperty(r))if(":files"==r)for(var c in n[r]){var u=n[r][c];o.append(u)}else"action"==r?a=r+"="+n[r].toString():jQuery('<input type="hidden" />').attr("name",r).attr("value",n[r]).appendTo(o);a=-1==t.indexOf("?")?"?"+a:"&"+a,o.attr("action",t+a).attr("method","POST").attr("enctype","multipart/form-data").attr("target",i),o.submit()}var d=this,p=null,f={},h=null,m=null,v=!1,y=!1,w=!1;this.data=function(t){return f=t,d},this.extract_data=function(t){return f=t,s("",!1)},this.onprogress=function(t){return h=t,d},this.ondone=function(t){return m=t,d},this.reset=function(){return f={},h=null,m=null,d},this.load_text=function(t){return t=t||e,u(t,"text"),d},this.load_json=function(t){return t=t||e,u(t,"json"),d},this.load_http=function(t,i){return t=t||"wpmui_void",i=i||e,l(i,t),d},d=this,i()}}(window.wpmUi=window.wpmUi||{});
inc/external/wpmu-lib/js/wpmu-vnav.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(){var t=jQuery(".vnav"),e=jQuery("input[name=_wp_http_referer]");if(t.length){var a,i,n,s,l,r,v,h=0,c=jQuery(window),o=t.html(),u=o.split("<h3>"),f=window.location.hash.replace(/^#/,""),p=f.length?"":" active";for(o='<ul class="lst-vnav">',a=0;a<u.length;a+=1)i=u[a],n=i.split("</h3>"),2==n.length&&n[0].length&&("-"==n[0]?o+='<li class="lst-vnav-sep"></li>':(v=n[0].toLowerCase().replace(/\W\W*/g," ").replace(/^\s|\s$/g,"").replace(/\s/g,"-"),f.length&&f==v&&(p=" active"),s='<h3 data-key="'+v+'">'+n[0]+"</h3>",l='<div class="data">'+n[1]+"</div>",o+='<li class="lst-vnav-item'+p+'">'+s+l+"</li>",p=""));o+="</ul>",t.html(o),r=jQuery(".lst-vnav",t).first(),t.find(".lst-vnav-item > .data > table").each(function(){var t=jQuery(this),e=t.find("> tbody > tr > th, > tr > th"),a=e.filter(":empty");e.length==a.length&&e.remove()});var d=function(){var t=jQuery(this),a=t.parents(".lst-vnav-item").first(),i=jQuery(".lst-vnav-item.active",r),n=t.data("key"),s="";window.location.hash=n,e.each(function(){var t=jQuery(this);s=t.val().split("#").shift(),s+="#"+n,t.val(s)}),i.removeClass("active"),a.addClass("active"),y()},y=function(){var t=jQuery(".lst-vnav-item.active",r),e=jQuery("> .data",t).first(),a=e.outerHeight();h||(h=r.outerHeight()),r.css({"min-height":a+"px"}),e.css({"min-height":h+"px"})},g=function(t){r.hasClass("open")?j(t):m(t)},m=function(){r.addClass("open")},j=function(){r.removeClass("open")};t.on("click","h3",d),t.on("click","h3",g),c.resize(y),c.resize(j),setTimeout(function(){jQuery(".active h3",t).click()},50)}});
inc/external/wpmu-lib/license.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ <one line to give the program's name and a brief idea of what it does.>
294
+ Copyright (C) <year> <name of author>
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ <signature of Ty Coon>, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
inc/rules/class-popup-rule-advurl.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Advanced URL
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Adds advanced URL matching with regex support.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: On approximate URL, Not on approximate URL
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-browser.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Browser type
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions that check browser details.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: Only on mobile devices, Not on mobile devices
10
+ Version: 1.0
11
+
12
+ NOTE: DON'T RENAME THIS FILE!!
13
+ This filename is saved as metadata with each popup that uses these rules.
14
+ Renaming the file will DISABLE the rules, which is very bad!
15
+ */
16
+
17
+ class IncPopupRule_Browser extends IncPopupRule {
18
+
19
+ /**
20
+ * Initialize the rule object.
21
+ *
22
+ * @since 4.6
23
+ */
24
+ protected function init() {
25
+ $this->filename = basename( __FILE__ );
26
+
27
+ // 'mobile' rule.
28
+ $this->add_rule(
29
+ 'mobile',
30
+ __( 'Only on mobile devices', PO_LANG ),
31
+ __( 'Shows the PopUp to visitors that are using a mobile device (Phone or Tablet).', PO_LANG ),
32
+ 'no_mobile',
33
+ 6
34
+ );
35
+
36
+ // 'no_mobile' rule.
37
+ $this->add_rule(
38
+ 'no_mobile',
39
+ __( 'Not on mobile devices', PO_LANG ),
40
+ __( 'Shows the PopUp to visitors that are using a normal computer or laptop (i.e. not a Phone or Tablet).', PO_LANG ),
41
+ 'mobile',
42
+ 6
43
+ );
44
+ }
45
+
46
+
47
+ /*============================*\
48
+ ================================
49
+ == ==
50
+ == MOBILE ==
51
+ == ==
52
+ ================================
53
+ \*============================*/
54
+
55
+
56
+ /**
57
+ * Apply the rule-logic to the specified popup
58
+ *
59
+ * @since 4.6
60
+ * @param mixed $data Rule-data which was saved via the save_() handler.
61
+ * @return bool Decission to display popup or not.
62
+ */
63
+ protected function apply_mobile( $data ) {
64
+ return wp_is_mobile();
65
+ }
66
+
67
+
68
+ /*===============================*\
69
+ ===================================
70
+ == ==
71
+ == NO_MOBILE ==
72
+ == ==
73
+ ===================================
74
+ \*===============================*/
75
+
76
+
77
+ /**
78
+ * Apply the rule-logic to the specified popup
79
+ *
80
+ * @since 4.6
81
+ * @param mixed $data Rule-data which was saved via the save_() handler.
82
+ * @return bool Decission to display popup or not.
83
+ */
84
+ protected function apply_no_mobile( $data ) {
85
+ return ! wp_is_mobile();
86
+ }
87
+
88
+
89
+ };
90
+
91
+ IncPopupRules::register( 'IncPopupRule_Browser' );
inc/rules/class-popup-rule-category.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Post Categories
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Adds post category related rules.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: On post category, Not on post category
10
+ Limit: no global, pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-events.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: JavaScript Events
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: New Behavior Options: Show PopUp when the mouse leaves the browser window or when the user clicks somewhere.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules:
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-geo.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Visitor Location
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions based on the location of the visitor.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: In a specific Country, Not in a specific Country
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-membership.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Membership
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions based on the users Membership details. <a href="http://premium.wpmudev.org/project/membership/" target="_blank">Learn more &raquo;</a>
6
+ Author: JJ (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: By Membership Level, By Membership Subscription
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-popup.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: PopUp Details
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Test for PopUp specific values.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: PopUp shown less than
10
+ Version: 1.0
11
+
12
+ NOTE: DON'T RENAME THIS FILE!!
13
+ This filename is saved as metadata with each popup that uses these rules.
14
+ Renaming the file will DISABLE the rules, which is very bad!
15
+ */
16
+
17
+ class IncPopupRule_Count extends IncPopupRule {
18
+
19
+ /**
20
+ * Initialize the rule object.
21
+ *
22
+ * @since 4.6
23
+ */
24
+ protected function init() {
25
+ $this->filename = basename( __FILE__ );
26
+
27
+ // 'count' rule.
28
+ $this->add_rule(
29
+ 'count',
30
+ __( 'PopUp shown less than', PO_LANG ),
31
+ __( 'Shows the PopUp if the user has only seen it less than a specific number of times.', PO_LANG ),
32
+ '',
33
+ 5
34
+ );
35
+ }
36
+
37
+
38
+ /*===========================*\
39
+ ===============================
40
+ == ==
41
+ == COUNT ==
42
+ == ==
43
+ ===============================
44
+ \*===========================*/
45
+
46
+
47
+ /**
48
+ * Apply the rule-logic to the specified popup
49
+ *
50
+ * @since 4.6
51
+ * @param mixed $data Rule-data which was saved via the save_() handler.
52
+ * @param IncPopupItem $popup The PopUp that is displayed.
53
+ * @return bool Decission to display popup or not.
54
+ */
55
+ protected function apply_count( $data, $popup ) {
56
+ $max_count = absint( $data );
57
+ $count = absint( @$_COOKIE['po_c-' . $popup->id] );
58
+ return $count < $max_count;
59
+ }
60
+
61
+ /**
62
+ * Output the Admin-Form for the active rule.
63
+ *
64
+ * @since 4.6
65
+ * @param mixed $data Rule-data which was saved via the save_() handler.
66
+ */
67
+ protected function form_count( $data ) {
68
+ $count = absint( $data );
69
+ if ( $count < 1 ) { $count = 1; }
70
+ ?>
71
+ <label for="po-max-count">
72
+ <?php _e( 'Display PopUp this often:', PO_LANG ); ?>
73
+ </label>
74
+ <input type="number"
75
+ id="po-max-count"
76
+ class="inp-small"
77
+ name="po_rule_data[count]"
78
+ min="1"
79
+ max="999"
80
+ maxlength="3"
81
+ placeholder="10"
82
+ value="<?php echo esc_attr( absint( $count ) ); ?>" />
83
+ <?php
84
+ }
85
+
86
+ /**
87
+ * Update and return the $settings array to save the form values.
88
+ *
89
+ * @since 4.6
90
+ * @return mixed Data collection of this rule.
91
+ */
92
+ protected function save_count() {
93
+ $count = absint( @$_POST['po_rule_data']['count'] );
94
+ if ( $count < 1 ) { $count = 1; }
95
+ return $count;
96
+ }
97
+
98
+ };
99
+
100
+ IncPopupRules::register( 'IncPopupRule_Count' );
inc/rules/class-popup-rule-posttype.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Post Types
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Adds post type-related rules.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: For specific Post Types, Not for specific Post Types
10
+ Limit: no global, pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-prosite.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Pro Sites
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions based on the blogs Pro Sites details (only available for Global PopUps). <a href="http://premium.wpmudev.org/project/pro-sites/" target="_blank">Learn more &raquo;</a>
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: Site is not a Pro Site
10
+ Limit: global, pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-referrer.php ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Referrer
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Examine how the visitor arrived on the current page.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: From a specific referrer, Not from an internal link, From a search engine
10
+ Version: 1.0
11
+
12
+ NOTE: DON'T RENAME THIS FILE!!
13
+ This filename is saved as metadata with each popup that uses these rules.
14
+ Renaming the file will DISABLE the rules, which is very bad!
15
+ */
16
+
17
+ class IncPopupRule_Referrer extends IncPopupRule {
18
+
19
+ /**
20
+ * Initialize the rule object.
21
+ *
22
+ * @since 4.6
23
+ */
24
+ protected function init() {
25
+ $this->filename = basename( __FILE__ );
26
+
27
+ // 'referrer' rule.
28
+ $this->add_rule(
29
+ 'referrer',
30
+ __( 'From a specific referrer', PO_LANG ),
31
+ __( 'Shows the PopUp if the user arrived via a specific referrer.', PO_LANG ),
32
+ '',
33
+ 15
34
+ );
35
+
36
+ // 'no_internal' rule.
37
+ $this->add_rule(
38
+ 'no_internal',
39
+ __( 'Not from an internal link', PO_LANG ),
40
+ __( 'Shows the PopUp if the user did not arrive on this page via another page on your site.', PO_LANG ),
41
+ '',
42
+ 15
43
+ );
44
+
45
+ // 'searchengine' rule.
46
+ $this->add_rule(
47
+ 'searchengine',
48
+ __( 'From a search engine', PO_LANG ),
49
+ __( 'Shows the PopUp if the user arrived via a search engine.', PO_LANG ),
50
+ '',
51
+ 15
52
+ );
53
+ }
54
+
55
+
56
+ /*==============================*\
57
+ ==================================
58
+ == ==
59
+ == REFERRER ==
60
+ == ==
61
+ ==================================
62
+ \*==============================*/
63
+
64
+
65
+ /**
66
+ * Apply the rule-logic to the specified popup
67
+ *
68
+ * @since 4.6
69
+ * @param mixed $data Rule-data which was saved via the save_() handler.
70
+ * @return bool Decission to display popup or not.
71
+ */
72
+ protected function apply_referrer( $data ) {
73
+ return $this->test_referrer( $data );
74
+ }
75
+
76
+ /**
77
+ * Output the Admin-Form for the active rule.
78
+ *
79
+ * @since 4.6
80
+ * @param mixed $data Rule-data which was saved via the save_() handler.
81
+ */
82
+ protected function form_referrer( $data ) {
83
+ if ( is_string( $data ) ) { $referrer = $data; }
84
+ else if ( is_array( $data ) ) { $referrer = implode( "\n", $data ); }
85
+ else { $referrer = ''; }
86
+ ?>
87
+ <label for="po-rule-data-referrer">
88
+ <?php _e( 'Referrers (one per line):', PO_LANG ); ?>
89
+ </label>
90
+ <textarea name="po_rule_data[referrer]" id="po-rule-data-referrer" class="block"><?php
91
+ echo esc_attr( $referrer );
92
+ ?></textarea>
93
+ <?php
94
+ }
95
+
96
+ /**
97
+ * Update and return the $settings array to save the form values.
98
+ *
99
+ * @since 4.6
100
+ * @return mixed Data collection of this rule.
101
+ */
102
+ protected function save_referrer() {
103
+ return explode( "\n", @$_POST['po_rule_data']['referrer'] );
104
+ }
105
+
106
+
107
+ /*=================================*\
108
+ =====================================
109
+ == ==
110
+ == NO_INTERNAL ==
111
+ == ==
112
+ =====================================
113
+ \*=================================*/
114
+
115
+
116
+ /**
117
+ * Apply the rule-logic to the specified popup
118
+ *
119
+ * @since 4.6
120
+ * @param mixed $data Rule-data which was saved via the save_() handler.
121
+ * @return bool Decission to display popup or not.
122
+ */
123
+ protected function apply_no_internal( $data ) {
124
+ $internal = preg_replace( '#^https?://#', '', get_option( 'home' ) );
125
+
126
+ return ! $this->test_referrer( $internal );
127
+ }
128
+
129
+
130
+ /*==================================*\
131
+ ======================================
132
+ == ==
133
+ == SEARCHENGINE ==
134
+ == ==
135
+ ======================================
136
+ \*==================================*/
137
+
138
+
139
+ /**
140
+ * Apply the rule-logic to the specified popup
141
+ *
142
+ * @since 4.6
143
+ * @param mixed $data Rule-data which was saved via the save_() handler.
144
+ * @return bool Decission to display popup or not.
145
+ */
146
+ protected function apply_searchengine( $data ) {
147
+ return $this->test_searchengine();
148
+ }
149
+
150
+
151
+ /*======================================*\
152
+ ==========================================
153
+ == ==
154
+ == HELPER FUNCTIONS ==
155
+ == ==
156
+ ==========================================
157
+ \*======================================*/
158
+
159
+
160
+ /**
161
+ * Tests if the current referrer is one of the referers of the list.
162
+ * Current referrer has to be specified in the URL param "thereferer".
163
+ *
164
+ * @since 4.6
165
+ * @param array $list List of referers to check.
166
+ * @return bool
167
+ */
168
+ protected function test_referrer( $list ) {
169
+ $response = false;
170
+ if ( is_string( $list ) ) { $list = array( $list ); }
171
+ if ( ! is_array( $list ) ) { return true; }
172
+
173
+ $referrer = $this->get_referrer();
174
+
175
+ if ( empty( $referrer ) ) {
176
+ $response = true;
177
+ } else {
178
+ foreach ( $list as $item ) {
179
+ $item = trim( $item );
180
+ $res = stripos( $referrer, $item );
181
+ if ( false !== $res ) {
182
+ $response = true;
183
+ break;
184
+ }
185
+ }
186
+ }
187
+ return $response;
188
+ }
189
+
190
+ /**
191
+ * Tests if the current referrer is a search engine.
192
+ * Current referrer has to be specified in the URL param "thereferer".
193
+ *
194
+ * @since 4.6
195
+ * @return bool
196
+ */
197
+ protected function test_searchengine() {
198
+ $response = false;
199
+ $referrer = $this->get_referrer();
200
+
201
+ $patterns = array(
202
+ '/search?',
203
+ '.google.',
204
+ 'web.info.com',
205
+ 'search.',
206
+ 'del.icio.us/search',
207
+ 'soso.com',
208
+ '/search/',
209
+ '.yahoo.',
210
+ '.bing.',
211
+ );
212
+
213
+ foreach ( $patterns as $url ) {
214
+ if ( false !== stripos( $referrer, $url ) ) {
215
+ if ( $url == '.google.' ) {
216
+ if ( $this->is_googlesearch( $referrer ) ) {
217
+ $response = true;
218
+ } else {
219
+ $response = false;
220
+ }
221
+ } else {
222
+ $response = true;
223
+ }
224
+ break;
225
+ }
226
+ }
227
+ return $response;
228
+ }
229
+
230
+ /**
231
+ * Checks if the referrer is a google web-source.
232
+ *
233
+ * @since 4.6
234
+ * @param string $referrer
235
+ * @return bool
236
+ */
237
+ protected function is_googlesearch( $referrer = '' ) {
238
+ $response = true;
239
+
240
+ // Get the query strings and check its a web source.
241
+ $qs = parse_url( $referrer, PHP_URL_QUERY );
242
+ $qget = array();
243
+
244
+ foreach ( explode( '&', $qs ) as $keyval ) {
245
+ $kv = explode( '=', $keyval );
246
+ if ( count( $kv ) == 2 ) {
247
+ $qget[ trim( $kv[0] ) ] = trim( $kv[1] );
248
+ }
249
+ }
250
+
251
+ if ( isset( $qget['source'] ) ) {
252
+ $response = $qget['source'] == 'web';
253
+ }
254
+
255
+ return $response;
256
+ }
257
+
258
+ /**
259
+ * Returns the referrer.
260
+ *
261
+ * @since 4.6
262
+ * @return string
263
+ */
264
+ protected function get_referrer() {
265
+ $referrer = '';
266
+ if ( isset( $_REQUEST['thereferrer'] ) ) {
267
+ $referrer = $_REQUEST['thereferrer'];
268
+ } else if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
269
+ $referrer = $_SERVER['HTTP_REFERER'];
270
+ }
271
+
272
+ return $referrer;
273
+ }
274
+
275
+
276
+ };
277
+
278
+ IncPopupRules::register( 'IncPopupRule_Referrer' );
inc/rules/class-popup-rule-role.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Roles
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions based on the user role of the current user.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: Visitor has role, Visitor does not have role
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-url.php ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Basic URL
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Simple and fast URL matching.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: On specific URL, Not on specific URL
10
+ Version: 1.0
11
+
12
+ NOTE: DON'T RENAME THIS FILE!!
13
+ This filename is saved as metadata with each popup that uses these rules.
14
+ Renaming the file will DISABLE the rules, which is very bad!
15
+ */
16
+
17
+ class IncPopupRule_Url extends IncPopupRule {
18
+
19
+ /**
20
+ * Initialize the rule object.
21
+ *
22
+ * @since 4.6
23
+ */
24
+ protected function init() {
25
+ $this->filename = basename( __FILE__ );
26
+
27
+ // 'url' rule.
28
+ $this->add_rule(
29
+ 'url',
30
+ __( 'On specific URL', PO_LANG ),
31
+ __( 'Shows the PopUp if the user is on a certain URL.', PO_LANG ),
32
+ 'no_url',
33
+ 20
34
+ );
35
+
36
+ // 'no_url' rule.
37
+ $this->add_rule(
38
+ 'no_url',
39
+ __( 'Not on specific URL', PO_LANG ),
40
+ __( 'Shows the PopUp if the user is not on a certain URL.', PO_LANG ),
41
+ 'url',
42
+ 20
43
+ );
44
+ }
45
+
46
+
47
+ /*=========================*\
48
+ =============================
49
+ == ==
50
+ == URL ==
51
+ == ==
52
+ =============================
53
+ \*=========================*/
54
+
55
+
56
+ /**
57
+ * Apply the rule-logic to the specified popup
58
+ *
59
+ * @since 4.6
60
+ * @param mixed $data Rule-data which was saved via the save_() handler.
61
+ * @return bool Decission to display popup or not.
62
+ */
63
+ protected function apply_url( $data ) {
64
+ $data = $this->sanitize_values( $data );
65
+ $url = $this->current_url();
66
+
67
+ return $this->check_url( $url, $data );
68
+ }
69
+
70
+ /**
71
+ * Output the Admin-Form for the active rule.
72
+ *
73
+ * @since 4.6
74
+ * @param mixed $data Rule-data which was saved via the save_() handler.
75
+ */
76
+ protected function form_url( $data ) {
77
+ $data = $this->sanitize_values( $data );
78
+ $urls = implode( "\n", $data );
79
+ ?>
80
+ <label for="po-rule-data-url">
81
+ <?php _e( 'URLs (one per line):', PO_LANG ); ?>
82
+ </label>
83
+ <textarea name="po_rule_data[url]" id="po-rule-data-url" class="block"><?php
84
+ echo esc_html( $urls );
85
+ ?></textarea>
86
+ <?php
87
+ }
88
+
89
+ /**
90
+ * Update and return the $settings array to save the form values.
91
+ *
92
+ * @since 4.6
93
+ * @return mixed Data collection of this rule.
94
+ */
95
+ protected function save_url() {
96
+ return $this->sanitize_values( @$_POST['po_rule_data']['url'] );
97
+ }
98
+
99
+
100
+ /*============================*\
101
+ ================================
102
+ == ==
103
+ == NO_URL ==
104
+ == ==
105
+ ================================
106
+ \*============================*/
107
+
108
+
109
+ /**
110
+ * Apply the rule-logic to the specified popup
111
+ *
112
+ * @since 4.6
113
+ * @param mixed $data Rule-data which was saved via the save_() handler.
114
+ * @return bool Decission to display popup or not.
115
+ */
116
+ protected function apply_no_url( $data ) {
117
+ $data = $this->sanitize_values( $data );
118
+ $url = $this->current_url();
119
+
120
+ return ! $this->check_url( $url, $data );
121
+ }
122
+
123
+ /**
124
+ * Output the Admin-Form for the active rule.
125
+ *
126
+ * @since 4.6
127
+ * @param mixed $data Rule-data which was saved via the save_() handler.
128
+ */
129
+ protected function form_no_url( $data ) {
130
+ $data = $this->sanitize_values( $data );
131
+ $urls = implode( "\n", $data );
132
+ ?>
133
+ <label for="po-rule-data-no-url">
134
+ <?php _e( 'URLs (one per line):', PO_LANG ); ?>
135
+ </label>
136
+ <textarea name="po_rule_data[no_url]" id="po-rule-data-no-url" class="block"><?php
137
+ echo esc_html( $urls );
138
+ ?></textarea>
139
+ <?php
140
+ }
141
+
142
+ /**
143
+ * Update and return the $settings array to save the form values.
144
+ *
145
+ * @since 4.6
146
+ * @return mixed Data collection of this rule.
147
+ */
148
+ protected function save_no_url() {
149
+ return $this->sanitize_values( @$_POST['po_rule_data']['no_url'] );
150
+ }
151
+
152
+
153
+ /*======================================*\
154
+ ==========================================
155
+ == ==
156
+ == HELPER FUNCTIONS ==
157
+ == ==
158
+ ==========================================
159
+ \*======================================*/
160
+
161
+
162
+ /**
163
+ * Sanitizes the data parameter so it can be savely used by other functions.
164
+ *
165
+ * @since 4.6
166
+ * @param mixed $data
167
+ * @return array
168
+ */
169
+ protected function sanitize_values( $data ) {
170
+ if ( is_string( $data ) ) {
171
+ $data = explode( "\n", $data );
172
+ } else if ( ! is_array( $data ) ) {
173
+ $data = array();
174
+ }
175
+
176
+ return $data;
177
+ }
178
+
179
+ /**
180
+ * Returns the URL which can be defined by REQUEST[theform] or wp->request.
181
+ *
182
+ * @since 4.6
183
+ * @return string
184
+ */
185
+ protected function current_url() {
186
+ global $wp;
187
+ $current_url = '';
188
+
189
+ if ( empty( $_REQUEST['thefrom'] ) ) {
190
+ $current_url = home_url( $wp->request );
191
+ } else {
192
+ $current_url = $_REQUEST['thefrom'];
193
+ }
194
+
195
+ return $current_url;
196
+ }
197
+
198
+ /**
199
+ * Tests if the $test_url matches any pattern defined in the $list.
200
+ *
201
+ * @since 4.6
202
+ * @param string $test_url The URL to test.
203
+ * @param array $list List of URL-patterns to test against.
204
+ * @return bool
205
+ */
206
+ protected function check_url( $test_url, $list ) {
207
+ $response = false;
208
+ $list = array_map( 'trim', $list );
209
+
210
+ if ( empty( $list ) ) {
211
+ $response = true;
212
+ } else {
213
+ foreach ( $list as $match ) {
214
+ $res = stripos( $test_url, $match );
215
+ if ( false !== $res ) {
216
+ $response = true;
217
+ break;
218
+ }
219
+ }
220
+ }
221
+
222
+ return $response;
223
+ }
224
+
225
+ };
226
+
227
+ IncPopupRules::register( 'IncPopupRule_Url' );
inc/rules/class-popup-rule-user.php ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: User status
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Conditions based on the current user.
6
+ Author: Philipp (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: Visitor is logged in, Visitor is not logged in, Visitor has commented before, Visitor has never commented
10
+ Version: 1.0
11
+
12
+ NOTE: DON'T RENAME THIS FILE!!
13
+ This filename is saved as metadata with each popup that uses these rules.
14
+ Renaming the file will DISABLE the rules, which is very bad!
15
+ */
16
+
17
+ class IncPopupRule_User extends IncPopupRule {
18
+
19
+ /**
20
+ * Initialize the rule object.
21
+ *
22
+ * @since 4.6
23
+ */
24
+ protected function init() {
25
+ $this->filename = basename( __FILE__ );
26
+
27
+ // 'login' rule.
28
+ $this->add_rule(
29
+ 'login',
30
+ __( 'Visitor is logged in', PO_LANG ),
31
+ __( 'Shows the PopUp if the user is logged in to your site.', PO_LANG ),
32
+ 'no_login',
33
+ 1
34
+ );
35
+
36
+ // 'no_login' rule.
37
+ $this->add_rule(
38
+ 'no_login',
39
+ __( 'Visitor is not logged in', PO_LANG ),
40
+ __( 'Shows the PopUp if the user is not logged in to your site.', PO_LANG ),
41
+ 'login',
42
+ 1
43
+ );
44
+
45
+ // 'comment' rule.
46
+ $this->add_rule(
47
+ 'comment',
48
+ __( 'Visitor has commented before', PO_LANG ),
49
+ __(
50
+ 'Shows the PopUp if the user has already left a comment. ' .
51
+ 'You may want to combine this condition with either "Visitor ' .
52
+ 'is logged in" or "Visitor is not logged in".', PO_LANG
53
+ ),
54
+ 'no_comment',
55
+ 20
56
+ );
57
+
58
+ // 'no_comment' rule.
59
+ $this->add_rule(
60
+ 'no_comment',
61
+ __( 'Visitor has never commented', PO_LANG ),
62
+ __(
63
+ 'Shows the PopUp if the user has never left a comment. ' .
64
+ 'You may want to combine this condition with either "Visitor ' .
65
+ 'is logged in" or "Visitor is not logged in".', PO_LANG
66
+ ),
67
+ 'comment',
68
+ 20
69
+ );
70
+ }
71
+
72
+
73
+ /*===========================*\
74
+ ===============================
75
+ == ==
76
+ == LOGIN ==
77
+ == ==
78
+ ===============================
79
+ \*===========================*/
80
+
81
+
82
+ /**
83
+ * Apply the rule-logic to the specified popup
84
+ *
85
+ * @since 4.6
86
+ * @param mixed $data Rule-data which was saved via the save_() handler.
87
+ * @return bool Decission to display popup or not.
88
+ */
89
+ protected function apply_login( $data ) {
90
+ return is_user_logged_in();
91
+ }
92
+
93
+
94
+ /*==============================*\
95
+ ==================================
96
+ == ==
97
+ == NO_LOGIN ==
98
+ == ==
99
+ ==================================
100
+ \*==============================*/
101
+
102
+
103
+ /**
104
+ * Apply the rule-logic to the specified popup
105
+ *
106
+ * @since 4.6
107
+ * @param mixed $data Rule-data which was saved via the save_() handler.
108
+ * @return bool Decission to display popup or not.
109
+ */
110
+ protected function apply_no_login( $data ) {
111
+ return ! is_user_logged_in();
112
+ }
113
+
114
+
115
+ /*================================*\
116
+ ====================================
117
+ == ==
118
+ == NO_COMMENT ==
119
+ == ==
120
+ ====================================
121
+ \*================================*/
122
+
123
+
124
+ /**
125
+ * Apply the rule-logic to the specified popup
126
+ *
127
+ * @since 4.6
128
+ * @param mixed $data Rule-data which was saved via the save_() handler.
129
+ * @return bool Decission to display popup or not.
130
+ */
131
+ protected function apply_no_comment( $data ) {
132
+ return ! $this->did_user_comment();
133
+ }
134
+
135
+
136
+ /*=============================*\
137
+ =================================
138
+ == ==
139
+ == COMMENT ==
140
+ == ==
141
+ =================================
142
+ \*=============================*/
143
+
144
+
145
+ /**
146
+ * Apply the rule-logic to the specified popup
147
+ *
148
+ * @since 4.6
149
+ * @param mixed $data Rule-data which was saved via the save_() handler.
150
+ * @return bool Decission to display popup or not.
151
+ */
152
+ protected function apply_comment( $data ) {
153
+ return $this->did_user_comment();
154
+ }
155
+
156
+
157
+ /*======================================*\
158
+ ==========================================
159
+ == ==
160
+ == HELPER FUNCTIONS ==
161
+ == ==
162
+ ==========================================
163
+ \*======================================*/
164
+
165
+
166
+ /**
167
+ * Checks if the user did already post any comments.
168
+ *
169
+ * @since 4.6
170
+ * @return bool
171
+ */
172
+ protected function did_user_comment() {
173
+ global $wpdb;
174
+ static $Comment = null;
175
+
176
+ if ( null === $Comment ) {
177
+ // Guests (and maybe logged in users) are tracked via a cookie.
178
+ $Comment = isset( $_COOKIE['comment_author_' . COOKIEHASH] ) ? 1 : 0;
179
+
180
+ if ( ! $Comment && is_user_logged_in() ) {
181
+ // For logged-in users we can also check the database.
182
+ $sql = "
183
+ SELECT COUNT(1)
184
+ FROM {$wpdb->comments}
185
+ WHERE user_id = %s
186
+ ";
187
+ $sql = $wpdb->prepare( $sql, get_current_user_id() );
188
+ $count = absint( $wpdb->get_var( $sql ) );
189
+ $Comment = $count > 0;
190
+ }
191
+ }
192
+ return $Comment;
193
+ }
194
+
195
+ };
196
+
197
+ IncPopupRules::register( 'IncPopupRule_User' );
inc/rules/class-popup-rule-width.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: Screen Size
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Adds a condition that can limit PopUps to certain screen sizes.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: Depending on screen size
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
inc/rules/class-popup-rule-xprofile.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Name: XProfile Fields
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: BuddyPress: Examine values in the users extended profile.
6
+ Author: Ve (Incsub)
7
+ Author URI: http://premium.wpmudev.org
8
+ Type: Rule
9
+ Rules: On XProfile match, Not on XProfile match
10
+ Limit: pro
11
+ Version: 1.0
12
+
13
+ NOTE: DON'T RENAME THIS FILE!!
14
+ This filename is saved as metadata with each popup that uses these rules.
15
+ Renaming the file will DISABLE the rules, which is very bad!
16
+ */
js/popup-admin.min.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(function(){function e(){var e=jQuery(".meta-box-sortables"),i=jQuery(".postbox .hndle");e.length&&(e.sortable({disabled:!0}),i.css("cursor","pointer"))}function i(){var e,i=20,o=jQuery("#submitdiv"),a=jQuery("#post-body"),n=jQuery("body"),i=20;if(o.length){e=o.position().top;var t=function(){n.hasClass("sticky-submit")||(n.addClass("sticky-submit"),o.css({marginTop:0}),o.find(".sticky-actions").show(),o.find(".non-sticky").hide())},s=function(){n.hasClass("sticky-submit")&&(n.removeClass("sticky-submit"),o.find(".sticky-actions").hide(),o.find(".non-sticky").show())};jQuery(window).resize(function(){var e=jQuery(window).width()<=850;e?n.hasClass("po-small")||n.addClass("po-small"):n.hasClass("po-small")&&(n.removeClass("po-small"),s())}).scroll(function(){if(a.hasClass("columns-1")||n.hasClass("po-small")){var l=jQuery(window).scrollTop()-e;l>0?t():s()}else{var l=jQuery(window).scrollTop()-e+i;l>0?o.css({marginTop:l}):o.css({marginTop:0})}}),setTimeout(function(){jQuery(window).trigger("scroll")},100)}}function o(){var e=jQuery(".colorpicker");if(e.length&&"function"==typeof e.wpColorPicker){var i=function(e){var i=jQuery(e.target),o=i.closest(".wp-picker-container"),a=o.find(".colorpicker"),n=jQuery(".colorpicker");o.length&&(n=n.not(a)),n.each(function(){var e=jQuery(this),i=e.closest(".wp-picker-container");e.iris("hide"),e.hide(),i.find(".wp-picker-clear").addClass("hidden"),i.find(".wp-picker-open").removeClass("wp-picker-open")})};e.wpColorPicker(),jQuery(document).on("mousedown",i),jQuery(document).on("click",i),jQuery(document).on("mouseup",i)}}function a(){var e=jQuery("#po-custom-colors"),i=jQuery("#po-custom-size"),o=jQuery("[name=po_display]"),a=jQuery("#po-can-hide"),n=jQuery("#po-close-hides");if(e.length){var t=function(){var e=jQuery(this),i=e.data("toggle"),o=jQuery(i),a=e.data("or"),n=e.data("and"),t=!1;if(a){var s=jQuery(a);t=s.filter(":checked").length>0}else if(n){var s=jQuery(n);t=s.length==s.filter(":checked").length}else t=e.prop("checked");t?(o.removeClass("inactive"),o.find("input,select,textarea,a").prop("readonly",!1).removeClass("disabled")):(o.addClass("inactive"),o.find("input,select,textarea,a").prop("readonly",!0).addClass("disabled")),o.addClass("inactive-anim")},s=function(){var e=jQuery(this),i=e.attr("name"),o=jQuery('[name="'+i+'"]');o.each(function(){t.call(this)})},l=function(){jQuery(".slider").each(function(){var e=jQuery(this),i=e.closest(".slider-wrap"),o=e.data("input"),a=i.find(o+"min"),n=i.find(o+"max"),t=i.find(".slider-min-input"),s=i.find(".slider-min-ignore"),l=i.find(".slider-max-input"),r=i.find(".slider-max-ignore"),d=e.data("min"),c=e.data("max");isNaN(d)&&(d=0),isNaN(c)&&(c=9999),a.prop("readonly",!0),n.prop("readonly",!0);var u=function(e,i){a.val(e),n.val(i),e==d?(t.hide(),s.show()):(t.show(),s.hide()),i==c?(l.hide(),r.show()):(l.show(),r.hide())};e.slider({range:!0,min:d,max:c,values:[a.val(),n.val()],slide:function(e,i){u(i.values[0],i.values[1])}}),u(a.val(),n.val())})};e.click(t),i.click(t),a.click(t),n.click(t),o.click(s),t.call(e),t.call(i),t.call(a),t.call(n),o.each(function(){t.call(jQuery(this))}),l()}}function n(){var e=jQuery("#meta-rules .all-rules"),i=jQuery("#meta-rules .active-rules");if(e.length){var o=function(e){var i=jQuery(e.target),o=i.find("input.wpmui-toggle-checkbox");if(!i.closest(".wpmui-toggle").length)return i.hasClass("inactive")?!1:(o.trigger("click"),void 0)},a=function(){var e=jQuery(this),o=e.closest(".rule"),a=e.data("form"),t=i.find(a),s=e.prop("checked");s?(o.removeClass("off").addClass("on"),t.removeClass("off").addClass("on open")):(o.removeClass("on").addClass("off"),t.removeClass("on").addClass("off")),n(e,s)},n=function(o,a){var n,t,s,l=o.data("exclude"),r=l?l.split(","):[];for(n=r.length-1;n>=0;n-=1)t=e.find(".rule-"+r[n]),s=i.find("#po-rule-"+r[n]),t.hasClass("on")||(t.prop("disabled",a),a?(t.addClass("inactive off").removeClass("on"),s.addClass("off").removeClass("on")):t.removeClass("inactive off"))},t=function(){var e=jQuery(this),i=e.closest(".rule");i.toggleClass("open")};e.find("input.wpmui-toggle-checkbox").click(a),e.find(".rule").click(o),i.on("click",".rule-title,.rule-toggle",t),e.find(".rule.on input.wpmui-toggle-checkbox").each(function(){n(jQuery(this),!0)}),jQuery(".init-loading").removeClass("wpmui-loading")}}function t(){var e,i=jQuery(".content-image"),o=i.find(".add_image"),a=i.find(".featured-img"),n=i.find(".reset"),t=i.find(".po-image"),s=i.find(".img-preview"),l=i.find(".lbl-empty"),r=i.find(".img-pos"),d=function(e){t.val(e),s.attr("src",e).show(),l.hide(),r.show(),a.addClass("has-image")},c=function(){t.val(""),s.attr("src","").hide(),l.show(),r.hide(),a.removeClass("has-image")},u=function(i){return i.preventDefault(),e?(e.open(),void 0):(e=wp.media.frames.file_frame=wp.media({title:o.attr("data-title"),button:{text:o.attr("data-button")},multiple:!1}),e.on("select",function(){attachment=e.state().get("selection").first().toJSON(),d(attachment.url)}),e.open(),void 0)},p=function(){var e=jQuery(this);r.find(".option").removeClass("selected"),e.addClass("selected")};o.on("click",u),n.on("click",c),r.on("click",".option",p)}function s(){var e,i=jQuery('select[name="action"] '),o=jQuery('select[name="action2"] ');if(i.length&&"object"==typeof window.po_bulk)for(e in po_bulk)jQuery("<option>").val(e).text(po_bulk[e]).appendTo(i).clone().appendTo(o)}function l(){var e=jQuery("table.posts");if(tbody=e.find("#the-list"),tbody.length){var i=function(i,o){if(e.removeClass("wpmui-loading"),o)for(var a in i)i.hasOwnProperty(a)&&tbody.find("#post-"+a+" .the-pos").text(i[a])},o=function(){var o,a=tbody.find("tr"),n=[];for(o=0;o<a.length;o+=1)n.push(jQuery(a[o]).attr("id"));e.addClass("wpmui-loading"),wpmUi.ajax(null,"po-ajax").data({"do":"order",order:n}).ondone(i).load_json()};tbody.sortable({placeholder:"ui-sortable-placeholder",axis:"y",handle:".column-po_order",helper:"clone",opacity:.75,update:o}),tbody.disableSelection()}}function r(){var e=jQuery(document);body=jQuery("#wpcontent");var i=function(e){var i=jQuery(this),o=i.data("id");return e.preventDefault(),void 0===window.inc_popup?!1:(body.addClass("wpmui-loading"),inc_popup.load(o),!1)},o=function(e){var i=(jQuery(this),jQuery("#post")),o=wpmUi.ajax();return e.preventDefault(),void 0===window.inc_popup?!1:(data=o.extract_data(i),body.addClass("wpmui-loading"),inc_popup.load(0,data),!1)},a=function(e,i){body.removeClass("wpmui-loading"),i.init()};e.on("click",".posts .po-preview",i),e.on("click","#post .preview",o),e.on("popup-initialized",a)}jQuery("body.post-type-inc_popup").length&&(jQuery("body.post-php").length||jQuery("body.post-new-php").length?(e(),i(),o(),a(),n(),r(),t(),wpmUi.upgrade_multiselect()):jQuery("body.edit-php").length&&(l(),s(),r()))});
js/public.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(){function e(e){"closed"===p?e._show()?(d=e,p="open"):t(e):n[n.length]=e}function t(){p="closed",d=null,n.length>0&&(item=n.shift(),e(item))}function o(e,t,o){var a,p,n=0,d=window.location,r=document.referrer,u=null,s=function(t){u=jQuery.extend({},e),u.popup=t,i(u)};return"undefined"!=typeof force_popover&&(n=force_popover.toString()),"undefined"!=typeof t&&(n=t.toString()),e.ajax_data=e.ajax_data||{},p=jQuery.extend({},e.ajax_data),p.action="inc_popup",p["do"]=e["do"],p.thefrom=d.toString(),p.thereferrer=r.toString(),n&&(p.po_id=n),o&&(p.data=o),e.preview&&(p.preview=!0),a={url:e.ajaxurl,dataType:"jsonp",jsonpCallback:"po_data",data:p,success:function(e){s(e)},complete:function(){jQuery(document).trigger("popup-load-done",[u])}},jQuery.ajax(a)}function i(e){if(void 0!==e){var t=function(e){void 0!==e&&(void 0!==e.popup&&void 0!==e.popup.html&&(jQuery('<style type="text/css">'+e.popup.styles+"</style>").appendTo("head"),jQuery(e.popup.html).appendTo("body").hide()),window.inc_popup=new a(e),window.inc_popups[window.inc_popups.length]=window.inc_popup,jQuery(document).trigger("popup-initialized",[window.inc_popup]),e.noinit||e.preview||inc_popup.init())};if(e.popup instanceof Array)for(var o=0;o<e.popup.length;o+=1){var i=jQuery.extend({},e);i.popup=e.popup[o],t(i)}else e instanceof Object&&t(e)}}var a=function(i){var a=this,p=jQuery(document),n=jQuery(window),d=null,r=null,u=null,s=null,c=null,l=null,h=null,f=null;return this.data={},this.have_popup=!1,this.ajax_data={},this.opened=0,this.close_forever=function(){var e=a.data.expiry||365;return a.close_popup(),i.preview?!1:(a.set_cookie("po_h",1,e),!1)},this.close_popup=function(){return jQuery("html").removeClass("has-popup"),a.data.display_data.click_multi?(f.hide(),d.hide()):(f.remove(),d.remove(),a.have_popup=!1),p.trigger("popup-closed"),p.trigger("popover-closed"),t(a),!1},this.background_clicked=function(e){var t=jQuery(e.target);if(t.hasClass("wdpu-background")){if(!a.data.overlay_close)return;a.close_popup()}},this.move_popup=function(){var e,t,o,i=0,p=0;a.data.custom_size&&(a.data.height&&!isNaN(a.data.height)&&(l.data("reduce-height")&&(o=jQuery(l.data("reduce-height")),p=o.outerHeight()),t=a.data.height-p,100>t&&(t=100),l.height(t)),a.data.width&&!isNaN(a.data.width)&&(l.data("reduce-width")&&(o=jQuery(l.data("reduce-width")),i=o.outerWidth()),e=a.data.width-i,100>e&&(e=100),l.width(e)));var d=function(){if(!c.hasClass("no-move-x")){var e=n.width(),t=r.outerWidth(),o=(e-t)/2;10>o&&(o=10),c.css({left:o})}if(!c.hasClass("no-move-y")){var i=n.height(),a=r.outerHeight(),p=(i-a)/2;10>p&&(p=10),c.css({top:p})}if(h.length){var d,u,s=h.width(),l=h.height(),f=h.parent().width(),_=h.parent().height();s>f?(d=(f-s)/2,h.css({"margin-left":d})):h.css({"margin-left":0}),l>_?(u=(_-l)/2,h.css({"margin-top":u})):h.css({"margin-top":0})}};window.setTimeout(d,20),d()},this.reject=function(){a.have_popup=!1,a.data={}},this.prepare=function(){if(a.fetch_dom(),d.css({opacity:0,"z-index":-1,position:"absolute",left:-1e3,width:100,right:"auto",top:-1e3,height:100,bottom:"auto"}).show(),p.trigger("popup-init",[a,a.data]),a.have_popup)switch(a.data.display){case"scroll":n.on("scroll",a.show_at_position);break;case"anchor":n.on("scroll",a.show_at_element);break;case"delay":var t=1e3*a.data.display_data.delay;"m"==a.data.display_data.delay_type&&(t*=60),window.setTimeout(function(){e(a)},t);break;default:setTimeout(function(){"function"==typeof a.custom_handler&&a.custom_handler(a)},20)}},this.show_at_position=function(){var t,o,i=jQuery(this),d=i.scrollTop();switch(a.data.display_data.scroll_type){case"px":d>=a.data.display_data.scroll&&(n.off("scroll",a.show_at_position),e(a));break;case"%":default:t=p.height()-n.height(),o=100*d/t,o>=a.data.display_data.scroll&&(n.off("scroll",a.show_at_position),e(a))}},this.show_at_element=function(){var t=jQuery(a.data.display_data.anchor),o=n.scrollTop(),i=o+n.height(),p=t.offset().top,d=i-p;d>10&&(n.off("scroll",a.show_at_element),e(a))},this.show_popup=function(){e(a)},this._show=function(){return d.length?(count=parseInt(a.get_cookie("po_c")),isNaN(count)&&(count=0),a.set_cookie("po_c",count+1),a.opened+=1,f.on("click",a.background_clicked),n.off("resize.popup").on("resize.popup",function(){a.move_popup(a.data)}),d.show().removeAttr("style"),f.show(),jQuery("html").addClass("has-popup"),a.move_popup(a.data),s.off("click",a.close_forever).on("click",a.close_forever),a.data&&a.data.close_hide?u.off("click",a.close_forever).on("click",a.close_forever):u.off("click",a.close_popup).on("click",a.close_popup),r.hover(function(){jQuery(".claimbutton").removeClass("hide")},function(){jQuery(".claimbutton").addClass("hide")}),p.trigger("popup-displayed",[a.data,a]),p.trigger("popover-displayed",[a.data,a]),!0):!1},this.fetch_dom=function(){d=jQuery("#"+a.data.html_id),d.length||a.reject(),l=d.find(".resize"),c=d.find(".move"),r=d.find(".wdpu-msg"),u=d.find(".wdpu-close"),s=d.find(".wdpu-hide-forever"),h=d.find(".wdpu-image > img"),d.hasClass("wdpu-background")?f=d:(f=d.find(".wdpu-background"),f.length||(f=d.parents(".wdpu-background"))),c.length||(c=d),l.length||(l=d)},this.load_popup=function(e,t){(void 0!==e||1!=i.preview)&&(a.have_popup=!1,o(i,e,t))},this.init=function(){i.popup?(a.have_popup=!0,a.data=i.popup,a.exec_scripts(),a.prepare()):a.load_popup()},this.exec_scripts=function(){if(void 0!==a.data.script){var e=new Function("me",a.data.script);e(a)}},this.get_cookie=function(e){var t,o,i,p=document.cookie.split(";");for(i=a.data&&a.data.popup_id?e+"-"+a.data.popup_id+"=":e+"=",t=0;t<p.length;t+=1){for(o=p[t];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(i))return o.substring(i.length,o.length)}return null},this.set_cookie=function(e,t,o){var p,n,d;i.preview||(isNaN(o)?n="":(p=new Date,p.setTime(p.getTime()+24*o*60*60*1e3),n="; expires="+p.toGMTString()),d=a.data&&a.data.popup_id?e+"-"+a.data.popup_id:e,document.cookie=d+"="+t+n+"; path=/")},{init:a.init,load:a.load_popup,extend:a}},p="closed",n=[],d=null;jQuery(function(){window.inc_popups=[],i(_popup_data)})}();
{popoverincludes/languages → lang}/popover-en_US.mo RENAMED
File without changes
lang/popover.po ADDED
@@ -0,0 +1,1941 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: PopOver\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-11-05 14:21+0100\n"
6
+ "PO-Revision-Date: 2013-11-05 14:21+0100\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: Incsub <barry@incsub.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: __;gettext;gettext_noop;_e\n"
13
+ "X-Poedit-Basepath: /Volumes/Trunk/xampp/htdocs/3.5-dev-1/wp-content/plugins/"
14
+ "popover\n"
15
+ "X-Generator: Poedit 1.5.5\n"
16
+ "X-Poedit-SearchPath-0: popoverincludes\n"
17
+ "X-Poedit-SearchPath-1: popoverincludes/addons\n"
18
+ "X-Poedit-SearchPath-2: popoverincludes/classes\n"
19
+ "X-Poedit-SearchPath-3: popoverincludes/css\n"
20
+ "X-Poedit-SearchPath-4: popoverincludes/external\n"
21
+ "X-Poedit-SearchPath-5: popoverincludes/help\n"
22
+ "X-Poedit-SearchPath-6: popoverincludes/includes\n"
23
+ "X-Poedit-SearchPath-7: popoverincludes/js\n"
24
+ "X-Poedit-SearchPath-8: popoverincludes/css/default\n"
25
+ "X-Poedit-SearchPath-9: popoverincludes/css/fixed\n"
26
+ "X-Poedit-SearchPath-10: popoverincludes/css/fullbackground\n"
27
+ "X-Poedit-SearchPath-11: popoverincludes/css/fullbackgroundfixed\n"
28
+
29
+ #: popoverincludes/addons/anonymous_loading.php:112
30
+ msgid "Anonymous"
31
+ msgstr ""
32
+
33
+ #: popoverincludes/addons/rules-advanced_url.php:44
34
+ msgid "One URL regex per line"
35
+ msgstr ""
36
+
37
+ #: popoverincludes/addons/rules-advanced_url.php:78
38
+ msgid "Suppress on approximate URL"
39
+ msgstr ""
40
+
41
+ #: popoverincludes/addons/rules-advanced_url.php:79
42
+ msgid "Suppresses the popover on matched URLs."
43
+ msgstr ""
44
+
45
+ #: popoverincludes/addons/rules-advanced_url.php:81
46
+ #: popoverincludes/addons/rules-post_types.php:102
47
+ #: popoverincludes/addons/rules-xprofile_value.php:121
48
+ msgid "Suppress"
49
+ msgstr ""
50
+
51
+ #: popoverincludes/addons/rules-advanced_url.php:102
52
+ msgid "Show on approximate URL"
53
+ msgstr ""
54
+
55
+ #: popoverincludes/addons/rules-advanced_url.php:103
56
+ msgid "Shows the popover on matched URLs."
57
+ msgstr ""
58
+
59
+ #: popoverincludes/addons/rules-advanced_url.php:105
60
+ #: popoverincludes/addons/rules-max_width.php:30
61
+ #: popoverincludes/addons/rules-on_exit.php:30
62
+ #: popoverincludes/addons/rules-onclick.php:30
63
+ #: popoverincludes/addons/rules-post_types.php:126
64
+ #: popoverincludes/addons/rules-xprofile_value.php:145
65
+ msgid "Show"
66
+ msgstr ""
67
+
68
+ #: popoverincludes/addons/rules-max_width.php:27
69
+ msgid "Show on windows wider than"
70
+ msgstr ""
71
+
72
+ #: popoverincludes/addons/rules-max_width.php:28
73
+ msgid "Shows the popover on windows wider than threshold value."
74
+ msgstr ""
75
+
76
+ #: popoverincludes/addons/rules-max_width.php:52
77
+ msgid "Threshold width:"
78
+ msgstr ""
79
+
80
+ #: popoverincludes/addons/rules-max_width.php:89
81
+ msgid "&quot;Maximum width rule&quot; add-on won't work with legacy javascript"
82
+ msgstr ""
83
+
84
+ #: popoverincludes/addons/rules-on_exit.php:27
85
+ msgid "Show on user exit attempt"
86
+ msgstr ""
87
+
88
+ #: popoverincludes/addons/rules-on_exit.php:28
89
+ msgid "Shows the popover on user exit attempt."
90
+ msgstr ""
91
+
92
+ #: popoverincludes/addons/rules-on_exit.php:54
93
+ msgid "The popover won't be shown until the user tries to leave the page"
94
+ msgstr ""
95
+
96
+ #: popoverincludes/addons/rules-on_exit.php:94
97
+ msgid "&quot;Show on exit rule&quot; add-on won't work with legacy javascript"
98
+ msgstr ""
99
+
100
+ #: popoverincludes/addons/rules-onclick.php:27
101
+ msgid "Show on user click"
102
+ msgstr ""
103
+
104
+ #: popoverincludes/addons/rules-onclick.php:28
105
+ msgid "Shows the popover on user click."
106
+ msgstr ""
107
+
108
+ #: popoverincludes/addons/rules-onclick.php:53
109
+ msgid "Element selector:"
110
+ msgstr ""
111
+
112
+ #: popoverincludes/addons/rules-onclick.php:55
113
+ msgid ""
114
+ "The popover won't be shown until the user clicks on an element matching this "
115
+ "selector"
116
+ msgstr ""
117
+
118
+ #: popoverincludes/addons/rules-onclick.php:91
119
+ msgid "&quot;Show on click rule&quot; add-on won't work with legacy javascript"
120
+ msgstr ""
121
+
122
+ #: popoverincludes/addons/rules-post_types.php:55
123
+ msgid "Singular"
124
+ msgstr ""
125
+
126
+ #: popoverincludes/addons/rules-post_types.php:56
127
+ msgid "Archive"
128
+ msgstr ""
129
+
130
+ #: popoverincludes/addons/rules-post_types.php:59
131
+ #, php-format
132
+ msgid "%s on these post types:"
133
+ msgstr ""
134
+
135
+ #: popoverincludes/addons/rules-post_types.php:71
136
+ #, php-format
137
+ msgid "%s on these post type URLs:"
138
+ msgstr ""
139
+
140
+ #: popoverincludes/addons/rules-post_types.php:99
141
+ msgid "Suppress on Post Types"
142
+ msgstr ""
143
+
144
+ #: popoverincludes/addons/rules-post_types.php:100
145
+ msgid "Suppresses the popover on specific post types."
146
+ msgstr ""
147
+
148
+ #: popoverincludes/addons/rules-post_types.php:123
149
+ msgid "Show on Post Types"
150
+ msgstr ""
151
+
152
+ #: popoverincludes/addons/rules-post_types.php:124
153
+ msgid "Shows the popover on specific post types."
154
+ msgstr ""
155
+
156
+ #: popoverincludes/addons/rules-xprofile_value.php:47
157
+ msgid "You need BuddyPress XProfile fields component active."
158
+ msgstr ""
159
+
160
+ #: popoverincludes/addons/rules-xprofile_value.php:74
161
+ msgid "Field:"
162
+ msgstr ""
163
+
164
+ #: popoverincludes/addons/rules-xprofile_value.php:79
165
+ msgid "equals"
166
+ msgstr ""
167
+
168
+ #: popoverincludes/addons/rules-xprofile_value.php:80
169
+ msgid "is not"
170
+ msgstr ""
171
+
172
+ #: popoverincludes/addons/rules-xprofile_value.php:81
173
+ msgid "matches regex"
174
+ msgstr ""
175
+
176
+ #: popoverincludes/addons/rules-xprofile_value.php:82
177
+ msgid "does not match regex"
178
+ msgstr ""
179
+
180
+ #: popoverincludes/addons/rules-xprofile_value.php:118
181
+ msgid "Suppress when XProfile field matches condition"
182
+ msgstr ""
183
+
184
+ #: popoverincludes/addons/rules-xprofile_value.php:119
185
+ msgid "Suppresses the popover when XProfile field matches condition."
186
+ msgstr ""
187
+
188
+ #: popoverincludes/addons/rules-xprofile_value.php:142
189
+ msgid "Show when XProfile field matches condition"
190
+ msgstr ""
191
+
192
+ #: popoverincludes/addons/rules-xprofile_value.php:143
193
+ msgid "Shows the popover when XProfile field matches condition."
194
+ msgstr ""
195
+
196
+ #: popoverincludes/classes/popover.help.php:55
197
+ msgid "Overview"
198
+ msgstr ""
199
+
200
+ #: popoverincludes/classes/popover.help.php:61
201
+ msgid "Adding / Editing"
202
+ msgstr ""
203
+
204
+ #: popoverincludes/classes/popover.help.php:75
205
+ #: popoverincludes/classes/popoveradmin.php:120
206
+ msgid "Add-ons"
207
+ msgstr ""
208
+
209
+ #: popoverincludes/classes/popoveradmin.php:111
210
+ #: popoverincludes/classes/popoveradmin.php:115
211
+ msgid "Pop Overs"
212
+ msgstr ""
213
+
214
+ #: popoverincludes/classes/popoveradmin.php:119
215
+ msgid "Create New Pop Over"
216
+ msgstr ""
217
+
218
+ #: popoverincludes/classes/popoveradmin.php:119
219
+ msgid "Create New"
220
+ msgstr ""
221
+
222
+ #: popoverincludes/classes/popoveradmin.php:120
223
+ msgid "Manage Add-ons Plugins"
224
+ msgstr ""
225
+
226
+ #: popoverincludes/classes/popoveradmin.php:122
227
+ msgid "Settings"
228
+ msgstr ""
229
+
230
+ #: popoverincludes/classes/popoveradmin.php:270
231
+ msgid "An error occured updating the Pop Over order."
232
+ msgstr ""
233
+
234
+ #: popoverincludes/classes/popoveradmin.php:271
235
+ msgid "Are you sure you want to delete this Pop Over?"
236
+ msgstr ""
237
+
238
+ #: popoverincludes/classes/popoveradmin.php:321
239
+ #, php-format
240
+ msgid ""
241
+ "Welcome to Popover, would you like to transfer your existing Popover to the "
242
+ "new format? <a href='%s'>Yes please transfer it</a> / <a href='%s'>No "
243
+ "thanks, I'll create a new one myself.</a>"
244
+ msgstr ""
245
+
246
+ #: popoverincludes/classes/popoveradmin.php:340
247
+ msgid "Transferred Popover"
248
+ msgstr ""
249
+
250
+ #: popoverincludes/classes/popoveradmin.php:721
251
+ msgid "Pop Over updated."
252
+ msgstr ""
253
+
254
+ #: popoverincludes/classes/popoveradmin.php:722
255
+ msgid "Pop Over not updated."
256
+ msgstr ""
257
+
258
+ #: popoverincludes/classes/popoveradmin.php:724
259
+ msgid "Pop Over activated."
260
+ msgstr ""
261
+
262
+ #: popoverincludes/classes/popoveradmin.php:725
263
+ msgid "Pop Over not activated."
264
+ msgstr ""
265
+
266
+ #: popoverincludes/classes/popoveradmin.php:727
267
+ msgid "Pop Over deactivated."
268
+ msgstr ""
269
+
270
+ #: popoverincludes/classes/popoveradmin.php:728
271
+ msgid "Pop Over not deactivated."
272
+ msgstr ""
273
+
274
+ #: popoverincludes/classes/popoveradmin.php:730
275
+ msgid "Pop Over activation toggled."
276
+ msgstr ""
277
+
278
+ #: popoverincludes/classes/popoveradmin.php:732
279
+ msgid "Pop Over deleted."
280
+ msgstr ""
281
+
282
+ #: popoverincludes/classes/popoveradmin.php:733
283
+ msgid "Pop Over not deleted."
284
+ msgstr ""
285
+
286
+ #: popoverincludes/classes/popoveradmin.php:735
287
+ msgid "Pop Over added."
288
+ msgstr ""
289
+
290
+ #: popoverincludes/classes/popoveradmin.php:736
291
+ msgid "Pop Over not added."
292
+ msgstr ""
293
+
294
+ #: popoverincludes/classes/popoveradmin.php:740
295
+ msgid "Edit Pop Overs"
296
+ msgstr ""
297
+
298
+ #: popoverincludes/classes/popoveradmin.php:740
299
+ msgid "Add New"
300
+ msgstr ""
301
+
302
+ #: popoverincludes/classes/popoveradmin.php:758
303
+ #: popoverincludes/classes/popoveradmin.php:934
304
+ #: popoverincludes/classes/popoveradmin.php:1954
305
+ #: popoverincludes/classes/popoveradmin.php:2082
306
+ msgid "Bulk Actions"
307
+ msgstr ""
308
+
309
+ #: popoverincludes/classes/popoveradmin.php:759
310
+ #: popoverincludes/classes/popoveradmin.php:935
311
+ #: popoverincludes/classes/popoveradmin.php:1955
312
+ #: popoverincludes/classes/popoveradmin.php:2083
313
+ msgid "Toggle activation"
314
+ msgstr ""
315
+
316
+ #: popoverincludes/classes/popoveradmin.php:761
317
+ #: popoverincludes/classes/popoveradmin.php:937
318
+ #: popoverincludes/classes/popoveradmin.php:1957
319
+ #: popoverincludes/classes/popoveradmin.php:2085
320
+ msgid "Apply"
321
+ msgstr ""
322
+
323
+ #: popoverincludes/classes/popoveradmin.php:775
324
+ msgid "Pop Over Name"
325
+ msgstr ""
326
+
327
+ #: popoverincludes/classes/popoveradmin.php:776
328
+ #: popoverincludes/classes/popoveradmin.php:1360
329
+ msgid "Conditions"
330
+ msgstr ""
331
+
332
+ #: popoverincludes/classes/popoveradmin.php:777
333
+ #: popoverincludes/classes/popoveradmin.php:907
334
+ #: popoverincludes/classes/popoveradmin.php:1973
335
+ #: popoverincludes/classes/popoveradmin.php:2055
336
+ msgid "Active"
337
+ msgstr ""
338
+
339
+ #: popoverincludes/classes/popoveradmin.php:838
340
+ msgid "Edit"
341
+ msgstr ""
342
+
343
+ #: popoverincludes/classes/popoveradmin.php:841
344
+ #: popoverincludes/classes/popoveradmin.php:2041
345
+ msgid "Deactivate"
346
+ msgstr ""
347
+
348
+ #: popoverincludes/classes/popoveradmin.php:843
349
+ #: popoverincludes/classes/popoveradmin.php:2043
350
+ msgid "Activate"
351
+ msgstr ""
352
+
353
+ #: popoverincludes/classes/popoveradmin.php:846
354
+ msgid "Delete"
355
+ msgstr ""
356
+
357
+ #: popoverincludes/classes/popoveradmin.php:861
358
+ msgid "Site is not a Pro-site"
359
+ msgstr ""
360
+
361
+ #: popoverincludes/classes/popoveradmin.php:864
362
+ msgid "Visitor is logged in"
363
+ msgstr ""
364
+
365
+ #: popoverincludes/classes/popoveradmin.php:867
366
+ msgid "Visitor is not logged in"
367
+ msgstr ""
368
+
369
+ #: popoverincludes/classes/popoveradmin.php:870
370
+ msgid "Visitor has never commented"
371
+ msgstr ""
372
+
373
+ #: popoverincludes/classes/popoveradmin.php:873
374
+ msgid "Visit via a search engine"
375
+ msgstr ""
376
+
377
+ #: popoverincludes/classes/popoveradmin.php:876
378
+ msgid "Visit not via an Internal link"
379
+ msgstr ""
380
+
381
+ #: popoverincludes/classes/popoveradmin.php:879
382
+ msgid "Visit via specific referer"
383
+ msgstr ""
384
+
385
+ #: popoverincludes/classes/popoveradmin.php:882
386
+ msgid "Popover shown less than x times"
387
+ msgstr ""
388
+
389
+ #: popoverincludes/classes/popoveradmin.php:885
390
+ msgid "On specific URL"
391
+ msgstr ""
392
+
393
+ #: popoverincludes/classes/popoveradmin.php:888
394
+ msgid "Not on specific URL"
395
+ msgstr ""
396
+
397
+ #: popoverincludes/classes/popoveradmin.php:891
398
+ msgid "In a specific country"
399
+ msgstr ""
400
+
401
+ #: popoverincludes/classes/popoveradmin.php:894
402
+ msgid "Not in a specific country"
403
+ msgstr ""
404
+
405
+ #: popoverincludes/classes/popoveradmin.php:909
406
+ #: popoverincludes/classes/popoveradmin.php:2057
407
+ msgid "Inactive"
408
+ msgstr ""
409
+
410
+ #: popoverincludes/classes/popoveradmin.php:920
411
+ msgid "No Pop Overs were found."
412
+ msgstr ""
413
+
414
+ #: popoverincludes/classes/popoveradmin.php:969
415
+ msgid "New Pop Over"
416
+ msgstr ""
417
+
418
+ #: popoverincludes/classes/popoveradmin.php:1029
419
+ msgid "Edit Pop Over"
420
+ msgstr ""
421
+
422
+ #: popoverincludes/classes/popoveradmin.php:1031
423
+ msgid "Add Pop Over"
424
+ msgstr ""
425
+
426
+ #: popoverincludes/classes/popoveradmin.php:1044
427
+ #: popoverincludes/classes/popoveradmin.php:2109
428
+ msgid "Pop Over Settings"
429
+ msgstr ""
430
+
431
+ #: popoverincludes/classes/popoveradmin.php:1050
432
+ msgid "Popover title"
433
+ msgstr ""
434
+
435
+ #: popoverincludes/classes/popoveradmin.php:1053
436
+ msgid "Popover content"
437
+ msgstr ""
438
+
439
+ #: popoverincludes/classes/popoveradmin.php:1065
440
+ msgid "Active conditions"
441
+ msgstr ""
442
+
443
+ #: popoverincludes/classes/popoveradmin.php:1066
444
+ msgid ""
445
+ "These are the rules that will determine if a popover should show when a "
446
+ "visitor arrives at your website ALL rules must be true for the popover to "
447
+ "show."
448
+ msgstr ""
449
+
450
+ #: popoverincludes/classes/popoveradmin.php:1117
451
+ msgid "Drop here"
452
+ msgstr ""
453
+
454
+ #: popoverincludes/classes/popoveradmin.php:1120
455
+ msgid "Appearance settings"
456
+ msgstr ""
457
+
458
+ #: popoverincludes/classes/popoveradmin.php:1123
459
+ #: popoverincludes/classes/popoveradmin.php:1711
460
+ msgid "Pop Over Size"
461
+ msgstr ""
462
+
463
+ #: popoverincludes/classes/popoveradmin.php:1125
464
+ #: popoverincludes/classes/popoveradmin.php:1713
465
+ msgid "Width:"
466
+ msgstr ""
467
+
468
+ #: popoverincludes/classes/popoveradmin.php:1127
469
+ #: popoverincludes/classes/popoveradmin.php:1715
470
+ msgid "Height:"
471
+ msgstr ""
472
+
473
+ #: popoverincludes/classes/popoveradmin.php:1132
474
+ msgid "... <i>OR</i> use Javascript to set my pop over size"
475
+ msgstr ""
476
+
477
+ #: popoverincludes/classes/popoveradmin.php:1141
478
+ #: popoverincludes/classes/popoveradmin.php:1721
479
+ msgid "Pop Over Position"
480
+ msgstr ""
481
+
482
+ #: popoverincludes/classes/popoveradmin.php:1143
483
+ #: popoverincludes/classes/popoveradmin.php:1161
484
+ #: popoverincludes/classes/popoveradmin.php:1723
485
+ #: popoverincludes/classes/popoveradmin.php:1733
486
+ msgid "Left:"
487
+ msgstr ""
488
+
489
+ #: popoverincludes/classes/popoveradmin.php:1145
490
+ #: popoverincludes/classes/popoveradmin.php:1165
491
+ #: popoverincludes/classes/popoveradmin.php:1725
492
+ #: popoverincludes/classes/popoveradmin.php:1737
493
+ msgid "Top:"
494
+ msgstr ""
495
+
496
+ #: popoverincludes/classes/popoveradmin.php:1150
497
+ msgid "... <i>OR</i> use Javascript to position my pop over"
498
+ msgstr ""
499
+
500
+ #: popoverincludes/classes/popoveradmin.php:1159
501
+ #: popoverincludes/classes/popoveradmin.php:1731
502
+ msgid "Pop Over Margins"
503
+ msgstr ""
504
+
505
+ #: popoverincludes/classes/popoveradmin.php:1163
506
+ #: popoverincludes/classes/popoveradmin.php:1735
507
+ msgid "Right:"
508
+ msgstr ""
509
+
510
+ #: popoverincludes/classes/popoveradmin.php:1167
511
+ #: popoverincludes/classes/popoveradmin.php:1739
512
+ msgid "Bottom:"
513
+ msgstr ""
514
+
515
+ #: popoverincludes/classes/popoveradmin.php:1175
516
+ msgid "or use Javascript to resize and center the popover"
517
+ msgstr ""
518
+
519
+ #: popoverincludes/classes/popoveradmin.php:1183
520
+ msgid "Background Color"
521
+ msgstr ""
522
+
523
+ #: popoverincludes/classes/popoveradmin.php:1185
524
+ #: popoverincludes/classes/popoveradmin.php:1193
525
+ #: popoverincludes/classes/popoveradmin.php:1759
526
+ #: popoverincludes/classes/popoveradmin.php:1767
527
+ msgid "Hex:"
528
+ msgstr ""
529
+
530
+ #: popoverincludes/classes/popoveradmin.php:1191
531
+ msgid "Font Color"
532
+ msgstr ""
533
+
534
+ #: popoverincludes/classes/popoveradmin.php:1205
535
+ msgid "Pop Over Style"
536
+ msgstr ""
537
+
538
+ #: popoverincludes/classes/popoveradmin.php:1209
539
+ msgid "Use Style"
540
+ msgstr ""
541
+
542
+ #: popoverincludes/classes/popoveradmin.php:1236
543
+ msgid "Remove Hide Forever Link"
544
+ msgstr ""
545
+
546
+ #: popoverincludes/classes/popoveradmin.php:1239
547
+ msgid "Remove the \"Never see this message again\" link"
548
+ msgstr ""
549
+
550
+ #: popoverincludes/classes/popoveradmin.php:1245
551
+ msgid ""
552
+ "Regular close button acts as &quot;Never see this message again&quot; link"
553
+ msgstr ""
554
+
555
+ #: popoverincludes/classes/popoveradmin.php:1251
556
+ msgid "Expiry time"
557
+ msgstr ""
558
+
559
+ #: popoverincludes/classes/popoveradmin.php:1254
560
+ msgid "days"
561
+ msgstr ""
562
+
563
+ #: popoverincludes/classes/popoveradmin.php:1259
564
+ msgid "Pop over appearance delays"
565
+ msgstr ""
566
+
567
+ #: popoverincludes/classes/popoveradmin.php:1262
568
+ msgid "Show Pop Over"
569
+ msgstr ""
570
+
571
+ #: popoverincludes/classes/popoveradmin.php:1265
572
+ msgid "immediately"
573
+ msgstr ""
574
+
575
+ #: popoverincludes/classes/popoveradmin.php:1269
576
+ msgid "after"
577
+ msgstr ""
578
+
579
+ #: popoverincludes/classes/popoveradmin.php:1269
580
+ msgid "seconds"
581
+ msgstr ""
582
+
583
+ #: popoverincludes/classes/popoveradmin.php:1283
584
+ msgid "Update"
585
+ msgstr ""
586
+
587
+ #: popoverincludes/classes/popoveradmin.php:1286
588
+ msgid "Add"
589
+ msgstr ""
590
+
591
+ #: popoverincludes/classes/popoveradmin.php:1286
592
+ msgid "Add and Activate"
593
+ msgstr ""
594
+
595
+ #: popoverincludes/classes/popoveradmin.php:1468
596
+ #: popoverincludes/includes/functions.php:538
597
+ msgid "Add this rule to the popover."
598
+ msgstr ""
599
+
600
+ #: popoverincludes/classes/popoveradmin.php:1481
601
+ #: popoverincludes/classes/popoveradmin.php:1494
602
+ #: popoverincludes/classes/popoveradmin.php:1508
603
+ #: popoverincludes/classes/popoveradmin.php:1526
604
+ #: popoverincludes/classes/popoveradmin.php:1542
605
+ #: popoverincludes/includes/functions.php:512
606
+ msgid "Remove"
607
+ msgstr ""
608
+
609
+ #: popoverincludes/classes/popoveradmin.php:1512
610
+ #: popoverincludes/classes/popoveradmin.php:1837
611
+ msgid "times"
612
+ msgstr ""
613
+
614
+ #: popoverincludes/classes/popoveradmin.php:1547
615
+ msgid "Select a country from the list below"
616
+ msgstr ""
617
+
618
+ #: popoverincludes/classes/popoveradmin.php:1660
619
+ msgid "Your settings have been saved."
620
+ msgstr ""
621
+
622
+ #: popoverincludes/classes/popoveradmin.php:1689
623
+ msgid "Pop Over content settings"
624
+ msgstr ""
625
+
626
+ #: popoverincludes/classes/popoveradmin.php:1690
627
+ msgid ""
628
+ "Use the settings below to modify the content of your pop over and the rules "
629
+ "that will determine when, or if, it will be displayed."
630
+ msgstr ""
631
+
632
+ #: popoverincludes/classes/popoveradmin.php:1692
633
+ msgid "Pop Over content"
634
+ msgstr ""
635
+
636
+ #: popoverincludes/classes/popoveradmin.php:1693
637
+ msgid ""
638
+ "Enter the content for your pop over in the text area below. HTML is allowed."
639
+ msgstr ""
640
+
641
+ #: popoverincludes/classes/popoveradmin.php:1697
642
+ msgid "Update content"
643
+ msgstr ""
644
+
645
+ #: popoverincludes/classes/popoveradmin.php:1700
646
+ msgid "Pop Over display settings"
647
+ msgstr ""
648
+
649
+ #: popoverincludes/classes/popoveradmin.php:1701
650
+ msgid ""
651
+ "Use the options below to determine the look, and display settings for the "
652
+ "Pop Over."
653
+ msgstr ""
654
+
655
+ #: popoverincludes/classes/popoveradmin.php:1707
656
+ msgid "Appearance Settings"
657
+ msgstr ""
658
+
659
+ #: popoverincludes/classes/popoveradmin.php:1747
660
+ msgid "or just override the above with JS"
661
+ msgstr ""
662
+
663
+ #: popoverincludes/classes/popoveradmin.php:1757
664
+ msgid "Background Colour"
665
+ msgstr ""
666
+
667
+ #: popoverincludes/classes/popoveradmin.php:1765
668
+ msgid "Font Colour"
669
+ msgstr ""
670
+
671
+ #: popoverincludes/classes/popoveradmin.php:1777
672
+ msgid "Display Rules"
673
+ msgstr ""
674
+
675
+ #: popoverincludes/classes/popoveradmin.php:1779
676
+ msgid ""
677
+ "Show the Pop Over if <strong>one</strong> of the following checked rules is "
678
+ "true."
679
+ msgstr ""
680
+
681
+ #: popoverincludes/classes/popoveradmin.php:1789
682
+ msgid "Visitor is not a supporter."
683
+ msgstr ""
684
+
685
+ #: popoverincludes/classes/popoveradmin.php:1798
686
+ msgid "Visitor is logged in."
687
+ msgstr ""
688
+
689
+ #: popoverincludes/classes/popoveradmin.php:1804
690
+ msgid "Visitor is not logged in."
691
+ msgstr ""
692
+
693
+ #: popoverincludes/classes/popoveradmin.php:1810
694
+ msgid "Visitor has never commented here before."
695
+ msgstr ""
696
+
697
+ #: popoverincludes/classes/popoveradmin.php:1816
698
+ msgid "Visitor came from a search engine."
699
+ msgstr ""
700
+
701
+ #: popoverincludes/classes/popoveradmin.php:1822
702
+ msgid "Visitor did not come from an internal page."
703
+ msgstr ""
704
+
705
+ #: popoverincludes/classes/popoveradmin.php:1828
706
+ msgid "Visitor referrer matches"
707
+ msgstr ""
708
+
709
+ #: popoverincludes/classes/popoveradmin.php:1835
710
+ msgid "And the visitor has seen the pop over less than"
711
+ msgstr ""
712
+
713
+ #: popoverincludes/classes/popoveradmin.php:1845
714
+ msgid "Update settings"
715
+ msgstr ""
716
+
717
+ #: popoverincludes/classes/popoveradmin.php:1922
718
+ msgid "Add-on updated."
719
+ msgstr ""
720
+
721
+ #: popoverincludes/classes/popoveradmin.php:1923
722
+ msgid "Add-on not updated."
723
+ msgstr ""
724
+
725
+ #: popoverincludes/classes/popoveradmin.php:1925
726
+ msgid "Add-on activated."
727
+ msgstr ""
728
+
729
+ #: popoverincludes/classes/popoveradmin.php:1926
730
+ msgid "Add-on not activated."
731
+ msgstr ""
732
+
733
+ #: popoverincludes/classes/popoveradmin.php:1928
734
+ msgid "Add-on deactivated."
735
+ msgstr ""
736
+
737
+ #: popoverincludes/classes/popoveradmin.php:1929
738
+ msgid "Add-on not deactivated."
739
+ msgstr ""
740
+
741
+ #: popoverincludes/classes/popoveradmin.php:1931
742
+ msgid "Add-on activation toggled."
743
+ msgstr ""
744
+
745
+ #: popoverincludes/classes/popoveradmin.php:1936
746
+ msgid "Edit Add-ons"
747
+ msgstr ""
748
+
749
+ #: popoverincludes/classes/popoveradmin.php:1971
750
+ msgid "Add-on Name"
751
+ msgstr ""
752
+
753
+ #: popoverincludes/classes/popoveradmin.php:1972
754
+ msgid "Add-on File"
755
+ msgstr ""
756
+
757
+ #: popoverincludes/classes/popoveradmin.php:2033
758
+ msgid " by "
759
+ msgstr ""
760
+
761
+ #: popoverincludes/classes/popoveradmin.php:2068
762
+ msgid "No Add-ons where found for this install."
763
+ msgstr ""
764
+
765
+ #: popoverincludes/classes/popoveradmin.php:2103
766
+ msgid "Your settings have been updated."
767
+ msgstr ""
768
+
769
+ #: popoverincludes/classes/popoveradmin.php:2128
770
+ msgid "Pop Over loading method"
771
+ msgstr ""
772
+
773
+ #: popoverincludes/classes/popoveradmin.php:2130
774
+ msgid "Select the loading method you want to use for your Pop Overs."
775
+ msgstr ""
776
+
777
+ #: popoverincludes/classes/popoveradmin.php:2132
778
+ msgid "- Page Footer : The pop over is included as part of the page html."
779
+ msgstr ""
780
+
781
+ #: popoverincludes/classes/popoveradmin.php:2133
782
+ msgid ""
783
+ "- External Load : The pop over is loaded separately from the page, this is "
784
+ "the best option if you are running a caching system."
785
+ msgstr ""
786
+
787
+ #: popoverincludes/classes/popoveradmin.php:2134
788
+ msgid ""
789
+ "- Custom Load : The pop over is loaded separately from the page via a custom "
790
+ "front end ajax call."
791
+ msgstr ""
792
+
793
+ #: popoverincludes/classes/popoveradmin.php:2140
794
+ msgid "Pop Over loaded using"
795
+ msgstr ""
796
+
797
+ #: popoverincludes/classes/popoveradmin.php:2146
798
+ msgid "Page Footer"
799
+ msgstr ""
800
+
801
+ #: popoverincludes/classes/popoveradmin.php:2147
802
+ msgid "External Load"
803
+ msgstr ""
804
+
805
+ #: popoverincludes/classes/popoveradmin.php:2148
806
+ msgid "Custom Load"
807
+ msgstr ""
808
+
809
+ #: popoverincludes/css/default/popover.php:2
810
+ #: popoverincludes/css/fixed/popover.php:2
811
+ #: popoverincludes/css/fullbackground/popover.php:3
812
+ #: popoverincludes/css/fullbackgroundfixed/popover.php:2
813
+ msgid "Close this box"
814
+ msgstr ""
815
+
816
+ #: popoverincludes/css/default/popover.php:9
817
+ #: popoverincludes/css/fixed/popover.php:8
818
+ #: popoverincludes/css/fullbackground/popover.php:9
819
+ #: popoverincludes/css/fullbackgroundfixed/popover.php:8
820
+ msgid "Never see this message again."
821
+ msgstr ""
822
+
823
+ #: popoverincludes/external/wpmudev-dash-notification.php:57
824
+ #, php-format
825
+ msgid ""
826
+ "Easily get updates, support, and one-click WPMU DEV plugin/theme "
827
+ "installations right from in your dashboard - <strong><a href=\"%s\" title="
828
+ "\"Install Now &raquo;\">install the free WPMU DEV Dashboard plugin</a></"
829
+ "strong>. &nbsp;&nbsp;&nbsp;<small><a href=\"http://premium.wpmudev.org/wpmu-"
830
+ "dev/update-notifications-plugin-information/\">(find out more)</a></small>"
831
+ msgstr ""
832
+
833
+ #: popoverincludes/external/wpmudev-dash-notification.php:61
834
+ #, php-format
835
+ msgid ""
836
+ "Updates, Support, Premium Plugins, Community - <strong><a href=\"%s\" title="
837
+ "\"Activate Now &raquo;\">activate the WPMU DEV Dashboard plugin now</a></"
838
+ "strong>."
839
+ msgstr ""
840
+
841
+ #: popoverincludes/help/popover.help.php:1
842
+ #: popoverincludes/help/popoveraddons.help.php:1
843
+ msgid "Introduction"
844
+ msgstr ""
845
+
846
+ #: popoverincludes/help/popover.help.php:2
847
+ msgid ""
848
+ "The main Pop Over screen show all of the Pop Overs you have set up, you can "
849
+ "edit, activate / deactivate and reorder the priority of the Pop Overs using "
850
+ "this screen."
851
+ msgstr ""
852
+
853
+ #: popoverincludes/help/popover.help.php:3
854
+ msgid "Adding a Pop Over"
855
+ msgstr ""
856
+
857
+ #: popoverincludes/help/popover.help.php:4
858
+ msgid ""
859
+ "To add a Pop Over you can either click on the <strong>Add New</strong> link "
860
+ "near the top of the page, or click on the <strong>Create New</strong> menu "
861
+ "item in the main Popover menu."
862
+ msgstr ""
863
+
864
+ #: popoverincludes/help/popover.help.php:5
865
+ msgid "Activating / Deactivating a Popover"
866
+ msgstr ""
867
+
868
+ #: popoverincludes/help/popover.help.php:6
869
+ msgid ""
870
+ "If you find that you do not need a particular Pop Over for a period of time, "
871
+ "but want to keep it for later use, then clicking on the Deactivate link "
872
+ "underneath the Pop Overs title will ensure the Pop Over is not included in "
873
+ "the processing."
874
+ msgstr ""
875
+
876
+ #: popoverincludes/help/popover.help.php:8
877
+ msgid ""
878
+ "You can re-activate at any time by clicking on the Activate link underneath "
879
+ "the Pop Overs title"
880
+ msgstr ""
881
+
882
+ #: popoverincludes/help/popover.help.php:10
883
+ msgid "Ordering Pop Overs"
884
+ msgstr ""
885
+
886
+ #: popoverincludes/help/popover.help.php:11
887
+ msgid ""
888
+ "The Pop Overs are processed in the order they show in the list. As soon as a "
889
+ "Pop Over is shown, the remainder of the Pop Overs in the list are ignored. "
890
+ "You can change the order of the Pop Overs processing by clicking in the left "
891
+ "hand column of the list and dragging the relevant pop Over to the desired "
892
+ "location."
893
+ msgstr ""
894
+
895
+ #: popoverincludes/help/popover.help.php:13
896
+ msgid "Deleting Pop Overs"
897
+ msgstr ""
898
+
899
+ #: popoverincludes/help/popover.help.php:14
900
+ msgid ""
901
+ "Once you have finished with a Pop Over you can delete it by clicking on the "
902
+ "Delete link underneath the Pop Overs title."
903
+ msgstr ""
904
+
905
+ #: popoverincludes/help/popoveraddons.help.php:2
906
+ msgid ""
907
+ "Add-ons allow you to extend the Pop Over plugin. The Add-on screen lists all "
908
+ "of the Add-ons currently installed. To activate or deactivate an Add-on you "
909
+ "should click on the Activate or Deactivate link underneath the Add-ons title."
910
+ msgstr ""
911
+
912
+ #: popoverincludes/help/popoveredit.help.php:1
913
+ msgid "Adding / Editing a Pop Over"
914
+ msgstr ""
915
+
916
+ #: popoverincludes/help/popoveredit.help.php:2
917
+ msgid "A Pop Over should have the following information."
918
+ msgstr ""
919
+
920
+ #: popoverincludes/help/popoveredit.help.php:4
921
+ msgid ""
922
+ "<strong>A Title</strong> - The Pop Over title helps you to identify "
923
+ "different Pop Overs in the main list."
924
+ msgstr ""
925
+
926
+ #: popoverincludes/help/popoveredit.help.php:5
927
+ msgid ""
928
+ "<strong>Pop Over content</strong> - This is the content that the Pop Over "
929
+ "will display. You can upload any images you require by clicking on the Add "
930
+ "Media button at the top of the edit area."
931
+ msgstr ""
932
+
933
+ #: popoverincludes/help/popoveredit.help.php:8
934
+ msgid ""
935
+ "<strong>Active Conditions</strong> - You can determine the conditions that "
936
+ "need to be fulfilled in order for this Pop Over to display by dragging the "
937
+ "relevant conditions in the the <strong>Drop Here</strong> box. All of the "
938
+ "conditions must be true in order for the Pop Over to display."
939
+ msgstr ""
940
+
941
+ #: popoverincludes/help/popoveredit.help.php:11
942
+ msgid ""
943
+ "<strong>Appearance Settings</strong> - You can set the size and position of "
944
+ "the Pop Over by setting the Appearance options. If you want the Pop Over "
945
+ "system to attempt to determine the size of the Pop Overs content and "
946
+ "automatically resize the Pop Over and attempt to center it on your browser "
947
+ "window."
948
+ msgstr ""
949
+
950
+ #: popoverincludes/includes/class_wd_help_tooltips.php:297
951
+ msgid "Help"
952
+ msgstr ""
953
+
954
+ #: popoverincludes/includes/functions.php:150
955
+ msgid "Australia"
956
+ msgstr ""
957
+
958
+ #: popoverincludes/includes/functions.php:151
959
+ msgid "Afghanistan"
960
+ msgstr ""
961
+
962
+ #: popoverincludes/includes/functions.php:152
963
+ msgid "Albania"
964
+ msgstr ""
965
+
966
+ #: popoverincludes/includes/functions.php:153
967
+ msgid "Algeria"
968
+ msgstr ""
969
+
970
+ #: popoverincludes/includes/functions.php:154
971
+ msgid "American Samoa"
972
+ msgstr ""
973
+
974
+ #: popoverincludes/includes/functions.php:155
975
+ msgid "Andorra"
976
+ msgstr ""
977
+
978
+ #: popoverincludes/includes/functions.php:156
979
+ msgid "Angola"
980
+ msgstr ""
981
+
982
+ #: popoverincludes/includes/functions.php:157
983
+ msgid "Anguilla"
984
+ msgstr ""
985
+
986
+ #: popoverincludes/includes/functions.php:158
987
+ msgid "Antarctica"
988
+ msgstr ""
989
+
990
+ #: popoverincludes/includes/functions.php:159
991
+ msgid "Antigua & Barbuda"
992
+ msgstr ""
993
+
994
+ #: popoverincludes/includes/functions.php:160
995
+ msgid "Argentina"
996
+ msgstr ""
997
+
998
+ #: popoverincludes/includes/functions.php:161
999
+ msgid "Armenia"
1000
+ msgstr ""
1001
+
1002
+ #: popoverincludes/includes/functions.php:162
1003
+ msgid "Aruba"
1004
+ msgstr ""
1005
+
1006
+ #: popoverincludes/includes/functions.php:163
1007
+ msgid "Austria"
1008
+ msgstr ""
1009
+
1010
+ #: popoverincludes/includes/functions.php:164
1011
+ msgid "Azerbaijan"
1012
+ msgstr ""
1013
+
1014
+ #: popoverincludes/includes/functions.php:165
1015
+ msgid "Bahamas"
1016
+ msgstr ""
1017
+
1018
+ #: popoverincludes/includes/functions.php:166
1019
+ msgid "Bahrain"
1020
+ msgstr ""
1021
+
1022
+ #: popoverincludes/includes/functions.php:167
1023
+ msgid "Bangladesh"
1024
+ msgstr ""
1025
+
1026
+ #: popoverincludes/includes/functions.php:168
1027
+ msgid "Barbados"
1028
+ msgstr ""
1029
+
1030
+ #: popoverincludes/includes/functions.php:169
1031
+ msgid "Belarus"
1032
+ msgstr ""
1033
+
1034
+ #: popoverincludes/includes/functions.php:170
1035
+ msgid "Belgium"
1036
+ msgstr ""
1037
+
1038
+ #: popoverincludes/includes/functions.php:171
1039
+ msgid "Belize"
1040
+ msgstr ""
1041
+
1042
+ #: popoverincludes/includes/functions.php:172
1043
+ msgid "Benin"
1044
+ msgstr ""
1045
+
1046
+ #: popoverincludes/includes/functions.php:173
1047
+ msgid "Bermuda"
1048
+ msgstr ""
1049
+
1050
+ #: popoverincludes/includes/functions.php:174
1051
+ msgid "Bhutan"
1052
+ msgstr ""
1053
+
1054
+ #: popoverincludes/includes/functions.php:175
1055
+ msgid "Bolivia"
1056
+ msgstr ""
1057
+
1058
+ #: popoverincludes/includes/functions.php:176
1059
+ msgid "Bosnia/Hercegovina"
1060
+ msgstr ""
1061
+
1062
+ #: popoverincludes/includes/functions.php:177
1063
+ msgid "Botswana"
1064
+ msgstr ""
1065
+
1066
+ #: popoverincludes/includes/functions.php:178
1067
+ msgid "Bouvet Island"
1068
+ msgstr ""
1069
+
1070
+ #: popoverincludes/includes/functions.php:179
1071
+ msgid "Brazil"
1072
+ msgstr ""
1073
+
1074
+ #: popoverincludes/includes/functions.php:180
1075
+ msgid "British Indian Ocean Territory"
1076
+ msgstr ""
1077
+
1078
+ #: popoverincludes/includes/functions.php:181
1079
+ msgid "Brunei Darussalam"
1080
+ msgstr ""
1081
+
1082
+ #: popoverincludes/includes/functions.php:182
1083
+ msgid "Bulgaria"
1084
+ msgstr ""
1085
+
1086
+ #: popoverincludes/includes/functions.php:183
1087
+ msgid "Burkina Faso"
1088
+ msgstr ""
1089
+
1090
+ #: popoverincludes/includes/functions.php:184
1091
+ msgid "Burundi"
1092
+ msgstr ""
1093
+
1094
+ #: popoverincludes/includes/functions.php:185
1095
+ msgid "Cambodia"
1096
+ msgstr ""
1097
+
1098
+ #: popoverincludes/includes/functions.php:186
1099
+ msgid "Cameroon"
1100
+ msgstr ""
1101
+
1102
+ #: popoverincludes/includes/functions.php:187
1103
+ msgid "Canada"
1104
+ msgstr ""
1105
+
1106
+ #: popoverincludes/includes/functions.php:188
1107
+ msgid "Cape Verde"
1108
+ msgstr ""
1109
+
1110
+ #: popoverincludes/includes/functions.php:189
1111
+ msgid "Cayman Is"
1112
+ msgstr ""
1113
+
1114
+ #: popoverincludes/includes/functions.php:190
1115
+ msgid "Central African Republic"
1116
+ msgstr ""
1117
+
1118
+ #: popoverincludes/includes/functions.php:191
1119
+ msgid "Chad"
1120
+ msgstr ""
1121
+
1122
+ #: popoverincludes/includes/functions.php:192
1123
+ msgid "Chile"
1124
+ msgstr ""
1125
+
1126
+ #: popoverincludes/includes/functions.php:193
1127
+ msgid "China, People's Republic of"
1128
+ msgstr ""
1129
+
1130
+ #: popoverincludes/includes/functions.php:194
1131
+ msgid "Christmas Island"
1132
+ msgstr ""
1133
+
1134
+ #: popoverincludes/includes/functions.php:195
1135
+ msgid "Cocos Islands"
1136
+ msgstr ""
1137
+
1138
+ #: popoverincludes/includes/functions.php:196
1139
+ msgid "Colombia"
1140
+ msgstr ""
1141
+
1142
+ #: popoverincludes/includes/functions.php:197
1143
+ msgid "Comoros"
1144
+ msgstr ""
1145
+
1146
+ #: popoverincludes/includes/functions.php:198
1147
+ msgid "Congo"
1148
+ msgstr ""
1149
+
1150
+ #: popoverincludes/includes/functions.php:199
1151
+ msgid "Congo, Democratic Republic"
1152
+ msgstr ""
1153
+
1154
+ #: popoverincludes/includes/functions.php:200
1155
+ msgid "Cook Islands"
1156
+ msgstr ""
1157
+
1158
+ #: popoverincludes/includes/functions.php:201
1159
+ msgid "Costa Rica"
1160
+ msgstr ""
1161
+
1162
+ #: popoverincludes/includes/functions.php:202
1163
+ msgid "Cote d'Ivoire"
1164
+ msgstr ""
1165
+
1166
+ #: popoverincludes/includes/functions.php:203
1167
+ msgid "Croatia"
1168
+ msgstr ""
1169
+
1170
+ #: popoverincludes/includes/functions.php:204
1171
+ msgid "Cuba"
1172
+ msgstr ""
1173
+
1174
+ #: popoverincludes/includes/functions.php:205
1175
+ msgid "Cyprus"
1176
+ msgstr ""
1177
+
1178
+ #: popoverincludes/includes/functions.php:206
1179
+ msgid "Czech Republic"
1180
+ msgstr ""
1181
+
1182
+ #: popoverincludes/includes/functions.php:207
1183
+ msgid "Denmark"
1184
+ msgstr ""
1185
+
1186
+ #: popoverincludes/includes/functions.php:208
1187
+ msgid "Djibouti"
1188
+ msgstr ""
1189
+
1190
+ #: popoverincludes/includes/functions.php:209
1191
+ msgid "Dominica"
1192
+ msgstr ""
1193
+
1194
+ #: popoverincludes/includes/functions.php:210
1195
+ msgid "Dominican Republic"
1196
+ msgstr ""
1197
+
1198
+ #: popoverincludes/includes/functions.php:211
1199
+ msgid "East Timor"
1200
+ msgstr ""
1201
+
1202
+ #: popoverincludes/includes/functions.php:212
1203
+ msgid "Ecuador"
1204
+ msgstr ""
1205
+
1206
+ #: popoverincludes/includes/functions.php:213
1207
+ msgid "Egypt"
1208
+ msgstr ""
1209
+
1210
+ #: popoverincludes/includes/functions.php:214
1211
+ msgid "El Salvador"
1212
+ msgstr ""
1213
+
1214
+ #: popoverincludes/includes/functions.php:215
1215
+ msgid "Equatorial Guinea"
1216
+ msgstr ""
1217
+
1218
+ #: popoverincludes/includes/functions.php:216
1219
+ msgid "Eritrea"
1220
+ msgstr ""
1221
+
1222
+ #: popoverincludes/includes/functions.php:217
1223
+ msgid "Estonia"
1224
+ msgstr ""
1225
+
1226
+ #: popoverincludes/includes/functions.php:218
1227
+ msgid "Ethiopia"
1228
+ msgstr ""
1229
+
1230
+ #: popoverincludes/includes/functions.php:219
1231
+ msgid "Falkland Islands"
1232
+ msgstr ""
1233
+
1234
+ #: popoverincludes/includes/functions.php:220
1235
+ msgid "Faroe Islands"
1236
+ msgstr ""
1237
+
1238
+ #: popoverincludes/includes/functions.php:221
1239
+ msgid "Fiji"
1240
+ msgstr ""
1241
+
1242
+ #: popoverincludes/includes/functions.php:222
1243
+ msgid "Finland"
1244
+ msgstr ""
1245
+
1246
+ #: popoverincludes/includes/functions.php:223
1247
+ msgid "France"
1248
+ msgstr ""
1249
+
1250
+ #: popoverincludes/includes/functions.php:224
1251
+ msgid "France, Metropolitan"
1252
+ msgstr ""
1253
+
1254
+ #: popoverincludes/includes/functions.php:225
1255
+ msgid "French Guiana"
1256
+ msgstr ""
1257
+
1258
+ #: popoverincludes/includes/functions.php:226
1259
+ msgid "French Polynesia"
1260
+ msgstr ""
1261
+
1262
+ #: popoverincludes/includes/functions.php:227
1263
+ msgid "French South Territories"
1264
+ msgstr ""
1265
+
1266
+ #: popoverincludes/includes/functions.php:228
1267
+ msgid "Gabon"
1268
+ msgstr ""
1269
+
1270
+ #: popoverincludes/includes/functions.php:229
1271
+ msgid "Gambia"
1272
+ msgstr ""
1273
+
1274
+ #: popoverincludes/includes/functions.php:230
1275
+ msgid "Georgia"
1276
+ msgstr ""
1277
+
1278
+ #: popoverincludes/includes/functions.php:231
1279
+ msgid "Germany"
1280
+ msgstr ""
1281
+
1282
+ #: popoverincludes/includes/functions.php:232
1283
+ msgid "Ghana"
1284
+ msgstr ""
1285
+
1286
+ #: popoverincludes/includes/functions.php:233
1287
+ msgid "Gibraltar"
1288
+ msgstr ""
1289
+
1290
+ #: popoverincludes/includes/functions.php:234
1291
+ msgid "Greece"
1292
+ msgstr ""
1293
+
1294
+ #: popoverincludes/includes/functions.php:235
1295
+ msgid "Greenland"
1296
+ msgstr ""
1297
+
1298
+ #: popoverincludes/includes/functions.php:236
1299
+ msgid "Grenada"
1300
+ msgstr ""
1301
+
1302
+ #: popoverincludes/includes/functions.php:237
1303
+ msgid "Guadeloupe"
1304
+ msgstr ""
1305
+
1306
+ #: popoverincludes/includes/functions.php:238
1307
+ msgid "Guam"
1308
+ msgstr ""
1309
+
1310
+ #: popoverincludes/includes/functions.php:239
1311
+ msgid "Guatemala"
1312
+ msgstr ""
1313
+
1314
+ #: popoverincludes/includes/functions.php:240
1315
+ msgid "Guinea"
1316
+ msgstr ""
1317
+
1318
+ #: popoverincludes/includes/functions.php:241
1319
+ msgid "Guinea-Bissau"
1320
+ msgstr ""
1321
+
1322
+ #: popoverincludes/includes/functions.php:242
1323
+ msgid "Guyana"
1324
+ msgstr ""
1325
+
1326
+ #: popoverincludes/includes/functions.php:243
1327
+ msgid "Haiti"
1328
+ msgstr ""
1329
+
1330
+ #: popoverincludes/includes/functions.php:244
1331
+ msgid "Heard Island And Mcdonald Island"
1332
+ msgstr ""
1333
+
1334
+ #: popoverincludes/includes/functions.php:245
1335
+ msgid "Honduras"
1336
+ msgstr ""
1337
+
1338
+ #: popoverincludes/includes/functions.php:246
1339
+ msgid "Hong Kong"
1340
+ msgstr ""
1341
+
1342
+ #: popoverincludes/includes/functions.php:247
1343
+ msgid "Hungary"
1344
+ msgstr ""
1345
+
1346
+ #: popoverincludes/includes/functions.php:248
1347
+ msgid "Iceland"
1348
+ msgstr ""
1349
+
1350
+ #: popoverincludes/includes/functions.php:249
1351
+ msgid "India"
1352
+ msgstr ""
1353
+
1354
+ #: popoverincludes/includes/functions.php:250
1355
+ msgid "Indonesia"
1356
+ msgstr ""
1357
+
1358
+ #: popoverincludes/includes/functions.php:251
1359
+ msgid "Iran"
1360
+ msgstr ""
1361
+
1362
+ #: popoverincludes/includes/functions.php:252
1363
+ msgid "Iraq"
1364
+ msgstr ""
1365
+
1366
+ #: popoverincludes/includes/functions.php:253
1367
+ msgid "Ireland"
1368
+ msgstr ""
1369
+
1370
+ #: popoverincludes/includes/functions.php:254
1371
+ msgid "Israel"
1372
+ msgstr ""
1373
+
1374
+ #: popoverincludes/includes/functions.php:255
1375
+ msgid "Italy"
1376
+ msgstr ""
1377
+
1378
+ #: popoverincludes/includes/functions.php:256
1379
+ msgid "Jamaica"
1380
+ msgstr ""
1381
+
1382
+ #: popoverincludes/includes/functions.php:257
1383
+ msgid "Japan"
1384
+ msgstr ""
1385
+
1386
+ #: popoverincludes/includes/functions.php:258
1387
+ msgid "Johnston Island"
1388
+ msgstr ""
1389
+
1390
+ #: popoverincludes/includes/functions.php:259
1391
+ msgid "Jordan"
1392
+ msgstr ""
1393
+
1394
+ #: popoverincludes/includes/functions.php:260
1395
+ msgid "Kazakhstan"
1396
+ msgstr ""
1397
+
1398
+ #: popoverincludes/includes/functions.php:261
1399
+ msgid "Kenya"
1400
+ msgstr ""
1401
+
1402
+ #: popoverincludes/includes/functions.php:262
1403
+ msgid "Kiribati"
1404
+ msgstr ""
1405
+
1406
+ #: popoverincludes/includes/functions.php:263
1407
+ msgid "Korea, Democratic Peoples Republic"
1408
+ msgstr ""
1409
+
1410
+ #: popoverincludes/includes/functions.php:264
1411
+ msgid "Korea, Republic of"
1412
+ msgstr ""
1413
+
1414
+ #: popoverincludes/includes/functions.php:265
1415
+ msgid "Kuwait"
1416
+ msgstr ""
1417
+
1418
+ #: popoverincludes/includes/functions.php:266
1419
+ msgid "Kyrgyzstan"
1420
+ msgstr ""
1421
+
1422
+ #: popoverincludes/includes/functions.php:267
1423
+ msgid "Lao People's Democratic Republic"
1424
+ msgstr ""
1425
+
1426
+ #: popoverincludes/includes/functions.php:268
1427
+ msgid "Latvia"
1428
+ msgstr ""
1429
+
1430
+ #: popoverincludes/includes/functions.php:269
1431
+ msgid "Lebanon"
1432
+ msgstr ""
1433
+
1434
+ #: popoverincludes/includes/functions.php:270
1435
+ msgid "Lesotho"
1436
+ msgstr ""
1437
+
1438
+ #: popoverincludes/includes/functions.php:271
1439
+ msgid "Liberia"
1440
+ msgstr ""
1441
+
1442
+ #: popoverincludes/includes/functions.php:272
1443
+ msgid "Libyan Arab Jamahiriya"
1444
+ msgstr ""
1445
+
1446
+ #: popoverincludes/includes/functions.php:273
1447
+ msgid "Liechtenstein"
1448
+ msgstr ""
1449
+
1450
+ #: popoverincludes/includes/functions.php:274
1451
+ msgid "Lithuania"
1452
+ msgstr ""
1453
+
1454
+ #: popoverincludes/includes/functions.php:275
1455
+ msgid "Luxembourg"
1456
+ msgstr ""
1457
+
1458
+ #: popoverincludes/includes/functions.php:276
1459
+ msgid "Macau"
1460
+ msgstr ""
1461
+
1462
+ #: popoverincludes/includes/functions.php:277
1463
+ msgid "Macedonia"
1464
+ msgstr ""
1465
+
1466
+ #: popoverincludes/includes/functions.php:278
1467
+ msgid "Madagascar"
1468
+ msgstr ""
1469
+
1470
+ #: popoverincludes/includes/functions.php:279
1471
+ msgid "Malawi"
1472
+ msgstr ""
1473
+
1474
+ #: popoverincludes/includes/functions.php:280
1475
+ msgid "Malaysia"
1476
+ msgstr ""
1477
+
1478
+ #: popoverincludes/includes/functions.php:281
1479
+ msgid "Maldives"
1480
+ msgstr ""
1481
+
1482
+ #: popoverincludes/includes/functions.php:282
1483
+ msgid "Mali"
1484
+ msgstr ""
1485
+
1486
+ #: popoverincludes/includes/functions.php:283
1487
+ msgid "Malta"
1488
+ msgstr ""
1489
+
1490
+ #: popoverincludes/includes/functions.php:284
1491
+ msgid "Marshall Islands"
1492
+ msgstr ""
1493
+
1494
+ #: popoverincludes/includes/functions.php:285
1495
+ msgid "Martinique"
1496
+ msgstr ""
1497
+
1498
+ #: popoverincludes/includes/functions.php:286
1499
+ msgid "Mauritania"
1500
+ msgstr ""
1501
+
1502
+ #: popoverincludes/includes/functions.php:287
1503
+ msgid "Mauritius"
1504
+ msgstr ""
1505
+
1506
+ #: popoverincludes/includes/functions.php:288
1507
+ msgid "Mayotte"
1508
+ msgstr ""
1509
+
1510
+ #: popoverincludes/includes/functions.php:289
1511
+ msgid "Mexico"
1512
+ msgstr ""
1513
+
1514
+ #: popoverincludes/includes/functions.php:290
1515
+ msgid "Micronesia"
1516
+ msgstr ""
1517
+
1518
+ #: popoverincludes/includes/functions.php:291
1519
+ msgid "Moldavia"
1520
+ msgstr ""
1521
+
1522
+ #: popoverincludes/includes/functions.php:292
1523
+ msgid "Monaco"
1524
+ msgstr ""
1525
+
1526
+ #: popoverincludes/includes/functions.php:293
1527
+ msgid "Mongolia"
1528
+ msgstr ""
1529
+
1530
+ #: popoverincludes/includes/functions.php:294
1531
+ msgid "Montserrat"
1532
+ msgstr ""
1533
+
1534
+ #: popoverincludes/includes/functions.php:295
1535
+ msgid "Morocco"
1536
+ msgstr ""
1537
+
1538
+ #: popoverincludes/includes/functions.php:296
1539
+ msgid "Mozambique"
1540
+ msgstr ""
1541
+
1542
+ #: popoverincludes/includes/functions.php:297
1543
+ msgid "Union Of Myanmar"
1544
+ msgstr ""
1545
+
1546
+ #: popoverincludes/includes/functions.php:298
1547
+ msgid "Namibia"
1548
+ msgstr ""
1549
+
1550
+ #: popoverincludes/includes/functions.php:299
1551
+ msgid "Nauru Island"
1552
+ msgstr ""
1553
+
1554
+ #: popoverincludes/includes/functions.php:300
1555
+ msgid "Nepal"
1556
+ msgstr ""
1557
+
1558
+ #: popoverincludes/includes/functions.php:301
1559
+ msgid "Netherlands"
1560
+ msgstr ""
1561
+
1562
+ #: popoverincludes/includes/functions.php:302
1563
+ msgid "Netherlands Antilles"
1564
+ msgstr ""
1565
+
1566
+ #: popoverincludes/includes/functions.php:303
1567
+ msgid "New Caledonia"
1568
+ msgstr ""
1569
+
1570
+ #: popoverincludes/includes/functions.php:304
1571
+ msgid "New Zealand"
1572
+ msgstr ""
1573
+
1574
+ #: popoverincludes/includes/functions.php:305
1575
+ msgid "Nicaragua"
1576
+ msgstr ""
1577
+
1578
+ #: popoverincludes/includes/functions.php:306
1579
+ msgid "Niger"
1580
+ msgstr ""
1581
+
1582
+ #: popoverincludes/includes/functions.php:307
1583
+ msgid "Nigeria"
1584
+ msgstr ""
1585
+
1586
+ #: popoverincludes/includes/functions.php:308
1587
+ msgid "Niue"
1588
+ msgstr ""
1589
+
1590
+ #: popoverincludes/includes/functions.php:309
1591
+ msgid "Norfolk Island"
1592
+ msgstr ""
1593
+
1594
+ #: popoverincludes/includes/functions.php:310
1595
+ msgid "Mariana Islands, Northern"
1596
+ msgstr ""
1597
+
1598
+ #: popoverincludes/includes/functions.php:311
1599
+ msgid "Norway"
1600
+ msgstr ""
1601
+
1602
+ #: popoverincludes/includes/functions.php:312
1603
+ msgid "Oman"
1604
+ msgstr ""
1605
+
1606
+ #: popoverincludes/includes/functions.php:313
1607
+ msgid "Pakistan"
1608
+ msgstr ""
1609
+
1610
+ #: popoverincludes/includes/functions.php:314
1611
+ msgid "Palau Islands"
1612
+ msgstr ""
1613
+
1614
+ #: popoverincludes/includes/functions.php:315
1615
+ msgid "Palestine"
1616
+ msgstr ""
1617
+
1618
+ #: popoverincludes/includes/functions.php:316
1619
+ msgid "Panama"
1620
+ msgstr ""
1621
+
1622
+ #: popoverincludes/includes/functions.php:317
1623
+ msgid "Papua New Guinea"
1624
+ msgstr ""
1625
+
1626
+ #: popoverincludes/includes/functions.php:318
1627
+ msgid "Paraguay"
1628
+ msgstr ""
1629
+
1630
+ #: popoverincludes/includes/functions.php:319
1631
+ msgid "Peru"
1632
+ msgstr ""
1633
+
1634
+ #: popoverincludes/includes/functions.php:320
1635
+ msgid "Philippines"
1636
+ msgstr ""
1637
+
1638
+ #: popoverincludes/includes/functions.php:321
1639
+ msgid "Pitcairn"
1640
+ msgstr ""
1641
+
1642
+ #: popoverincludes/includes/functions.php:322
1643
+ msgid "Poland"
1644
+ msgstr ""
1645
+
1646
+ #: popoverincludes/includes/functions.php:323
1647
+ msgid "Portugal"
1648
+ msgstr ""
1649
+
1650
+ #: popoverincludes/includes/functions.php:324
1651
+ msgid "Puerto Rico"
1652
+ msgstr ""
1653
+
1654
+ #: popoverincludes/includes/functions.php:325
1655
+ msgid "Qatar"
1656
+ msgstr ""
1657
+
1658
+ #: popoverincludes/includes/functions.php:326
1659
+ msgid "Reunion Island"
1660
+ msgstr ""
1661
+
1662
+ #: popoverincludes/includes/functions.php:327
1663
+ msgid "Romania"
1664
+ msgstr ""
1665
+
1666
+ #: popoverincludes/includes/functions.php:328
1667
+ msgid "Russian Federation"
1668
+ msgstr ""
1669
+
1670
+ #: popoverincludes/includes/functions.php:329
1671
+ msgid "Rwanda"
1672
+ msgstr ""
1673
+
1674
+ #: popoverincludes/includes/functions.php:330
1675
+ msgid "Samoa"
1676
+ msgstr ""
1677
+
1678
+ #: popoverincludes/includes/functions.php:331
1679
+ msgid "St Helena"
1680
+ msgstr ""
1681
+
1682
+ #: popoverincludes/includes/functions.php:332
1683
+ msgid "St Kitts & Nevis"
1684
+ msgstr ""
1685
+
1686
+ #: popoverincludes/includes/functions.php:333
1687
+ msgid "St Lucia"
1688
+ msgstr ""
1689
+
1690
+ #: popoverincludes/includes/functions.php:334
1691
+ msgid "St Pierre & Miquelon"
1692
+ msgstr ""
1693
+
1694
+ #: popoverincludes/includes/functions.php:335
1695
+ msgid "St Vincent"
1696
+ msgstr ""
1697
+
1698
+ #: popoverincludes/includes/functions.php:336
1699
+ msgid "San Marino"
1700
+ msgstr ""
1701
+
1702
+ #: popoverincludes/includes/functions.php:337
1703
+ msgid "Sao Tome & Principe"
1704
+ msgstr ""
1705
+
1706
+ #: popoverincludes/includes/functions.php:338
1707
+ msgid "Saudi Arabia"
1708
+ msgstr ""
1709
+
1710
+ #: popoverincludes/includes/functions.php:339
1711
+ msgid "Senegal"
1712
+ msgstr ""
1713
+
1714
+ #: popoverincludes/includes/functions.php:340
1715
+ msgid "Seychelles"
1716
+ msgstr ""
1717
+
1718
+ #: popoverincludes/includes/functions.php:341
1719
+ msgid "Sierra Leone"
1720
+ msgstr ""
1721
+
1722
+ #: popoverincludes/includes/functions.php:342
1723
+ msgid "Singapore"
1724
+ msgstr ""
1725
+
1726
+ #: popoverincludes/includes/functions.php:343
1727
+ msgid "Slovakia"
1728
+ msgstr ""
1729
+
1730
+ #: popoverincludes/includes/functions.php:344
1731
+ msgid "Slovenia"
1732
+ msgstr ""
1733
+
1734
+ #: popoverincludes/includes/functions.php:345
1735
+ msgid "Solomon Islands"
1736
+ msgstr ""
1737
+
1738
+ #: popoverincludes/includes/functions.php:346
1739
+ msgid "Somalia"
1740
+ msgstr ""
1741
+
1742
+ #: popoverincludes/includes/functions.php:347
1743
+ msgid "South Africa"
1744
+ msgstr ""
1745
+
1746
+ #: popoverincludes/includes/functions.php:348
1747
+ msgid "South Georgia and South Sandwich"
1748
+ msgstr ""
1749
+
1750
+ #: popoverincludes/includes/functions.php:349
1751
+ msgid "Spain"
1752
+ msgstr ""
1753
+
1754
+ #: popoverincludes/includes/functions.php:350
1755
+ msgid "Sri Lanka"
1756
+ msgstr ""
1757
+
1758
+ #: popoverincludes/includes/functions.php:351
1759
+ msgid "Stateless Persons"
1760
+ msgstr ""
1761
+
1762
+ #: popoverincludes/includes/functions.php:352
1763
+ msgid "Sudan"
1764
+ msgstr ""
1765
+
1766
+ #: popoverincludes/includes/functions.php:353
1767
+ msgid "Suriname"
1768
+ msgstr ""
1769
+
1770
+ #: popoverincludes/includes/functions.php:354
1771
+ msgid "Svalbard and Jan Mayen"
1772
+ msgstr ""
1773
+
1774
+ #: popoverincludes/includes/functions.php:355
1775
+ msgid "Swaziland"
1776
+ msgstr ""
1777
+
1778
+ #: popoverincludes/includes/functions.php:356
1779
+ msgid "Sweden"
1780
+ msgstr ""
1781
+
1782
+ #: popoverincludes/includes/functions.php:357
1783
+ msgid "Switzerland"
1784
+ msgstr ""
1785
+
1786
+ #: popoverincludes/includes/functions.php:358
1787
+ msgid "Syrian Arab Republic"
1788
+ msgstr ""
1789
+
1790
+ #: popoverincludes/includes/functions.php:359
1791
+ msgid "Taiwan, Republic of China"
1792
+ msgstr ""
1793
+
1794
+ #: popoverincludes/includes/functions.php:360
1795
+ msgid "Tajikistan"
1796
+ msgstr ""
1797
+
1798
+ #: popoverincludes/includes/functions.php:361
1799
+ msgid "Tanzania"
1800
+ msgstr ""
1801
+
1802
+ #: popoverincludes/includes/functions.php:362
1803
+ msgid "Thailand"
1804
+ msgstr ""
1805
+
1806
+ #: popoverincludes/includes/functions.php:363
1807
+ msgid "Timor Leste"
1808
+ msgstr ""
1809
+
1810
+ #: popoverincludes/includes/functions.php:364
1811
+ msgid "Togo"
1812
+ msgstr ""
1813
+
1814
+ #: popoverincludes/includes/functions.php:365
1815
+ msgid "Tokelau"
1816
+ msgstr ""
1817
+
1818
+ #: popoverincludes/includes/functions.php:366
1819
+ msgid "Tonga"
1820
+ msgstr ""
1821
+
1822
+ #: popoverincludes/includes/functions.php:367
1823
+ msgid "Trinidad & Tobago"
1824
+ msgstr ""
1825
+
1826
+ #: popoverincludes/includes/functions.php:368
1827
+ msgid "Tunisia"
1828
+ msgstr ""
1829
+
1830
+ #: popoverincludes/includes/functions.php:369
1831
+ msgid "Turkey"
1832
+ msgstr ""
1833
+
1834
+ #: popoverincludes/includes/functions.php:370
1835
+ msgid "Turkmenistan"
1836
+ msgstr ""
1837
+
1838
+ #: popoverincludes/includes/functions.php:371
1839
+ msgid "Turks And Caicos Islands"
1840
+ msgstr ""
1841
+
1842
+ #: popoverincludes/includes/functions.php:372
1843
+ msgid "Tuvalu"
1844
+ msgstr ""
1845
+
1846
+ #: popoverincludes/includes/functions.php:373
1847
+ msgid "Uganda"
1848
+ msgstr ""
1849
+
1850
+ #: popoverincludes/includes/functions.php:374
1851
+ msgid "Ukraine"
1852
+ msgstr ""
1853
+
1854
+ #: popoverincludes/includes/functions.php:375
1855
+ msgid "United Arab Emirates"
1856
+ msgstr ""
1857
+
1858
+ #: popoverincludes/includes/functions.php:376
1859
+ msgid "United Kingdom"
1860
+ msgstr ""
1861
+
1862
+ #: popoverincludes/includes/functions.php:377
1863
+ msgid "US Minor Outlying Islands"
1864
+ msgstr ""
1865
+
1866
+ #: popoverincludes/includes/functions.php:378
1867
+ msgid "USA"
1868
+ msgstr ""
1869
+
1870
+ #: popoverincludes/includes/functions.php:379
1871
+ msgid "Upper Volta"
1872
+ msgstr ""
1873
+
1874
+ #: popoverincludes/includes/functions.php:380
1875
+ msgid "Uruguay"
1876
+ msgstr ""
1877
+
1878
+ #: popoverincludes/includes/functions.php:381
1879
+ msgid "Uzbekistan"
1880
+ msgstr ""
1881
+
1882
+ #: popoverincludes/includes/functions.php:382
1883
+ msgid "Vanuatu"
1884
+ msgstr ""
1885
+
1886
+ #: popoverincludes/includes/functions.php:383
1887
+ msgid "Vatican City State"
1888
+ msgstr ""
1889
+
1890
+ #: popoverincludes/includes/functions.php:384
1891
+ msgid "Venezuela"
1892
+ msgstr ""
1893
+
1894
+ #: popoverincludes/includes/functions.php:385
1895
+ msgid "Vietnam"
1896
+ msgstr ""
1897
+
1898
+ #: popoverincludes/includes/functions.php:386
1899
+ msgid "Virgin Islands (British)"
1900
+ msgstr ""
1901
+
1902
+ #: popoverincludes/includes/functions.php:387
1903
+ msgid "Virgin Islands (US)"
1904
+ msgstr ""
1905
+
1906
+ #: popoverincludes/includes/functions.php:388
1907
+ msgid "Wallis And Futuna Islands"
1908
+ msgstr ""
1909
+
1910
+ #: popoverincludes/includes/functions.php:389
1911
+ msgid "Western Sahara"
1912
+ msgstr ""
1913
+
1914
+ #: popoverincludes/includes/functions.php:390
1915
+ msgid "Yemen Arab Rep."
1916
+ msgstr ""
1917
+
1918
+ #: popoverincludes/includes/functions.php:391
1919
+ msgid "Yemen Democratic"
1920
+ msgstr ""
1921
+
1922
+ #: popoverincludes/includes/functions.php:392
1923
+ msgid "Yugoslavia"
1924
+ msgstr ""
1925
+
1926
+ #: popoverincludes/includes/functions.php:393
1927
+ msgid "Zaire"
1928
+ msgstr ""
1929
+
1930
+ #: popoverincludes/includes/functions.php:394
1931
+ msgid "Zambia"
1932
+ msgstr ""
1933
+
1934
+ #: popoverincludes/includes/functions.php:395
1935
+ msgid "Zimbabwe"
1936
+ msgstr ""
1937
+
1938
+ #: popoverincludes/includes/functions.php:512
1939
+ #, php-format
1940
+ msgid "Remove %s tag from this rules area."
1941
+ msgstr ""
popover.php CHANGED
@@ -1,15 +1,17 @@
1
  <?php
2
  /*
3
- Plugin Name: WordPress Pop Up Plugin
4
- Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
- Description: Allows you to display a fancy popup (powered as a popover!) to visitors sitewide or per blog, a *very* effective way of advertising a mailing list, special offer or running a plain old ad.
6
- Author: Barry (Incsub), Marko Miljus (Incsub)
7
- Version: 4.4.5.4
8
- Author URI: http://premium.wpmudev.org
9
- WDP ID: 123
 
10
 
11
  Copyright 2007-2013 Incsub (http://incsub.com)
12
-
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
15
  the Free Software Foundation.
@@ -24,29 +26,60 @@ Copyright 2007-2013 Incsub (http://incsub.com)
24
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
  */
26
 
27
- require_once( dirname(__FILE__) . '/popoverincludes/includes/config.php');
28
- require_once( dirname(__FILE__) . '/popoverincludes/includes/functions.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- // Set up my location
31
- set_popover_url(__FILE__);
32
- set_popover_dir(__FILE__);
 
 
 
33
 
34
- if(is_admin()) {
35
- require_once( dirname(__FILE__) . '/popoverincludes/includes/class_wd_help_tooltips.php');
36
- require_once( dirname(__FILE__) . '/popoverincludes/classes/popover.help.php');
37
- require_once( dirname(__FILE__) . '/popoverincludes/classes/popoveradmin.php');
38
- require_once( dirname(__FILE__) . '/popoverincludes/classes/popoverajax.php');
39
 
40
- $popover = new popoveradmin();
41
- $popoverajax = new popoverajax();
42
- } else {
43
- // Adding ajax so we don't have to duplicate checking functionality in the public class
44
- // NOTE: it's not being used for ajax here
45
- require_once( dirname(__FILE__) . '/popoverincludes/classes/popoverajax.php');
46
- require_once( dirname(__FILE__) . '/popoverincludes/classes/popoverpublic.php');
47
 
48
- $popover = new popoverpublic();
49
- $popoverajax = new popoverajax();
50
- }
 
 
 
 
 
51
 
52
- load_popover_addons();
 
 
 
1
  <?php
2
  /*
3
+ Plugin Name: WordPress PopUp
4
+ Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/
5
+ Description: Allows you to display a fancy PopUp to visitors sitewide or per blog. A *very* effective way of advertising a mailing list, special offer or running a plain old ad.
6
+ Version: 4.6
7
+ Author: WPMU DEV
8
+ Author URI: http://premium.wpmudev.org
9
+ Textdomain: popover
10
+ WDP ID: 123
11
 
12
  Copyright 2007-2013 Incsub (http://incsub.com)
13
+ Author - Barry (Incsub)
14
+ Contributors - Marko Miljus (Incsub), Ve Bailovity (Incsub)
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by
17
  the Free Software Foundation.
26
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
  */
28
 
29
+ add_action(
30
+ 'plugins_loaded',
31
+ 'inc_popup_free_init'
32
+ );
33
+
34
+ function inc_popup_free_init() {
35
+ // Check if the PRO plugin is present and activated.
36
+ if ( defined( 'PO_VERSION' ) && PO_VERSION == 'pro' ) {
37
+ return false;
38
+ }
39
+
40
+ if ( ! defined( 'PO_LANG' ) ) {
41
+ // Used for more readable i18n functions: __( 'text', PO_LANG );
42
+ define( 'PO_LANG', 'popover' );
43
+ define( 'PO_VERSION', '4.6' );
44
+
45
+ /**
46
+ * The current DB/build version. NOT THE SAME AS THE PLUGIN VERSION!
47
+ * Increase this when DB structure changes, migration code is required, etc.
48
+ * See IncPopupDatabase: db_is_current() and db_update()
49
+ */
50
+ define( 'PO_BUILD', 6 );
51
+
52
+ $plugin_dir = trailingslashit( dirname( __FILE__ ) );
53
+ $plugin_dir_rel = trailingslashit( dirname( plugin_basename( __FILE__ ) ) );
54
+ $plugin_url = plugin_dir_url( __FILE__ );
55
 
56
+ define( 'PO_LANG_DIR', $plugin_dir_rel . 'lang/' );
57
+ define( 'PO_TPL_DIR', $plugin_dir . 'css/tpl/' );
58
+ define( 'PO_INC_DIR', $plugin_dir . 'inc/' );
59
+ define( 'PO_JS_DIR', $plugin_dir . 'js/' );
60
+ define( 'PO_CSS_DIR', $plugin_dir . 'css/' );
61
+ define( 'PO_VIEWS_DIR', $plugin_dir . 'views/' );
62
 
63
+ define( 'PO_TPL_URL', $plugin_url . 'css/tpl/' );
64
+ define( 'PO_JS_URL', $plugin_url . 'js/' );
65
+ define( 'PO_CSS_URL', $plugin_url . 'css/' );
66
+ define( 'PO_IMG_URL', $plugin_url . 'img/' );
 
67
 
68
+ // Include function library.
69
+ if ( file_exists( PO_INC_DIR . 'external/wpmu-lib/core.php' ) ) {
70
+ require_once PO_INC_DIR . 'external/wpmu-lib/core.php';
71
+ }
 
 
 
72
 
73
+ require_once( PO_INC_DIR . 'config-defaults.php');
74
+ if ( is_admin() ) {
75
+ // Defines class 'IncPopup'.
76
+ require_once( PO_INC_DIR . 'class-popup-admin.php');
77
+ } else {
78
+ // Defines class 'IncPopup'.
79
+ require_once( PO_INC_DIR . 'class-popup-public.php');
80
+ }
81
 
82
+ // Initialize the plugin as soon as we have identified the current user.
83
+ add_action( 'set_current_user', array( 'IncPopup', 'instance' ) );
84
+ }
85
+ }
popoverincludes/addons/testheadfooter.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
- /*
3
- Addon Name: Test Head Footer
4
- Plugin URI: http://gist.github.com/378450
5
- Description: Tests for the existence and functionality of wp_head and wp_footer in the active theme
6
- Author: Matt Martz
7
- Author URI: http://sivel.net/
8
- Version: 1.0
9
-
10
- Copyright (c) 2010 Matt Martz (http://sivel.net/)
11
- Test Head Footer is released under the GNU General Public License (GPL)
12
- http://www.gnu.org/licenses/gpl-2.0.txt
13
- */
14
-
15
- // Lets not do anything until init
16
- add_action( 'init', 'test_head_footer_init' );
17
- function test_head_footer_init() {
18
- // Hook in at admin_init to perform the check for wp_head and wp_footer
19
- add_action( 'admin_init', 'check_head_footer' );
20
-
21
- // If test-head query var exists hook into wp_head
22
- if ( isset( $_GET['test-head'] ) )
23
- add_action( 'wp_head', 'test_head', 99999 ); // Some obscene priority, make sure we run last
24
-
25
- // If test-footer query var exists hook into wp_footer
26
- if ( isset( $_GET['test-footer'] ) )
27
- add_action( 'wp_footer', 'test_footer', 99999 ); // Some obscene priority, make sure we run last
28
- }
29
-
30
- // Echo a string that we can search for later into the head of the document
31
- // This should end up appearing directly before </head>
32
- function test_head() {
33
- echo '<!--wp_head-->';
34
- }
35
-
36
- // Echo a string that we can search for later into the footer of the document
37
- // This should end up appearing directly before </body>
38
- function test_footer() {
39
- echo '<!--wp_footer-->';
40
- }
41
-
42
- // Check for the existence of the strings where wp_head and wp_footer should have been called from
43
- function check_head_footer() {
44
- // Build the url to call, NOTE: uses home_url and thus requires WordPress 3.0
45
- $url = add_query_arg( array( 'test-head' => '', 'test-footer' => '' ), home_url() );
46
- // Perform the HTTP GET ignoring SSL errors
47
- $response = wp_remote_get( $url, array( 'sslverify' => false ) );
48
- // Grab the response code and make sure the request was sucessful
49
- $code = (int) wp_remote_retrieve_response_code( $response );
50
- if ( $code == 200 ) {
51
- global $head_footer_errors;
52
- $head_footer_errors = array();
53
-
54
- // Strip all tabs, line feeds, carriage returns and spaces
55
- $html = preg_replace( '/[\t\r\n\s]/', '', wp_remote_retrieve_body( $response ) );
56
-
57
- // Check to see if we found the existence of wp_head
58
- if ( ! strstr( $html, '<!--wp_head-->' ) )
59
- $head_footer_errors['nohead'] = 'Is missing the call to <?php wp_head(); ?> which should appear directly before </head>';
60
- // Check to see if we found the existence of wp_footer
61
- if ( ! strstr( $html, '<!--wp_footer-->' ) )
62
- $head_footer_errors['nofooter'] = 'Is missing the call to <?php wp_footer(); ?> which should appear directly before </body>';
63
-
64
- // Check to see if we found wp_head and if was located in the proper spot
65
- if ( ! strstr( $html, '<!--wp_head--></head>' ) && ! isset( $head_footer_errors['nohead'] ) )
66
- $head_footer_errors[] = 'Has the call to <?php wp_head(); ?> but it is not called directly before </head>';
67
- // Check to see if we found wp_footer and if was located in the proper spot
68
- if ( ! strstr( $html, '<!--wp_footer--></body>' ) && ! isset( $head_footer_errors['nofooter'] ) )
69
- $head_footer_errors[] = 'Has the call to <?php wp_footer(); ?> but it is not called directly before </body>';
70
-
71
- // If we found errors with the existence of wp_head or wp_footer hook into admin_notices to complain about it
72
- if ( ! empty( $head_footer_errors ) )
73
- add_action ( 'admin_notices', 'test_head_footer_notices' );
74
- }
75
- }
76
-
77
- // Output the notices
78
- function test_head_footer_notices() {
79
- global $head_footer_errors;
80
-
81
- // If we made it here it is because there were errors, lets loop through and state them all
82
- echo '<div class="error"><p><strong>Your active theme:</strong></p><ul>';
83
- foreach ( $head_footer_errors as $error )
84
- echo '<li>' . esc_html( $error ) . '</li>';
85
- echo '</ul></div>';
86
- }
87
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/classes/popover.help.php DELETED
@@ -1,85 +0,0 @@
1
- <?php
2
- if(!class_exists('Popover_Help')) {
3
-
4
- class Popover_Help {
5
- // The screen we want to access help for
6
- var $screen = false;
7
-
8
- function __construct( &$screen = false ) {
9
-
10
- $this->screen = $screen;
11
-
12
- //print_r($screen);
13
-
14
- }
15
-
16
- function Popover_Help( &$screen = false ) {
17
- $this->__construct( $screen );
18
- }
19
-
20
- function show() {
21
-
22
-
23
-
24
- }
25
-
26
- function attach() {
27
-
28
- switch($this->screen->id) {
29
-
30
- case 'toplevel_page_popover': $this->main_help();
31
- break;
32
-
33
- case 'pop-overs_page_popoveraddons': $this->addons_help();
34
- break;
35
-
36
-
37
- }
38
-
39
- }
40
-
41
- // Specific help content creation functions
42
-
43
- function main_help() {
44
-
45
- ob_start();
46
- include_once(popover_dir('popoverincludes/help/popover.help.php'));
47
- $help = ob_get_clean();
48
-
49
- ob_start();
50
- include_once(popover_dir('popoverincludes/help/popoveredit.help.php'));
51
- $helpedit = ob_get_clean();
52
-
53
- $this->screen->add_help_tab( array(
54
- 'id' => 'popover',
55
- 'title' => __( 'Overview' , 'popover' ),
56
- 'content' => $help,
57
- ) );
58
-
59
- $this->screen->add_help_tab( array(
60
- 'id' => 'edit',
61
- 'title' => __( 'Adding / Editing' , 'popover' ),
62
- 'content' => $helpedit,
63
- ) );
64
-
65
- }
66
-
67
- function addons_help() {
68
-
69
- ob_start();
70
- include_once(popover_dir('popoverincludes/help/popoveraddons.help.php'));
71
- $help = ob_get_clean();
72
-
73
- $this->screen->add_help_tab( array(
74
- 'id' => 'addons',
75
- 'title' => __( 'Add-ons', 'popover' ),
76
- 'content' => $help,
77
- ) );
78
-
79
- }
80
-
81
-
82
- }
83
-
84
- }
85
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/classes/popoveradmin.php DELETED
@@ -1,2089 +0,0 @@
1
- <?php
2
- if (!class_exists('popoveradmin')) {
3
-
4
- class popoveradmin {
5
-
6
- var $build = 5;
7
- var $db;
8
- var $tables = array('popover', 'popover_ip_cache');
9
- var $popover;
10
- var $popover_ip_cache;
11
-
12
- function __construct() {
13
-
14
- global $wpdb;
15
-
16
- $this->db = & $wpdb;
17
-
18
- foreach ($this->tables as $table) {
19
- $this->$table = popover_db_prefix($this->db, $table);
20
- }
21
-
22
- add_action('admin_menu', array(&$this, 'add_menu_pages'));
23
- add_action('network_admin_menu', array(&$this, 'add_menu_pages'));
24
-
25
- add_action('plugins_loaded', array(&$this, 'load_textdomain'));
26
-
27
- // Add header files
28
- add_action('load-toplevel_page_popover', array(&$this, 'add_admin_header_popover_menu'));
29
- add_action('load-pop-overs_page_popoveraddons', array(&$this, 'add_admin_header_popover_addons'));
30
- add_action('load-pop-overs_page_popoversettings', array(&$this, 'add_admin_header_popover_settings'));
31
-
32
- // Ajax calls
33
- add_action('wp_ajax_popover_update_order', array(&$this, 'ajax_update_popover_order'));
34
-
35
- $installed = get_option('popover_installed', false);
36
-
37
- if ($installed === false || $installed != $this->build) {
38
- $this->install();
39
-
40
- update_option('popover_installed', $this->build);
41
- }
42
- }
43
-
44
- function popoveradmin() {
45
- $this->__construct();
46
- }
47
-
48
- function install() {
49
-
50
- $charset_collate = '';
51
-
52
- if (!empty($this->db->charset)) {
53
- $charset_collate = "DEFAULT CHARACTER SET " . $this->db->charset;
54
- }
55
-
56
- if (!empty($this->db->collate)) {
57
- $charset_collate .= " COLLATE " . $this->db->collate;
58
- }
59
-
60
- if ($this->db->get_var("SHOW TABLES LIKE '" . $this->popover . "' ") != $this->popover) {
61
- $sql = "CREATE TABLE `" . $this->popover . "` (
62
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
63
- `popover_title` varchar(250) DEFAULT NULL,
64
- `popover_content` text,
65
- `popover_settings` text,
66
- `popover_order` bigint(20) DEFAULT '0',
67
- `popover_active` int(11) DEFAULT '0',
68
- PRIMARY KEY (`id`)
69
- ) $charset_collate;";
70
-
71
- $this->db->query($sql);
72
- }
73
-
74
- // Add in IP cache table
75
- if ($this->db->get_var("SHOW TABLES LIKE '" . $this->popover_ip_cache . "' ") != $this->popover_ip_cache) {
76
- $sql = "CREATE TABLE `" . $this->popover_ip_cache . "` (
77
- `IP` varchar(12) NOT NULL DEFAULT '',
78
- `country` varchar(2) DEFAULT NULL,
79
- `cached` bigint(20) DEFAULT NULL,
80
- PRIMARY KEY (`IP`),
81
- KEY `cached` (`cached`)
82
- ) $charset_collate;";
83
-
84
- $this->db->query($sql);
85
- }
86
- }
87
-
88
- function load_textdomain() {
89
-
90
- $locale = apply_filters('popover_locale', get_locale());
91
- $mofile = popover_dir("popoverincludes/languages/popover-$locale.mo");
92
-
93
- if (file_exists($mofile))
94
- load_textdomain('popover', $mofile);
95
- }
96
-
97
- function add_menu_pages() {
98
-
99
- global $submenu;
100
-
101
- if (is_multisite() && (defined('PO_GLOBAL') && PO_GLOBAL == true)) {
102
- if (function_exists('is_network_admin') && is_network_admin()) {
103
- add_menu_page(__('Pop Overs', 'popover'), __('Pop Overs', 'popover'), 'manage_options', 'popover', array(&$this, 'handle_popover_admin'), popover_url('popoverincludes/images/window.png'));
104
- }
105
- } else {
106
- if (!function_exists('is_network_admin') || !is_network_admin()) {
107
- add_menu_page(__('Pop Overs', 'popover'), __('Pop Overs', 'popover'), 'manage_options', 'popover', array(&$this, 'handle_popover_admin'), popover_url('popoverincludes/images/window.png'));
108
- }
109
- }
110
-
111
- $addnew = add_submenu_page('popover', __('Create New Pop Over', 'popover'), __('Create New', 'popover'), 'manage_options', "popover&amp;action=add", array(&$this, 'handle_addnewpopover_panel'));
112
- add_submenu_page('popover', __('Manage Add-ons Plugins', 'popover'), __('Add-ons', 'popover'), 'manage_options', "popoveraddons", array(&$this, 'handle_addons_panel'));
113
-
114
- add_submenu_page('popover', __('Settings', 'popover'), __('Settings', 'popover'), 'manage_options', "popoversettings", array(&$this, 'handle_settings_page'));
115
- }
116
-
117
- function sanitise_array($arrayin) {
118
-
119
- foreach ((array) $arrayin as $key => $value) {
120
- $arrayin[$key] = htmlentities(stripslashes($value), ENT_QUOTES, 'UTF-8');
121
- }
122
-
123
- return $arrayin;
124
- }
125
-
126
- function ajax_update_popover_order() {
127
-
128
- if (check_ajax_referer('popover_order', '_ajax_nonce', false)) {
129
- $newnonce = wp_create_nonce('popover_order');
130
-
131
- $data = $_POST['data'];
132
- parse_str($data);
133
- foreach ($dragbody as $key => $value) {
134
- $this->reorder_popovers($value, $key);
135
- }
136
- die($newnonce);
137
- } else {
138
- die('fail');
139
- }
140
- }
141
-
142
- function update_admin_header_popover() {
143
-
144
- global $action, $page, $allowedposttags;
145
-
146
- wp_reset_vars(array('action', 'page'));
147
-
148
- if ($action == 'updated') {
149
- check_admin_referer('update-popover');
150
-
151
- $usemsg = 1;
152
-
153
- if (function_exists('get_site_option') && defined('PO_GLOBAL') && PO_GLOBAL == true) {
154
- $updateoption = 'update_site_option';
155
- $getoption = 'get_site_option';
156
- } else {
157
- $updateoption = 'update_option';
158
- $getoption = 'get_option';
159
- }
160
-
161
- if (isset($_POST['popovercontent'])) {
162
- if (!current_user_can('unfiltered_html')) {
163
- if (wp_kses($_POST['popovercontent'], $allowedposttags) != $_POST['popovercontent']) {
164
- $usemsg = 2;
165
- }
166
- $updateoption('popover_content', wp_kses($_POST['popovercontent'], $allowedposttags));
167
- } else {
168
- $updateoption('popover_content', $_POST['popovercontent']);
169
- }
170
- }
171
-
172
- if (isset($_POST['popoverwidth']) || isset($_POST['popoverheight'])) {
173
-
174
- $width = $_POST['popoverwidth'];
175
- $height = $_POST['popoverheight'];
176
-
177
- if ($width == '')
178
- $width = '500px';
179
- if ($height == '')
180
- $height = '200px';
181
-
182
- $updateoption('popover_size', array("width" => $width, "height" => $height));
183
- }
184
-
185
- if (isset($_POST['popoverleft']) || isset($_POST['popovertop'])) {
186
-
187
- $left = $_POST['popoverleft'];
188
- $top = $_POST['popovertop'];
189
-
190
- if ($left == '')
191
- $left = '100px';
192
- if ($top == '')
193
- $top = '100px';
194
-
195
- $updateoption('popover_location', array("left" => $left, "top" => $top));
196
- }
197
-
198
- if (isset($_POST['popovermargintop']) || isset($_POST['popovermarginleft']) || isset($_POST['popovermarginright']) || isset($_POST['popovermarginbottom'])) {
199
-
200
- $mleft = $_POST['popovermarginleft'];
201
- $mtop = $_POST['popovermargintop'];
202
- $mright = $_POST['popovermarginright'];
203
- $mbottom = $_POST['popovermarginbottom'];
204
-
205
- if ($mleft == '')
206
- $mleft = '0px';
207
- if ($mtop == '')
208
- $mtop = '0px';
209
- if ($mright == '')
210
- $mright = '0px';
211
- if ($mbottom == '')
212
- $mbottom = '0px';
213
-
214
- $updateoption('popover_margin', array('left' => $mleft, 'top' => $mtop, 'right' => $mright, 'bottom' => $mbottom));
215
- }
216
-
217
- if (isset($_POST['popoverbackground']) || isset($_POST['popoverforeground'])) {
218
-
219
- $back = $_POST['popoverbackground'];
220
- $fore = $_POST['popoverforeground'];
221
-
222
- if ($back == '')
223
- $back = 'FFFFFF';
224
- if ($fore == '')
225
- $fore = '000000';
226
-
227
- $updateoption('popover_colour', array("back" => $back, "fore" => $fore));
228
- }
229
-
230
- if (isset($_POST['popovercheck'])) {
231
-
232
- $updateoption('popover_check', $_POST['popovercheck']);
233
-
234
- if (isset($_POST['popoverereg'])) {
235
- $updateoption('popover_ereg', $_POST['popoverereg']);
236
- }
237
-
238
- if (isset($_POST['popovercount'])) {
239
- $updateoption('popover_count', intval($_POST['popovercount']));
240
- }
241
- }
242
-
243
- if (isset($_POST['popoverusejs'])) {
244
- $updateoption('popover_usejs', 'yes');
245
- } else {
246
- $updateoption('popover_usejs', 'no');
247
- }
248
-
249
- wp_safe_redirect(add_query_arg(array('msg' => $usemsg), wp_get_referer()));
250
- }
251
- }
252
-
253
- function add_admin_header_popover_menu() {
254
-
255
- $this->add_admin_header_core();
256
-
257
- if (isset($_GET['action']) && in_array($_GET['action'], array('edit', 'add'))) {
258
- $this->add_admin_header_popover();
259
- } else {
260
- wp_enqueue_script('popoverdragadminjs', popover_url('popoverincludes/js/jquery.tablednd_0_5.js'), array('jquery'), $this->build);
261
- wp_enqueue_script('popoveradminjs', popover_url('popoverincludes/js/popovermenu.js'), array('jquery', 'popoverdragadminjs'), $this->build);
262
-
263
- wp_localize_script('popoveradminjs', 'popover', array('ajaxurl' => admin_url('admin-ajax.php'),
264
- 'ordernonce' => wp_create_nonce('popover_order'),
265
- 'dragerror' => __('An error occured updating the Pop Over order.', 'popover'),
266
- 'deletepopover' => __('Are you sure you want to delete this Pop Over?', 'popover')
267
- ));
268
-
269
- wp_enqueue_style('popoveradmincss', popover_url('popoverincludes/css/popovermenu.css'), array(), $this->build);
270
-
271
- // Check for transfer
272
- if (isset($_GET['transfer'])) {
273
- $this->handle_popover_transfer();
274
- }
275
-
276
- // Check for existing popovers
277
- if ($this->has_existing_popover()) {
278
- add_action('all_admin_notices', array(&$this, 'show_popover_transfer_offer'));
279
- }
280
-
281
- $this->update_popover_admin();
282
- }
283
- }
284
-
285
- function add_admin_header_popover_settings() {
286
-
287
- global $action, $page;
288
-
289
- wp_reset_vars(array('action', 'page'));
290
-
291
- $this->update_settings_page();
292
- }
293
-
294
- function has_existing_popover() {
295
-
296
- if (function_exists('get_site_option') && defined('PO_GLOBAL') && PO_GLOBAL == true) {
297
- $getoption = 'get_site_option';
298
- } else {
299
- $getoption = 'get_option';
300
- }
301
-
302
- $popsexist = $this->db->get_var("SELECT COUNT(*) FROM {$this->popover}");
303
-
304
- if ($popsexist == 0 && $getoption('popover_content', 'no') != 'no' && $getoption('popover_notranfers', 'no') == 'no') {
305
- // No pops - and one set in the options
306
- return true;
307
- } else {
308
- return false;
309
- }
310
- }
311
-
312
- function show_popover_transfer_offer() {
313
-
314
- echo '<div class="updated fade below-h2"><p>' . sprintf(__("Welcome to Popover, would you like to transfer your existing Popover to the new format? <a href='%s'>Yes please transfer it</a> / <a href='%s'>No thanks, I'll create a new one myself.</a>", 'popover'), wp_nonce_url('admin.php?page=popover&amp;transfer=yes', 'transferpopover'), wp_nonce_url('admin.php?page=popover&amp;transfer=no', 'notransferpopover')) . '</p></div>';
315
- }
316
-
317
- function handle_popover_transfer() {
318
-
319
- if (function_exists('get_site_option') && defined('PO_GLOBAL') && PO_GLOBAL == true) {
320
- $updateoption = 'update_site_option';
321
- $getoption = 'get_site_option';
322
- } else {
323
- $updateoption = 'update_option';
324
- $getoption = 'get_option';
325
- }
326
-
327
- switch ($_GET['transfer']) {
328
-
329
- case 'yes': check_admin_referer('transferpopover');
330
- $popover = array();
331
-
332
- $popover['popover_title'] = __('Transferred Popover', 'popover');
333
- $popover['popover_content'] = $getoption('popover_content');
334
-
335
- $popover['popover_settings'] = array();
336
- $popover['popover_settings']['popover_size'] = $getoption('popover_size');
337
- $popover['popover_settings']['popover_location'] = $getoption('popover_location');
338
- ;
339
- $popover['popover_settings']['popover_colour'] = $getoption('popover_colour');
340
- $popover['popover_settings']['popover_margin'] = $getoption('popover_margin');
341
- $popover['popover_settings']['popover_check'] = $getoption('popover_check');
342
-
343
- $popover['popover_settings']['popover_count'] = $getoption('popover_count');
344
- $popover['popover_settings']['popover_usejs'] = $getoption('popover_usejs');
345
-
346
- $popover['popover_settings']['popover_style'] = 'Default';
347
-
348
- $popover['popover_settings'] = serialize($popover['popover_settings']);
349
-
350
- $popover['popover_active'] = 1;
351
-
352
- $this->db->insert($this->popover, $popover);
353
- wp_safe_redirect(remove_query_arg('transfer', remove_query_arg('_wpnonce')));
354
- break;
355
-
356
- case 'no': check_admin_referer('notransferpopover');
357
- $updateoption('popover_notranfers', 'yes');
358
- wp_safe_redirect(remove_query_arg('transfer', remove_query_arg('_wpnonce')));
359
- break;
360
- }
361
- }
362
-
363
- function add_admin_header_core() {
364
- // Add in help pages
365
- $screen = get_current_screen();
366
- $help = new Popover_Help($screen);
367
- $help->attach();
368
- }
369
-
370
- function add_admin_header_popover() {
371
-
372
- global $wp_version;
373
-
374
- wp_enqueue_script('popoveradminjs', popover_url('popoverincludes/js/popoveradmin.js'), array('jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable'), $this->build);
375
-
376
- if (version_compare(preg_replace('/-.*$/', '', $wp_version), "3.3", '<')) {
377
- wp_enqueue_style('popoveradmincss', popover_url('popoverincludes/css/popoveradmin.css'), array('widgets'), $this->build);
378
- } else {
379
- wp_enqueue_style('popoveradmincss', popover_url('popoverincludes/css/popoveradmin.css'), array(), $this->build);
380
- }
381
-
382
- $this->update_admin_header_popover();
383
- }
384
-
385
- function add_admin_header_popover_addons() {
386
-
387
- $this->add_admin_header_core();
388
-
389
- $this->handle_addons_panel_updates();
390
- }
391
-
392
- function reorder_popovers($popover_id, $order) {
393
-
394
- $this->db->update($this->popover, array('popover_order' => $order), array('id' => $popover_id));
395
- }
396
-
397
- function get_popovers() {
398
-
399
- $sql = "SELECT * FROM {$this->popover} ORDER BY popover_order ASC";
400
-
401
- return $this->db->get_results($sql);
402
- }
403
-
404
- function get_popover($id) {
405
- return $this->db->get_row($this->db->prepare("SELECT * FROM {$this->popover} WHERE id = %d", $id));
406
- }
407
-
408
- function activate_popover($id) {
409
- return $this->db->update($this->popover, array('popover_active' => 1), array('id' => $id));
410
- }
411
-
412
- function deactivate_popover($id) {
413
- return $this->db->update($this->popover, array('popover_active' => 0), array('id' => $id));
414
- }
415
-
416
- function toggle_popover($id) {
417
-
418
- $sql = $this->db->prepare("UPDATE {$this->popover} SET popover_active = NOT popover_active WHERE id = %d", $id);
419
-
420
- return $this->db->query($sql);
421
- }
422
-
423
- function delete_popover($id) {
424
-
425
- return $this->db->query($this->db->prepare("DELETE FROM {$this->popover} WHERE id = %d", $id));
426
- }
427
-
428
- function add_popover($data) {
429
-
430
- global $action, $page, $allowedposttags;
431
-
432
- $popover = array();
433
-
434
- $popover['popover_title'] = $_POST['popover_title'];
435
-
436
- if (!current_user_can('unfiltered_html')) {
437
- $popover['popover_content'] = wp_kses($_POST['popover_content'], $allowedposttags);
438
- } else {
439
- $popover['popover_content'] = $_POST['popover_content'];
440
- }
441
-
442
- $popover['popover_settings'] = array();
443
- $popover['popover_settings']['popover_size'] = array('width' => $_POST['popoverwidth'], 'height' => $_POST['popoverheight']);
444
- $popover['popover_settings']['popover_location'] = array('left' => $_POST['popoverleft'], 'top' => $_POST['popovertop']);
445
- $popover['popover_settings']['popover_colour'] = array('back' => $_POST['popoverbackground'], 'fore' => $_POST['popoverforeground']);
446
- $popover['popover_settings']['popover_margin'] = array('left' => $_POST['popovermarginleft'], 'top' => $_POST['popovermargintop'], 'right' => $_POST['popovermarginright'], 'bottom' => $_POST['popovermarginbottom']);
447
- $popover['popover_settings']['popover_check'] = $_POST['popovercheck'];
448
-
449
- if (isset($_POST['popoverereg'])) {
450
- $popover['popover_settings']['popover_ereg'] = $_POST['popoverereg'];
451
- } else {
452
- $popover['popover_settings']['popover_ereg'] = '';
453
- }
454
-
455
- if (isset($_POST['popovercount'])) {
456
- $popover['popover_settings']['popover_count'] = $_POST['popovercount'];
457
- } else {
458
- $popover['popover_settings']['popover_count'] = 3;
459
- }
460
-
461
- if (isset($_POST['popoverusejs']) && $_POST['popoverusejs'] == 'yes') {
462
- $popover['popover_settings']['popover_usejs'] = 'yes';
463
- } else {
464
- $popover['popover_settings']['popover_usejs'] = 'no';
465
- }
466
-
467
- $popover['popover_settings']['popover_style'] = $_POST['popoverstyle'];
468
-
469
- if (isset($_POST['popoverhideforeverlink']) && $_POST['popoverhideforeverlink'] == 'yes') {
470
- $popover['popover_settings']['popoverhideforeverlink'] = 'yes';
471
- } else {
472
- $popover['popover_settings']['popoverhideforeverlink'] = 'no';
473
- }
474
-
475
- if (isset($_POST['popoverdelay'])) {
476
- $popover['popover_settings']['popoverdelay'] = $_POST['popoverdelay'];
477
- }
478
-
479
- if (isset($_POST['popoveronurl'])) {
480
- $popover['popover_settings']['onurl'] = explode("\n", $_POST['popoveronurl']);
481
- }
482
-
483
- if (isset($_POST['popovernotonurl'])) {
484
- $popover['popover_settings']['notonurl'] = explode("\n", $_POST['popovernotonurl']);
485
- }
486
-
487
- if (isset($_POST['popoverincountry'])) {
488
- $popover['popover_settings']['incountry'] = $_POST['popoverincountry'];
489
- }
490
-
491
- if (isset($_POST['popovernotincountry'])) {
492
- $popover['popover_settings']['notincountry'] = $_POST['popovernotincountry'];
493
- }
494
-
495
- $popover['popover_settings'] = serialize($popover['popover_settings']);
496
-
497
- if (isset($_POST['addandactivate'])) {
498
- $popover['popover_active'] = 1;
499
- }
500
-
501
- return $this->db->insert($this->popover, $popover);
502
- }
503
-
504
- function update_popover($id, $data) {
505
-
506
- global $action, $page, $allowedposttags;
507
-
508
- $popover = array();
509
-
510
- $popover['popover_title'] = $_POST['popover_title'];
511
-
512
- if (!current_user_can('unfiltered_html')) {
513
- $popover['popover_content'] = wp_kses($_POST['popover_content'], $allowedposttags);
514
- } else {
515
- $popover['popover_content'] = $_POST['popover_content'];
516
- }
517
-
518
- $popover['popover_settings'] = array();
519
- $popover['popover_settings']['popover_size'] = array('width' => $_POST['popoverwidth'], 'height' => $_POST['popoverheight']);
520
- $popover['popover_settings']['popover_location'] = array('left' => $_POST['popoverleft'], 'top' => $_POST['popovertop']);
521
- $popover['popover_settings']['popover_colour'] = array('back' => $_POST['popoverbackground'], 'fore' => $_POST['popoverforeground']);
522
- $popover['popover_settings']['popover_margin'] = array('left' => $_POST['popovermarginleft'], 'top' => $_POST['popovermargintop'], 'right' => $_POST['popovermarginright'], 'bottom' => $_POST['popovermarginbottom']);
523
- $popover['popover_settings']['popover_check'] = $_POST['popovercheck'];
524
-
525
- if (isset($_POST['popoverereg'])) {
526
- $popover['popover_settings']['popover_ereg'] = $_POST['popoverereg'];
527
- } else {
528
- $popover['popover_settings']['popover_ereg'] = '';
529
- }
530
-
531
- if (isset($_POST['popovercount'])) {
532
- $popover['popover_settings']['popover_count'] = $_POST['popovercount'];
533
- } else {
534
- $popover['popover_settings']['popover_count'] = 3;
535
- }
536
-
537
- if ($_POST['popoverusejs'] == 'yes') {
538
- $popover['popover_settings']['popover_usejs'] = 'yes';
539
- } else {
540
- $popover['popover_settings']['popover_usejs'] = 'no';
541
- }
542
-
543
- $popover['popover_settings']['popover_style'] = $_POST['popoverstyle'];
544
-
545
- if (isset($_POST['popoverhideforeverlink']) && $_POST['popoverhideforeverlink'] == 'yes') {
546
- $popover['popover_settings']['popoverhideforeverlink'] = 'yes';
547
- } else {
548
- $popover['popover_settings']['popoverhideforeverlink'] = 'no';
549
- }
550
-
551
- if (isset($_POST['popoverdelay'])) {
552
- $popover['popover_settings']['popoverdelay'] = $_POST['popoverdelay'];
553
- }
554
-
555
- if (isset($_POST['popoveronurl'])) {
556
- $popover['popover_settings']['onurl'] = explode("\n", $_POST['popoveronurl']);
557
- }
558
-
559
- if (isset($_POST['popovernotonurl'])) {
560
- $popover['popover_settings']['notonurl'] = explode("\n", $_POST['popovernotonurl']);
561
- }
562
-
563
- if (isset($_POST['popoverincountry'])) {
564
- $popover['popover_settings']['incountry'] = $_POST['popoverincountry'];
565
- }
566
-
567
- if (isset($_POST['popovernotincountry'])) {
568
- $popover['popover_settings']['notincountry'] = $_POST['popovernotincountry'];
569
- }
570
-
571
- $popover['popover_settings'] = serialize($popover['popover_settings']);
572
-
573
- return $this->db->update($this->popover, $popover, array('id' => $id));
574
- }
575
-
576
- function update_popover_admin() {
577
- global $action, $page;
578
-
579
- wp_reset_vars(array('action', 'page'));
580
-
581
- if (isset($_REQUEST['action']) || isset($_REQUEST['action2'])) {
582
-
583
- if (!empty($_REQUEST['action2'])) {
584
- $_REQUEST['action'] = $_REQUEST['action2'];
585
- }
586
-
587
- switch ($_REQUEST['action']) {
588
-
589
-
590
- case 'activate': $id = (int) $_GET['popover'];
591
- if (!empty($id)) {
592
- check_admin_referer('toggle-popover-' . $id);
593
-
594
- if ($this->activate_popover($id)) {
595
- wp_safe_redirect(add_query_arg('msg', 3, wp_get_referer()));
596
- } else {
597
- wp_safe_redirect(add_query_arg('msg', 4, wp_get_referer()));
598
- }
599
- }
600
- break;
601
-
602
-
603
- case 'deactivate': $id = (int) $_GET['popover'];
604
- if (!empty($id)) {
605
- check_admin_referer('toggle-popover-' . $id);
606
-
607
- if ($this->deactivate_popover($id)) {
608
- wp_safe_redirect(add_query_arg('msg', 5, wp_get_referer()));
609
- } else {
610
- wp_safe_redirect(add_query_arg('msg', 6, wp_get_referer()));
611
- }
612
- }
613
- break;
614
-
615
- case 'toggle': $ids = $_REQUEST['popovercheck'];
616
-
617
- if (!empty($ids)) {
618
- check_admin_referer('bulk-popovers');
619
- foreach ((array) $ids as $id) {
620
- $this->toggle_popover($id);
621
- }
622
- wp_safe_redirect(add_query_arg('msg', 7, wp_get_referer()));
623
- }
624
- break;
625
-
626
- case 'delete': $id = (int) $_GET['popover'];
627
-
628
- if (!empty($id)) {
629
- check_admin_referer('delete-popover-' . $id);
630
-
631
- if ($this->delete_popover($id)) {
632
- wp_safe_redirect(add_query_arg('msg', 8, wp_get_referer()));
633
- } else {
634
- wp_safe_redirect(add_query_arg('msg', 9, wp_get_referer()));
635
- }
636
- }
637
- break;
638
-
639
- case 'added': $id = (int) $_POST['id'];
640
- if (empty($id)) {
641
- check_admin_referer('update-popover');
642
- if ($this->add_popover($_POST)) {
643
- wp_safe_redirect(add_query_arg('msg', 10, 'admin.php?page=popover'));
644
- } else {
645
- wp_safe_redirect(add_query_arg('msg', 11, 'admin.php?page=popover'));
646
- }
647
- }
648
- break;
649
-
650
- case 'updated': $id = (int) $_POST['id'];
651
- if (!empty($id)) {
652
- check_admin_referer('update-popover');
653
- if ($this->update_popover($id, $_POST)) {
654
- wp_safe_redirect(add_query_arg('msg', 1, 'admin.php?page=popover'));
655
- } else {
656
- wp_safe_redirect(add_query_arg('msg', 2, 'admin.php?page=popover'));
657
- }
658
- }
659
- break;
660
- }
661
- }
662
- }
663
-
664
- function handle_popover_admin() {
665
- global $action, $page;
666
-
667
- if ($action == 'edit') {
668
- if (isset($_GET['popover'])) {
669
- $id = (int) $_GET['popover'];
670
- $this->handle_popover_edit_panel($id);
671
- return; // So we don't see the rest of this page
672
- }
673
- }
674
-
675
- if ($action == 'add') {
676
- $this->handle_popover_edit_panel(false);
677
- return; // So we don't see the rest of this page
678
- }
679
-
680
- $messages = array();
681
- $messages[1] = __('Pop Over updated.', 'popover');
682
- $messages[2] = __('Pop Over not updated.', 'popover');
683
-
684
- $messages[3] = __('Pop Over activated.', 'popover');
685
- $messages[4] = __('Pop Over not activated.', 'popover');
686
-
687
- $messages[5] = __('Pop Over deactivated.', 'popover');
688
- $messages[6] = __('Pop Over not deactivated.', 'popover');
689
-
690
- $messages[7] = __('Pop Over activation toggled.', 'popover');
691
-
692
- $messages[8] = __('Pop Over deleted.', 'popover');
693
- $messages[9] = __('Pop Over not deleted.', 'popover');
694
-
695
- $messages[10] = __('Pop Over added.', 'popover');
696
- $messages[11] = __('Pop Over not added.', 'popover');
697
- ?>
698
- <div class='wrap'>
699
- <div class="icon32" id="icon-themes"><br></div>
700
- <h2><?php _e('Edit Pop Overs', 'popover'); ?><a class="add-new-h2" href="admin.php?page=<?php echo $page; ?>&action=add"><?php _e('Add New', 'membership'); ?></a></h2>
701
-
702
- <?php
703
- if (isset($_GET['msg'])) {
704
- echo '<div id="message" class="updated fade"><p>' . $messages[(int) $_GET['msg']] . '</p></div>';
705
- $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
706
- }
707
- ?>
708
-
709
- <form method="get" action="?page=<?php echo esc_attr($page); ?>" id="posts-filter">
710
-
711
- <input type='hidden' name='page' value='<?php echo esc_attr($page); ?>' />
712
-
713
- <div class="tablenav">
714
-
715
- <div class="alignleft actions">
716
- <select name="action">
717
- <option selected="selected" value=""><?php _e('Bulk Actions', 'popover'); ?></option>
718
- <option value="toggle"><?php _e('Toggle activation', 'popover'); ?></option>
719
- </select>
720
- <input type="submit" class="button-secondary action" id="doaction" name="doaction" value="<?php _e('Apply', 'popover'); ?>">
721
-
722
- </div>
723
-
724
- <div class="alignright actions"></div>
725
-
726
- <br class="clear">
727
- </div>
728
-
729
- <div class="clear"></div>
730
-
731
- <?php
732
- wp_original_referer_field(true, 'previous');
733
- wp_nonce_field('bulk-popovers');
734
-
735
- $columns = array("name" => __('Pop Over Name', 'popover'),
736
- "rules" => __('Conditions', 'popover'),
737
- "active" => __('Active', 'popover')
738
- );
739
-
740
- $columns = apply_filters('popover_columns', $columns);
741
-
742
- $popovers = $this->get_popovers();
743
- ?>
744
-
745
- <table cellspacing="0" class="widefat fixed" id="dragtable">
746
- <thead>
747
- <tr>
748
-
749
- <th style="width: 20px;" class="manage-column column-drag" id="cb" scope="col"></th>
750
- <th style="" class="manage-column column-cb check-column" id="cb" scope="col"><input type="checkbox"></th>
751
-
752
- <?php
753
- foreach ($columns as $key => $col) {
754
- ?>
755
- <th style="" class="manage-column column-<?php echo $key; ?>" id="<?php echo $key; ?>" scope="col"><?php echo $col; ?></th>
756
- <?php
757
- }
758
- ?>
759
- </tr>
760
- </thead>
761
-
762
- <tfoot>
763
- <tr>
764
-
765
- <th style="" class="manage-column column-drag" scope="col"></th>
766
- <th style="" class="manage-column column-cb check-column" scope="col"><input type="checkbox"></th>
767
-
768
- <?php
769
- reset($columns);
770
- foreach ($columns as $key => $col) {
771
- ?>
772
- <th style="" class="manage-column column-<?php echo $key; ?>" id="<?php echo $key; ?>" scope="col"><?php echo $col; ?></th>
773
- <?php
774
- }
775
- ?>
776
- </tr>
777
- </tfoot>
778
-
779
- <tbody id='dragbody'>
780
- <?php
781
- if ($popovers) {
782
- $popovercount = 0;
783
- foreach ($popovers as $key => $popover) {
784
- ?>
785
- <tr valign="middle" class="alternate draghandle" id="<?php echo $popover->id; ?>">
786
-
787
- <td class="check-drag" scope="row">
788
- &nbsp;
789
- </td>
790
- <td class="check-column" scope="row"><input type="checkbox" value="<?php echo $popover->id; ?>" name="popovercheck[]"></td>
791
-
792
- <td class="column-name">
793
- <strong><a href='<?php echo "?page=" . $page . "&amp;action=edit&amp;popover=" . $popover->id . ""; ?>'><?php echo esc_html($popover->popover_title); ?></a></strong>
794
- <?php
795
- $actions = array();
796
-
797
- $actions['edit'] = "<span class='edit'><a href='?page=" . $page . "&amp;action=edit&amp;popover=" . $popover->id . "'>" . __('Edit', 'popover') . "</a></span>";
798
-
799
- if ($popover->popover_active) {
800
- $actions['toggle'] = "<span class='edit activate'><a href='" . wp_nonce_url("?page=" . $page . "&amp;action=deactivate&amp;popover=" . $popover->id . "", 'toggle-popover-' . $popover->id) . "'>" . __('Deactivate', 'popover') . "</a></span>";
801
- } else {
802
- $actions['toggle'] = "<span class='edit deactivate'><a href='" . wp_nonce_url("?page=" . $page . "&amp;action=activate&amp;popover=" . $popover->id . "", 'toggle-popover-' . $popover->id) . "'>" . __('Activate', 'popover') . "</a></span>";
803
- }
804
-
805
- $actions['delete'] = "<span class='delete'><a href='" . wp_nonce_url("?page=" . $page . "&amp;action=delete&amp;popover=" . $popover->id . "", 'delete-popover-' . $popover->id) . "'>" . __('Delete', 'popover') . "</a></span>";
806
- ?>
807
- <br><div class="row-actions"><?php echo implode(" | ", $actions); ?></div>
808
- </td>
809
-
810
- <td class="column-name">
811
- <?php
812
- $p = maybe_unserialize($popover->popover_settings);
813
- $rules = $p['popover_check'];
814
- foreach ((array) $rules as $key => $value) {
815
- if ($key == 'order') {
816
- continue;
817
- }
818
- switch ($key) {
819
-
820
- case 'supporter': _e('Site is not a Pro-site', 'popover');
821
- break;
822
-
823
- case 'isloggedin': _e('Visitor is logged in', 'popover');
824
- break;
825
-
826
- case 'loggedin': _e('Visitor is not logged in', 'popover');
827
- break;
828
-
829
- case 'commented': _e('Visitor has never commented', 'popover');
830
- break;
831
-
832
- case 'searchengine': _e('Visit via a search engine', 'popover');
833
- break;
834
-
835
- case 'internal': _e('Visit not via an Internal link', 'popover');
836
- break;
837
-
838
- case 'referrer': _e('Visit via specific referer', 'popover');
839
- break;
840
-
841
- case 'count': _e('Popover shown less than x times', 'popover');
842
- break;
843
-
844
- case 'onurl': _e('On specific URL', 'popover');
845
- break;
846
-
847
- case 'notonurl': _e('Not on specific URL', 'popover');
848
- break;
849
-
850
- case 'incountry': _e('In a specific country', 'popover');
851
- break;
852
-
853
- case 'notincountry': _e('Not in a specific country', 'popover');
854
- break;
855
-
856
- default: echo apply_filters('popover_nice_rule_name', $key);
857
- break;
858
- }
859
- echo "<br/>";
860
- }
861
- ?>
862
- </td>
863
- <td class="column-active">
864
- <?php
865
- if ($popover->popover_active) {
866
- echo "<strong>" . __('Active', 'popover') . "</strong>";
867
- } else {
868
- echo __('Inactive', 'popover');
869
- }
870
- ?>
871
- </td>
872
- </tr>
873
- <?php
874
- }
875
- } else {
876
- $columncount = count($columns) + 2;
877
- ?>
878
- <tr valign="middle" class="alternate" >
879
- <td colspan="<?php echo $columncount; ?>" scope="row"><?php _e('No Pop Overs were found.', 'popover'); ?></td>
880
- </tr>
881
- <?php
882
- }
883
- ?>
884
-
885
- </tbody>
886
- </table>
887
-
888
-
889
- <div class="tablenav">
890
-
891
- <div class="alignleft actions">
892
- <select name="action2">
893
- <option selected="selected" value=""><?php _e('Bulk Actions', 'popover'); ?></option>
894
- <option value="toggle"><?php _e('Toggle activation', 'popover'); ?></option>
895
- </select>
896
- <input type="submit" class="button-secondary action" id="doaction2" name="doaction2" value="<?php _e('Apply', 'popover'); ?>">
897
- </div>
898
- <div class="alignright actions"></div>
899
- <br class="clear">
900
- </div>
901
-
902
- </form>
903
-
904
- </div> <!-- wrap -->
905
- <?php
906
- }
907
-
908
- function handle_popover_edit_panel($id = false) {
909
-
910
- global $page;
911
-
912
- if (function_exists('get_site_option') && defined('PO_GLOBAL') && PO_GLOBAL == true) {
913
- $updateoption = 'update_site_option';
914
- $getoption = 'get_site_option';
915
- } else {
916
- $updateoption = 'update_option';
917
- $getoption = 'get_option';
918
- }
919
-
920
-
921
- if ($id !== false) {
922
- $popover = $this->get_popover($id);
923
-
924
- $popover->popover_settings = unserialize($popover->popover_settings);
925
- } else {
926
- $popover = new stdClass;
927
- $popover->popover_title = __('New Pop Over', 'popover');
928
- $popover->popover_content = "";
929
- }
930
-
931
- $popover_title = stripslashes($popover->popover_title);
932
-
933
- $popover_content = stripslashes($popover->popover_content);
934
-
935
- if (empty($popover->popover_settings)) {
936
- $popover->popover_settings = array('popover_size' => array('width' => '500px', 'height' => '200px'),
937
- 'popover_location' => array('left' => '100px', 'top' => '100px'),
938
- 'popover_colour' => array('back' => 'FFFFFF', 'fore' => '000000'),
939
- 'popover_margin' => array('left' => '0px', 'top' => '0px', 'right' => '0px', 'bottom' => '0px'),
940
- 'popover_check' => array(),
941
- 'popover_ereg' => '',
942
- 'popover_count' => 3,
943
- 'popover_usejs' => 'no'
944
- );
945
- }
946
-
947
- $popover_size = $popover->popover_settings['popover_size'];
948
- $popover_location = $popover->popover_settings['popover_location'];
949
- $popover_colour = $popover->popover_settings['popover_colour'];
950
- $popover_margin = $popover->popover_settings['popover_margin'];
951
-
952
- $popover_size = $this->sanitise_array($popover_size);
953
- $popover_location = $this->sanitise_array($popover_location);
954
- $popover_colour = $this->sanitise_array($popover_colour);
955
- $popover_margin = $this->sanitise_array($popover_margin);
956
-
957
- $popover_check = $popover->popover_settings['popover_check'];
958
- $popover_ereg = $popover->popover_settings['popover_ereg'];
959
- $popover_count = $popover->popover_settings['popover_count'];
960
-
961
- $popover_usejs = $popover->popover_settings['popover_usejs'];
962
-
963
- $popoverstyle = (isset($popover->popover_settings['popover_style'])) ? $popover->popover_settings['popover_style'] : '';
964
-
965
- $popover_hideforever = (isset($popover->popover_settings['popoverhideforeverlink'])) ? $popover->popover_settings['popoverhideforeverlink'] : '';
966
-
967
- $popover_delay = (isset($popover->popover_settings['popoverdelay'])) ? $popover->popover_settings['popoverdelay'] : '';
968
-
969
- $popover_onurl = (isset($popover->popover_settings['onurl'])) ? $popover->popover_settings['onurl'] : '';
970
- $popover_notonurl = (isset($popover->popover_settings['notonurl'])) ? $popover->popover_settings['notonurl'] : '';
971
-
972
- $popover_incountry = (isset($popover->popover_settings['incountry'])) ? $popover->popover_settings['incountry'] : '';
973
- $popover_notincountry = (isset($popover->popover_settings['notincountry'])) ? $popover->popover_settings['notincountry'] : '';
974
-
975
- $popover_onurl = $this->sanitise_array($popover_onurl);
976
- $popover_notonurl = $this->sanitise_array($popover_notonurl);
977
- ?>
978
- <div class='wrap nosubsub'>
979
- <div class="icon32" id="icon-themes"><br></div>
980
- <?php if ($id !== false) { ?>
981
- <h2><?php echo __('Edit Pop Over', 'popover'); ?></h2>
982
- <?php } else { ?>
983
- <h2><?php echo __('Add Pop Over', 'popover'); ?></h2>
984
- <?php } ?>
985
- <div class='popover-liquid-left'>
986
-
987
- <div id='popover-left'>
988
- <form action='?page=<?php echo $page; ?>' name='popoveredit' method='post'>
989
-
990
- <input type='hidden' name='id' id='id' value='<?php echo $id; ?>' />
991
- <input type='hidden' name='beingdragged' id='beingdragged' value='' />
992
- <input type='hidden' name='popovercheck[order]' id='in-positive-rules' value='<?php echo esc_attr($popover_check['order']); ?>' />
993
-
994
- <div id='edit-popover' class='popover-holder-wrap'>
995
- <div class='sidebar-name no-movecursor'>
996
- <h3><?php echo __('Pop Over Settings', 'popover'); ?></h3>
997
- </div>
998
- <div class='popover-holder'>
999
-
1000
- <div class='popover-details'>
1001
-
1002
- <label for='popover_title'><?php _e('Popover title', 'popover'); ?></label><br/>
1003
- <input name='popover_title' id='popover_title' style='width: 97%; border: 1px solid; border-color: #DFDFDF;' value='<?php echo stripslashes($popover_title); ?>' /><br/><br/>
1004
-
1005
- <label for='popovercontent'><?php _e('Popover content', 'popover'); ?></label><br/>
1006
- <?php
1007
- $args = array("textarea_name" => "popover_content", "textarea_rows" => 5);
1008
- wp_editor(stripslashes($popover_content), "popover_content", $args);
1009
- /*
1010
- ?>
1011
- <textarea name='popover_content' id='popover_content' style='width: 98%' rows='5' cols='10'><?php echo stripslashes($popover_content); ?></textarea>
1012
- <?php
1013
- */
1014
- ?>
1015
- </div>
1016
-
1017
- <h3><?php _e('Active conditions', 'popover'); ?></h3>
1018
- <p class='description'><?php _e('These are the rules that will determine if a popover should show when a visitor arrives at your website ALL rules must be true for the popover to show.', 'popover'); ?></p>
1019
- <div id='positive-rules-holder'>
1020
- <?php
1021
- if (!empty($popover_check['order'])) {
1022
- $order = explode(',', $popover_check['order']);
1023
- } else {
1024
- $order = array();
1025
- }
1026
-
1027
- foreach ($order as $key) {
1028
-
1029
- switch ($key) {
1030
-
1031
- case 'supporter': if (function_exists('is_pro_site'))
1032
- $this->admin_main('supporter', 'Site is not a Pro-site', 'Shows the popover if the site is not a Pro-site.', true);
1033
- break;
1034
-
1035
- case 'isloggedin': $this->admin_main('isloggedin', 'Visitor is logged in', 'Shows the popover if the user is logged in to your site.', true);
1036
- break;
1037
- case 'loggedin': $this->admin_main('loggedin', 'Visitor is not logged in', 'Shows the popover if the user is <strong>not</strong> logged in to your site.', true);
1038
- break;
1039
- case 'commented': $this->admin_main('commented', 'Visitor has never commented', 'Shows the popover if the user has never left a comment.', true);
1040
- break;
1041
- case 'searchengine': $this->admin_main('searchengine', 'Visit via a search engine', 'Shows the popover if the user arrived via a search engine.', true);
1042
- break;
1043
- case 'internal': $this->admin_main('internal', 'Visit not via an Internal link', 'Shows the popover if the user did not arrive on this page via another page on your site.', true);
1044
- break;
1045
- case 'referrer': $this->admin_referer('referrer', 'Visit via specific referer', 'Shows the popover if the user arrived via the following referrer:', $popover_ereg);
1046
- break;
1047
- case 'count': $this->admin_viewcount('count', 'Popover shown less than', 'Shows the popover if the user has only seen it less than the following number of times:', $popover_count);
1048
- break;
1049
- case 'onurl': $this->admin_urllist('onurl', 'On specific URL', 'Shows the popover if the user is on a certain URL (enter one URL per line)', $popover_onurl);
1050
- break;
1051
- case 'notonurl': $this->admin_urllist('notonurl', 'Not on specific URL', 'Shows the popover if the user is not on a certain URL (enter one URL per line)', $popover_notonurl);
1052
- break;
1053
- case 'incountry': $this->admin_countrylist('incountry', 'In a specific Country', 'Shows the popover if the user is in a certain country.', $popover_incountry);
1054
- break;
1055
- case 'notincountry': $this->admin_countrylist('notincountry', 'Not in a specific Country', 'Shows the popover if the user is not in a certain country.', $popover_notincountry);
1056
- break;
1057
-
1058
- default: do_action('popover_active_rule_' . $key);
1059
- do_action('popover_active_rule', $key);
1060
- break;
1061
- }
1062
- }
1063
- ?>
1064
- </div>
1065
- <div id='positive-rules' class='droppable-rules popovers-sortable'>
1066
- <?php _e('Drop here', 'membership'); ?>
1067
- </div>
1068
-
1069
- <h3><?php _e('Appearance settings', 'popover'); ?></h3>
1070
- <table class='form-table' style=''>
1071
- <tr>
1072
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Pop Over Size', 'popover'); ?></strong></th>
1073
- <td valign='top'>
1074
- <?php _e('Width:', 'popover'); ?>&nbsp;
1075
- <input type='text' name='popoverwidth' id='popoverwidth' style='width: 5em;' value='<?php echo $popover_size['width']; ?>' />&nbsp;
1076
- <?php _e('Height:', 'popover'); ?>&nbsp;
1077
- <input type='text' name='popoverheight' id='popoverheight' style='width: 5em;' value='<?php echo $popover_size['height']; ?>' />
1078
- </td>
1079
- </tr>
1080
-
1081
- <tr>
1082
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Pop Over Position', 'popover'); ?></strong></th>
1083
- <td valign='top'>
1084
- <?php _e('Left:', 'popover'); ?>&nbsp;
1085
- <input type='text' name='popoverleft' id='popoverleft' style='width: 5em;' value='<?php echo $popover_location['left']; ?>' />&nbsp;
1086
- <?php _e('Top:', 'popover'); ?>&nbsp;
1087
- <input type='text' name='popovertop' id='popovertop' style='width: 5em;' value='<?php echo $popover_location['top']; ?>' />
1088
- </td>
1089
- </tr>
1090
-
1091
- <tr>
1092
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Pop Over Margins', 'popover'); ?></strong></th>
1093
- <td valign='top'>
1094
- <?php _e('Left:', 'popover'); ?>&nbsp;
1095
- <input type='text' name='popovermarginleft' style='width: 5em;' value='<?php echo $popover_margin['left']; ?>' />&nbsp;
1096
- <?php _e('Right:', 'popover'); ?>&nbsp;
1097
- <input type='text' name='popovermarginright' style='width: 5em;' value='<?php echo $popover_margin['right']; ?>' /><br/>
1098
- <?php _e('Top:', 'popover'); ?>&nbsp;
1099
- <input type='text' name='popovermargintop' style='width: 5em;' value='<?php echo $popover_margin['top']; ?>' />&nbsp;
1100
- <?php _e('Bottom:', 'popover'); ?>&nbsp;
1101
- <input type='text' name='popovermarginbottom' style='width: 5em;' value='<?php echo $popover_margin['bottom']; ?>' />
1102
- </td>
1103
- </tr>
1104
-
1105
- <tr>
1106
- <th valign='top' scope='row' style='width: 25%;'>&nbsp;</th>
1107
- <td valign='top'>
1108
- <?php _e('or use Javascript to resize and center the popover', 'popover'); ?>&nbsp;<input type='checkbox' name='popoverusejs' id='popoverusejs' value='yes' <?php if ($popover_usejs == 'yes') echo "checked='checked'"; ?> />
1109
- </td>
1110
- </tr>
1111
-
1112
- </table>
1113
- <table class='form-table'>
1114
-
1115
- <tr>
1116
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Background Color', 'popover'); ?></strong></th>
1117
- <td valign='top'>
1118
- <?php _e('Hex:', 'popover'); ?>&nbsp;#
1119
- <input type='text' name='popoverbackground' id='popoverbackground' style='width: 10em;' value='<?php echo $popover_colour['back']; ?>' />
1120
- </td>
1121
- </tr>
1122
-
1123
- <tr>
1124
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Font Color', 'popover'); ?></strong></th>
1125
- <td valign='top'>
1126
- <?php _e('Hex:', 'popover'); ?>&nbsp;#
1127
- <input type='text' name='popoverforeground' id='popoverforeground' style='width: 10em;' value='<?php echo $popover_colour['fore']; ?>' />
1128
- </td>
1129
- </tr>
1130
-
1131
- </table>
1132
-
1133
- <?php
1134
- $availablestyles = apply_filters('popover_available_styles_directory', array());
1135
-
1136
- if (count($availablestyles) > 1) {
1137
- ?>
1138
- <h3><?php _e('Pop Over Style', 'popover'); ?></h3>
1139
- <table class='form-table'>
1140
-
1141
- <tr>
1142
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Use Style', 'popover'); ?></strong></th>
1143
- <td valign='top'>
1144
- <select name='popoverstyle'>
1145
- <?php
1146
- foreach ((array) $availablestyles as $key => $location) {
1147
- ?>
1148
- <option value='<?php echo $key; ?>' <?php selected($key, $popoverstyle); ?>><?php echo $key; ?></option>
1149
- <?php
1150
- }
1151
- ?>
1152
- </select>
1153
-
1154
- </td>
1155
- </tr>
1156
-
1157
- </table>
1158
- <?php
1159
- } else {
1160
- foreach ((array) $availablestyles as $key => $location) {
1161
- // There's only one - but it's easy to get the key this way :)
1162
- ?>
1163
- <input type='hidden' name='popoverstyle' value='<?php echo $key; ?>' />
1164
- <?php
1165
- }
1166
- }
1167
- ?>
1168
-
1169
- <h3><?php _e('Remove Hide Forever Link', 'popover'); ?></h3>
1170
- <table class='form-table' style=''>
1171
- <tr>
1172
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Remove the "Never see this message again" link', 'popover'); ?></strong></th>
1173
- <td valign='top'>
1174
- <input type='checkbox' name='popoverhideforeverlink' id='popoverhideforeverlink' value='yes' <?php if ($popover_hideforever == 'yes') {
1175
- echo "checked='checked'";
1176
- } ?> />
1177
- </td>
1178
- </tr>
1179
- </table>
1180
-
1181
- <h3><?php _e('Pop over appearance delays', 'popover'); ?></h3>
1182
- <table class='form-table' style=''>
1183
- <tr>
1184
- <th valign='top' scope='row' style='width: 25%;'><strong><?php _e('Show Pop Over', 'popover'); ?></strong></th>
1185
- <td valign='top'>
1186
- <select name='popoverdelay'>
1187
- <option value='immediate' <?php selected('immediate', $popover_delay); ?>><?php _e('immediately', 'popover'); ?></option>
1188
- <?php
1189
- for ($n = 1; $n <= 120; $n++) {
1190
- ?>
1191
- <option value='<?php echo $n; ?>' <?php selected($n, $popover_delay); ?>><?php echo __('after', 'popover') . ' ' . $n . ' ' . __('seconds', 'popover'); ?></option>
1192
- <?php
1193
- }
1194
- ?>
1195
- </select>
1196
- </td>
1197
- </tr>
1198
- </table>
1199
-
1200
- <div class='buttons'>
1201
- <?php
1202
- wp_original_referer_field(true, 'previous');
1203
- wp_nonce_field('update-popover');
1204
- ?>
1205
- <?php if ($id !== false) { ?>
1206
- <input type='submit' value='<?php _e('Update', 'popover'); ?>' class='button-primary' />
1207
- <input type='hidden' name='action' value='updated' />
1208
- <?php } else { ?>
1209
- <input type='submit' value='<?php _e('Add', 'popover'); ?>' class='button' name='add' />&nbsp;<input type='submit' value='<?php _e('Add and Activate', 'popover'); ?>' class='button-primary' name='addandactivate' />
1210
- <input type='hidden' name='action' value='added' />
1211
- <?php } ?>
1212
-
1213
- </div>
1214
-
1215
- </div>
1216
- </div>
1217
- </form>
1218
- </div>
1219
-
1220
-
1221
- <div id='hiden-actions'>
1222
- <?php
1223
- if (!isset($popover_check['supporter']) && function_exists('is_pro_site')) {
1224
- $this->admin_main('supporter', 'Site is not a Pro-site', 'Shows the popover if the site is not a Pro-site.', true);
1225
- }
1226
-
1227
- if (!isset($popover_check['isloggedin'])) {
1228
- $this->admin_main('isloggedin', 'Visitor is logged in', 'Shows the popover if the user is logged in to your site.', true);
1229
- }
1230
-
1231
- if (!isset($popover_check['loggedin'])) {
1232
- $this->admin_main('loggedin', 'Visitor is not logged in', 'Shows the popover if the user is <strong>not</strong> logged in to your site.', true);
1233
- }
1234
-
1235
- if (!isset($popover_check['commented'])) {
1236
- $this->admin_main('commented', 'Visitor has never commented', 'Shows the popover if the user has never left a comment.', true);
1237
- }
1238
-
1239
- if (!isset($popover_check['searchengine'])) {
1240
- $this->admin_main('searchengine', 'Visit via a search engine', 'Shows the popover if the user arrived via a search engine.', true);
1241
- }
1242
-
1243
- if (!isset($popover_check['internal'])) {
1244
- $this->admin_main('internal', 'Visit not via an Internal link', 'Shows the popover if the user did not arrive on this page via another page on your site.', true);
1245
- }
1246
-
1247
- if (!isset($popover_check['referrer'])) {
1248
- $this->admin_referer('referrer', 'Visit via specific referer', 'Shows the popover if the user arrived via the following referrer:', $popover_ereg);
1249
- }
1250
-
1251
- if (!isset($popover_check['onurl'])) {
1252
- $this->admin_urllist('onurl', 'On specific URL', 'Shows the popover if the user is on a certain URL (enter one URL per line)', $popover_onurl);
1253
- }
1254
-
1255
- if (!isset($popover_check['notonurl'])) {
1256
- $this->admin_urllist('notonurl', 'Not on specific URL', 'Shows the popover if the user is not on a certain URL (enter one URL per line)', $popover_notonurl);
1257
- }
1258
-
1259
- if (!isset($popover_check['incountry'])) {
1260
- $this->admin_countrylist('incountry', 'In a specific Country', 'Shows the popover if the user is in a certain country.', $popover_incountry);
1261
- }
1262
-
1263
- if (!isset($popover_check['notincountry'])) {
1264
- $this->admin_countrylist('notincountry', 'Not in a specific Country', 'Shows the popover if the user is not in a certain country.', $popover_notincountry);
1265
- }
1266
-
1267
- //$popover_count
1268
- if (!isset($popover_check['count'])) {
1269
- $this->admin_viewcount('count', 'Popover shown less than', 'Shows the popover if the user has only seen it less than the following number of times:', $popover_count);
1270
- }
1271
-
1272
- do_action('popover_additional_rules_main');
1273
- ?>
1274
- </div> <!-- hidden-actions -->
1275
-
1276
- </div> <!-- popover-liquid-left -->
1277
-
1278
- <div class='popover-liquid-right'>
1279
- <div class="popover-holder-wrap">
1280
-
1281
- <div class="sidebar-name no-movecursor">
1282
- <h3><?php _e('Conditions', 'popover'); ?></h3>
1283
- </div>
1284
- <div class="section-holder" id="sidebar-rules" style="min-height: 98px;">
1285
- <ul class='popovers popovers-draggable'>
1286
- <?php
1287
- if (isset($popover_check['supporter']) && function_exists('is_pro_site')) {
1288
- $this->admin_sidebar('supporter', 'Site is not a Pro-site', 'Shows the popover if the site is not a Pro-site.', true);
1289
- } elseif (function_exists('is_pro_site')) {
1290
- $this->admin_sidebar('supporter', 'Site is not a Pro-site', 'Shows the popover if the site is not a Pro-site.', false);
1291
- }
1292
-
1293
- if (isset($popover_check['isloggedin'])) {
1294
- $this->admin_sidebar('isloggedin', 'Visitor is logged in', 'Shows the popover if the user is logged in to your site.', true);
1295
- } else {
1296
- $this->admin_sidebar('isloggedin', 'Visitor is logged in', 'Shows the popover if the user is logged in to your site.', false);
1297
- }
1298
-
1299
- if (isset($popover_check['loggedin'])) {
1300
- $this->admin_sidebar('loggedin', 'Visitor is not logged in', 'Shows the popover if the user is <strong>not</strong> logged in to your site.', true);
1301
- } else {
1302
- $this->admin_sidebar('loggedin', 'Visitor is not logged in', 'Shows the popover if the user is <strong>not</strong> logged in to your site.', false);
1303
- }
1304
-
1305
- if (isset($popover_check['commented'])) {
1306
- $this->admin_sidebar('commented', 'Visitor has never commented', 'Shows the popover if the user has never left a comment.', true);
1307
- } else {
1308
- $this->admin_sidebar('commented', 'Visitor has never commented', 'Shows the popover if the user has never left a comment.', false);
1309
- }
1310
-
1311
- if (isset($popover_check['searchengine'])) {
1312
- $this->admin_sidebar('searchengine', 'Visit via a search engine', 'Shows the popover if the user arrived via a search engine.', true);
1313
- } else {
1314
- $this->admin_sidebar('searchengine', 'Visit via a search engine', 'Shows the popover if the user arrived via a search engine.', false);
1315
- }
1316
-
1317
- if (isset($popover_check['internal'])) {
1318
- $this->admin_sidebar('internal', 'Visit not via an Internal link', 'Shows the popover if the user did not arrive on this page via another page on your site.', true);
1319
- } else {
1320
- $this->admin_sidebar('internal', 'Visit not via an Internal link', 'Shows the popover if the user did not arrive on this page via another page on your site.', false);
1321
- }
1322
-
1323
- if (isset($popover_check['referrer'])) {
1324
- $this->admin_sidebar('referrer', 'Visit via specific referer', 'Shows the popover if the user arrived via a specific referrer.', true);
1325
- } else {
1326
- $this->admin_sidebar('referrer', 'Visit via specific referer', 'Shows the popover if the user arrived via a specific referrer.', false);
1327
- }
1328
-
1329
- if (isset($popover_check['count'])) {
1330
- $this->admin_sidebar('count', 'Popover shown less than', 'Shows the popover if the user has only seen it less than a specific number of times.', true);
1331
- } else {
1332
- $this->admin_sidebar('count', 'Popover shown less than', 'Shows the popover if the user has only seen it less than a specific number of times.', false);
1333
- }
1334
-
1335
- if (isset($popover_check['onurl'])) {
1336
- $this->admin_sidebar('onurl', 'On specific URL', 'Shows the popover if the user is on a certain URL.', true);
1337
- } else {
1338
- $this->admin_sidebar('onurl', 'On specific URL', 'Shows the popover if the user is on a certain URL.', false);
1339
- }
1340
-
1341
- if (isset($popover_check['notonurl'])) {
1342
- $this->admin_sidebar('notonurl', 'Not on specific URL', 'Shows the popover if the user is not on a certain URL.', true);
1343
- } else {
1344
- $this->admin_sidebar('notonurl', 'Not on specific URL', 'Shows the popover if the user is not on a certain URL.', false);
1345
- }
1346
-
1347
- do_action('popover_additional_rules_sidebar');
1348
- ?>
1349
- </ul>
1350
- </div>
1351
-
1352
- </div> <!-- popover-holder-wrap -->
1353
-
1354
- </div> <!-- popover-liquid-left -->
1355
-
1356
- </div> <!-- wrap -->
1357
-
1358
- <?php
1359
- }
1360
-
1361
- function admin_sidebar($id, $title, $message, $data = false) {
1362
- ?>
1363
- <li class='popover-draggable' id='<?php echo $id; ?>' <?php if ($data === true) echo "style='display:none;'"; ?>>
1364
-
1365
- <div class='action action-draggable'>
1366
- <div class='action-top closed'>
1367
- <a href="#available-actions" class="action-button hide-if-no-js"></a>
1368
- <?php _e($title, 'popover'); ?>
1369
- </div>
1370
- <div class='action-body closed'>
1371
- <?php if (!empty($message)) { ?>
1372
- <p>
1373
- <?php _e($message, 'popover'); ?>
1374
- </p>
1375
- <?php } ?>
1376
- <p>
1377
- <a href='#addtopopover' class='action-to-popover' title='<?php _e('Add this rule to the popover.', 'popover'); ?>'><?php _e('Add this rule to the popover.', 'popover'); ?></a>
1378
- </p>
1379
- </div>
1380
- </div>
1381
-
1382
- </li>
1383
- <?php
1384
- }
1385
-
1386
- function admin_main($id, $title, $message, $data = false) {
1387
- if (!$data)
1388
- $data = array();
1389
- ?>
1390
- <div class='popover-operation' id='main-<?php echo $id; ?>'>
1391
- <h2 class='sidebar-name'><?php _e($title, 'popover'); ?><span><a href='#remove' class='removelink' id='remove-<?php echo $id; ?>' title='<?php _e("Remove $title tag from this rules area.", 'popover'); ?>'><?php _e('Remove', 'popover'); ?></a></span></h2>
1392
- <div class='inner-operation'>
1393
- <p><?php _e($message, 'popover'); ?></p>
1394
- <input type='hidden' name='popovercheck[<?php echo $id; ?>]' value='yes' />
1395
- </div>
1396
- </div>
1397
- <?php
1398
- }
1399
-
1400
- function admin_referer($id, $title, $message, $data = false) {
1401
- if (!$data)
1402
- $data = ''
1403
- ?>
1404
- <div class='popover-operation' id='main-<?php echo $id; ?>'>
1405
- <h2 class='sidebar-name'><?php _e($title, 'popover'); ?><span><a href='#remove' class='removelink' id='remove-<?php echo $id; ?>' title='<?php _e("Remove $title tag from this rules area.", 'popover'); ?>'><?php _e('Remove', 'popover'); ?></a></span></h2>
1406
- <div class='inner-operation'>
1407
- <p><?php _e($message, 'popover'); ?></p>
1408
- <input type='text' name='popoverereg' id='popoverereg' style='width: 10em;' value='<?php echo esc_html($data); ?>' />
1409
- <input type='hidden' name='popovercheck[<?php echo $id; ?>]' value='yes' />
1410
- </div>
1411
- </div>
1412
- <?php
1413
- }
1414
-
1415
- function admin_viewcount($id, $title, $message, $data = false) {
1416
- if (!$data)
1417
- $data = '';
1418
- ?>
1419
- <div class='popover-operation' id='main-<?php echo $id; ?>'>
1420
- <h2 class='sidebar-name'><?php _e($title, 'popover'); ?><span><a href='#remove' class='removelink' id='remove-<?php echo $id; ?>' title='<?php _e("Remove $title tag from this rules area.", 'popover'); ?>'><?php _e('Remove', 'popover'); ?></a></span></h2>
1421
- <div class='inner-operation'>
1422
- <p><?php _e($message, 'popover'); ?></p>
1423
- <input type='text' name='popovercount' id='popovercount' style='width: 5em;' value='<?php echo esc_html($data); ?>' />&nbsp;
1424
- <?php _e('times', 'popover'); ?>
1425
- <input type='hidden' name='popovercheck[<?php echo $id; ?>]' value='yes' />
1426
- </div>
1427
- </div>
1428
- <?php
1429
- }
1430
-
1431
- function admin_urllist($id, $title, $message, $data = false) {
1432
- if (!$data)
1433
- $data = array();
1434
-
1435
- $data = implode("\n", $data);
1436
- ?>
1437
- <div class='popover-operation' id='main-<?php echo $id; ?>'>
1438
- <h2 class='sidebar-name'><?php _e($title, 'popover'); ?><span><a href='#remove' class='removelink' id='remove-<?php echo $id; ?>' title='<?php _e("Remove $title tag from this rules area.", 'popover'); ?>'><?php _e('Remove', 'popover'); ?></a></span></h2>
1439
- <div class='inner-operation'>
1440
- <p><?php _e($message, 'popover'); ?></p>
1441
- <textarea name='popover<?php echo $id; ?>' id='popover<?php echo $id; ?>' style=''><?php echo esc_html($data); ?></textarea>
1442
- <input type='hidden' name='popovercheck[<?php echo $id; ?>]' value='yes' />
1443
- </div>
1444
- </div>
1445
- <?php
1446
- }
1447
-
1448
- function admin_countrylist($id, $title, $message, $data = false) {
1449
- if (!$data)
1450
- $data = '';
1451
- ?>
1452
- <div class='popover-operation' id='main-<?php echo $id; ?>'>
1453
- <h2 class='sidebar-name'><?php _e($title, 'popover'); ?><span><a href='#remove' class='removelink' id='remove-<?php echo $id; ?>' title='<?php _e("Remove $title tag from this rules area.", 'popover'); ?>'><?php _e('Remove', 'popover'); ?></a></span></h2>
1454
- <div class='inner-operation'>
1455
- <p><?php _e($message, 'popover'); ?></p>
1456
- <?php $countries = P_CountryList(); ?>
1457
- <select name='popover<?php echo $id; ?>' id='popover<?php echo $id; ?>' style=''>
1458
- <option value='' <?php selected('', $data); ?>><?php _e('Select a country from the list below', 'popover') ?></option>
1459
- <?php
1460
- foreach ((array) $countries as $code => $country) {
1461
- ?>
1462
- <option value='<?php echo $code; ?>' <?php selected($code, $data); ?>><?php echo $country; ?></option>
1463
- <?php
1464
- }
1465
- ?>
1466
- </select>
1467
- <input type='hidden' name='popovercheck[<?php echo $id; ?>]' value='yes' />
1468
- </div>
1469
- </div>
1470
- <?php
1471
- }
1472
-
1473
- function handle_admin_panelold() {
1474
-
1475
- global $allowedposttags;
1476
-
1477
- if (is_multisite() && defined('PO_GLOBAL')) {
1478
- $updateoption = 'update_site_option';
1479
- $getoption = 'get_site_option';
1480
- } else {
1481
- $updateoption = 'update_option';
1482
- $getoption = 'get_option';
1483
- }
1484
-
1485
- if (isset($_POST['action']) && addslashes($_POST['action']) == 'updatepopover') {
1486
-
1487
- //print_r($_POST);
1488
-
1489
- if (isset($_POST['popovercontent'])) {
1490
- if (defined('PO_USEKSES')) {
1491
- $updateoption('popover_content', wp_kses($_POST['popovercontent'], $allowedposttags));
1492
- } else {
1493
- $updateoption('popover_content', $_POST['popovercontent']);
1494
- }
1495
- }
1496
-
1497
- if (isset($_POST['popoverwidth']) || isset($_POST['popoverheight'])) {
1498
-
1499
- $width = $_POST['popoverwidth'];
1500
- $height = $_POST['popoverheight'];
1501
-
1502
- if ($width == '')
1503
- $width = '500px';
1504
- if ($height == '')
1505
- $height = '200px';
1506
-
1507
- $updateoption('popover_size', array("width" => $width, "height" => $height));
1508
- }
1509
-
1510
- if (isset($_POST['popoverleft']) || isset($_POST['popovertop'])) {
1511
-
1512
- $left = $_POST['popoverleft'];
1513
- $top = $_POST['popovertop'];
1514
-
1515
- if ($left == '')
1516
- $left = '100px';
1517
- if ($top == '')
1518
- $top = '100px';
1519
-
1520
- $updateoption('popover_location', array("left" => $left, "top" => $top));
1521
- }
1522
-
1523
- if (isset($_POST['popovermargintop']) || isset($_POST['popovermarginleft']) || isset($_POST['popovermarginright']) || isset($_POST['popovermarginbottom'])) {
1524
-
1525
- $mleft = $_POST['popovermarginleft'];
1526
- $mtop = $_POST['popovermargintop'];
1527
- $mright = $_POST['popovermarginright'];
1528
- $mbottom = $_POST['popovermarginbottom'];
1529
-
1530
- if ($mleft == '')
1531
- $mleft = '0px';
1532
- if ($mtop == '')
1533
- $mtop = '0px';
1534
- if ($mright == '')
1535
- $mright = '0px';
1536
- if ($mbottom == '')
1537
- $mbottom = '0px';
1538
-
1539
- $updateoption('popover_margin', array('left' => $mleft, 'top' => $mtop, 'right' => $mright, 'bottom' => $mbottom));
1540
- }
1541
-
1542
- if (isset($_POST['popoverbackground']) || isset($_POST['popoverforeground'])) {
1543
-
1544
- $back = $_POST['popoverbackground'];
1545
- $fore = $_POST['popoverforeground'];
1546
-
1547
- if ($back == '')
1548
- $back = 'FFFFFF';
1549
- if ($fore == '')
1550
- $fore = '000000';
1551
-
1552
- $updateoption('popover_colour', array("back" => $back, "fore" => $fore));
1553
- }
1554
-
1555
- if (isset($_POST['popovercheck'])) {
1556
-
1557
- $updateoption('popover_check', $_POST['popovercheck']);
1558
-
1559
- if (isset($_POST['popoverereg'])) {
1560
- $updateoption('popover_ereg', $_POST['popoverereg']);
1561
- }
1562
-
1563
- if (isset($_POST['popovercount'])) {
1564
- $updateoption('popover_count', intval($_POST['popovercount']));
1565
- }
1566
- }
1567
-
1568
- if (isset($_POST['popoverusejs'])) {
1569
- $updateoption('popover_usejs', 'yes');
1570
- } else {
1571
- $updateoption('popover_usejs', 'no');
1572
- }
1573
-
1574
- echo '<div id="message" class="updated fade"><p>' . __('Your settings have been saved.', 'popover') . '</p></div>';
1575
- }
1576
-
1577
- $popover_content = stripslashes($getoption('popover_content', ''));
1578
- $popover_size = $getoption('popover_size', array('width' => '500px', 'height' => '200px'));
1579
- $popover_location = $getoption('popover_location', array('left' => '100px', 'top' => '100px'));
1580
- $popover_colour = $getoption('popover_colour', array('back' => 'FFFFFF', 'fore' => '000000'));
1581
- $popover_margin = $getoption('popover_margin', array('left' => '0px', 'top' => '0px', 'right' => '0px', 'bottom' => '0px'));
1582
-
1583
- $popover_size = $this->sanitise_array($popover_size);
1584
- $popover_location = $this->sanitise_array($popover_location);
1585
- $popover_colour = $this->sanitise_array($popover_colour);
1586
- $popover_margin = $this->sanitise_array($popover_margin);
1587
-
1588
- $popover_check = $getoption('popover_check', array());
1589
- $popover_ereg = $getoption('popover_ereg', '');
1590
- $popover_count = $getoption('popover_count', '3');
1591
-
1592
- $popover_usejs = $getoption('popover_usejs', 'no');
1593
- ?>
1594
-
1595
- <div class='wrap'>
1596
-
1597
- <form action='' method='post'>
1598
- <input type='hidden' name='action' value='updatepopover' />
1599
- <?php wp_nonce_field('updatepopover'); ?>
1600
-
1601
- <h2><?php _e('Pop Over content settings', 'popover'); ?></h2>
1602
- <p><?php _e('Use the settings below to modify the content of your pop over and the rules that will determine when, or if, it will be displayed.', 'popover'); ?></p>
1603
-
1604
- <h3><?php _e('Pop Over content', 'popover'); ?></h3>
1605
- <p><?php _e('Enter the content for your pop over in the text area below. HTML is allowed.', 'popover'); ?></p>
1606
- <textarea name='popovercontent' id='popovercontent' style='width: 90%' rows='10' cols='10'><?php echo stripslashes($popover_content); ?></textarea>
1607
-
1608
- <p class="submit">
1609
- <input class="button" type="submit" name="go" value="<?php _e('Update content', 'popover'); ?>" />
1610
- </p>
1611
-
1612
- <h3><?php _e('Pop Over display settings', 'popover'); ?></h3>
1613
- <p><?php _e('Use the options below to determine the look, and display settings for the Pop Over.', 'popover'); ?></p>
1614
-
1615
- <table class='form-table'>
1616
-
1617
- <tr>
1618
- <td valign='top' width='49%'>
1619
- <h3><?php _e('Appearance Settings', 'popover'); ?></h3>
1620
-
1621
- <table class='form-table' style='border: 1px solid #ccc; padding-top: 10px; padding-bottom: 10px; margin-bottom: 10px;'>
1622
- <tr>
1623
- <th valign='top' scope='row' style='width: 25%;'><?php _e('Pop Over Size', 'popover'); ?></th>
1624
- <td valign='top'>
1625
- <?php _e('Width:', 'popover'); ?>&nbsp;
1626
- <input type='text' name='popoverwidth' id='popoverwidth' style='width: 5em;' value='<?php echo $popover_size['width']; ?>' />&nbsp;
1627
- <?php _e('Height:', 'popover'); ?>&nbsp;
1628
- <input type='text' name='popoverheight' id='popoverheight' style='width: 5em;' value='<?php echo $popover_size['height']; ?>' />
1629
- </td>
1630
- </tr>
1631
-
1632
- <tr>
1633
- <th valign='top' scope='row' style='width: 25%;'><?php _e('Pop Over Position', 'popover'); ?></th>
1634
- <td valign='top'>
1635
- <?php _e('Left:', 'popover'); ?>&nbsp;
1636
- <input type='text' name='popoverleft' id='popoverleft' style='width: 5em;' value='<?php echo $popover_location['left']; ?>' />&nbsp;
1637
- <?php _e('Top:', 'popover'); ?>&nbsp;
1638
- <input type='text' name='popovertop' id='popovertop' style='width: 5em;' value='<?php echo $popover_location['top']; ?>' />
1639
- </td>
1640
- </tr>
1641
-
1642
- <tr>
1643
- <th valign='top' scope='row' style='width: 25%;'><?php _e('Pop Over Margins', 'popover'); ?></th>
1644
- <td valign='top'>
1645
- <?php _e('Left:', 'popover'); ?>&nbsp;
1646
- <input type='text' name='popovermarginleft' style='width: 5em;' value='<?php echo $popover_margin['left']; ?>' />&nbsp;
1647
- <?php _e('Right:', 'popover'); ?>&nbsp;
1648
- <input type='text' name='popovermarginright' style='width: 5em;' value='<?php echo $popover_margin['right']; ?>' /><br/>
1649
- <?php _e('Top:', 'popover'); ?>&nbsp;
1650
- <input type='text' name='popovermargintop' style='width: 5em;' value='<?php echo $popover_margin['top']; ?>' />&nbsp;
1651
- <?php _e('Bottom:', 'popover'); ?>&nbsp;
1652
- <input type='text' name='popovermarginbottom' style='width: 5em;' value='<?php echo $popover_margin['bottom']; ?>' />
1653
- </td>
1654
- </tr>
1655
-
1656
- <tr>
1657
- <th valign='top' scope='row' style='width: 25%;'>&nbsp;</th>
1658
- <td valign='top'>
1659
- <?php _e('or just override the above with JS', 'popover'); ?>&nbsp;<input type='checkbox' name='popoverusejs' id='popoverusejs' value='yes' <?php if ($popover_usejs == 'yes') echo "checked='checked'"; ?> />
1660
- </td>
1661
- </tr>
1662
-
1663
- </table>
1664
- <table class='form-table'>
1665
-
1666
-
1667
-
1668
- <tr>
1669
- <th valign='top' scope='row' style='width: 25%;'><?php _e('Background Colour', 'popover'); ?></th>
1670
- <td valign='top'>
1671
- <?php _e('Hex:', 'popover'); ?>&nbsp;#
1672
- <input type='text' name='popoverbackground' id='popoverbackground' style='width: 10em;' value='<?php echo $popover_colour['back']; ?>' />
1673
- </td>
1674
- </tr>
1675
-
1676
- <tr>
1677
- <th valign='top' scope='row' style='width: 25%;'><?php _e('Font Colour', 'popover'); ?></th>
1678
- <td valign='top'>
1679
- <?php _e('Hex:', 'popover'); ?>&nbsp;#
1680
- <input type='text' name='popoverforeground' id='popoverforeground' style='width: 10em;' value='<?php echo $popover_colour['fore']; ?>' />
1681
- </td>
1682
- </tr>
1683
-
1684
- </table>
1685
-
1686
- </td>
1687
-
1688
- <td valign='top' width='49%'>
1689
- <h3><?php _e('Display Rules', 'popover'); ?></h3>
1690
-
1691
- <p><?php _e('Show the Pop Over if <strong>one</strong> of the following checked rules is true.', 'popover'); ?></p>
1692
- <input type='hidden' name='popovercheck[none]' value='none' />
1693
- <table class='form-table'>
1694
- <?php
1695
- if (function_exists('is_supporter')) {
1696
- ?>
1697
- <tr>
1698
- <td valign='middle' style='width: 5%;'>
1699
- <input type='checkbox' name='popovercheck[notsupporter]' <?php if (isset($popover_check['notsupporter'])) echo "checked='checked'"; ?> />
1700
- </td>
1701
- <th valign='bottom' scope='row'><?php _e('Visitor is not a supporter.', 'popover'); ?></th>
1702
- </tr>
1703
- <?php
1704
- }
1705
- ?>
1706
- <tr>
1707
- <td valign='middle' style='width: 5%;'>
1708
- <input type='checkbox' name='popovercheck[isloggedin]' <?php if (isset($popover_check['isloggedin'])) echo "checked='checked'"; ?> />
1709
- </td>
1710
- <th valign='bottom' scope='row'><?php _e('Visitor is logged in.', 'popover'); ?></th>
1711
- </tr>
1712
- <tr>
1713
- <td valign='middle' style='width: 5%;'>
1714
- <input type='checkbox' name='popovercheck[loggedin]' <?php if (isset($popover_check['loggedin'])) echo "checked='checked'"; ?> />
1715
- </td>
1716
- <th valign='bottom' scope='row'><?php _e('Visitor is not logged in.', 'popover'); ?></th>
1717
- </tr>
1718
- <tr>
1719
- <td valign='middle' style='width: 5%;'>
1720
- <input type='checkbox' name='popovercheck[commented]' <?php if (isset($popover_check['commented'])) echo "checked='checked'"; ?> />
1721
- </td>
1722
- <th valign='bottom' scope='row'><?php _e('Visitor has never commented here before.', 'popover'); ?></th>
1723
- </tr>
1724
- <tr>
1725
- <td valign='middle' style='width: 5%;'>
1726
- <input type='checkbox' name='popovercheck[searchengine]' <?php if (isset($popover_check['searchengine'])) echo "checked='checked'"; ?> />
1727
- </td>
1728
- <th valign='bottom' scope='row'><?php _e('Visitor came from a search engine.', 'popover'); ?></th>
1729
- </tr>
1730
- <tr>
1731
- <td valign='middle' style='width: 5%;'>
1732
- <input type='checkbox' name='popovercheck[internal]' <?php if (isset($popover_check['internal'])) echo "checked='checked'"; ?> />
1733
- </td>
1734
- <th valign='bottom' scope='row'><?php _e('Visitor did not come from an internal page.', 'popover'); ?></th>
1735
- </tr>
1736
- <tr>
1737
- <td valign='middle' style='width: 5%;'>
1738
- <input type='checkbox' name='popovercheck[referrer]' <?php if (isset($popover_check['referrer'])) echo "checked='checked'"; ?> />
1739
- </td>
1740
- <th valign='bottom' scope='row'><?php _e('Visitor referrer matches', 'popover'); ?>&nbsp;
1741
- <input type='text' name='popoverereg' id='popoverereg' style='width: 10em;' value='<?php echo htmlentities($popover_ereg, ENT_QUOTES, 'UTF-8'); ?>' />
1742
- </th>
1743
- </tr>
1744
-
1745
- </table>
1746
-
1747
- <p><?php _e('And the visitor has seen the pop over less than', 'popover'); ?>&nbsp;
1748
- <input type='text' name='popovercount' id='popovercount' style='width: 2em;' value='<?php echo htmlentities($popover_count, ENT_QUOTES, 'UTF-8'); ?>' />&nbsp;
1749
- <?php _e('times', 'popover'); ?></p>
1750
-
1751
- </td>
1752
- </tr>
1753
-
1754
- </table>
1755
-
1756
- <p class="submit">
1757
- <input class="button" type="submit" name="goagain" value="<?php _e('Update settings', 'popover'); ?>" />
1758
- </p>
1759
-
1760
- </form>
1761
-
1762
- </div>
1763
-
1764
- <?php
1765
- }
1766
-
1767
- function handle_addons_panel_updates() {
1768
- global $action, $page;
1769
-
1770
- wp_reset_vars(array('action', 'page'));
1771
-
1772
- if (isset($_GET['doaction']) || isset($_GET['doaction2'])) {
1773
- if (addslashes($_GET['action']) == 'toggle' || addslashes($_GET['action2']) == 'toggle') {
1774
- $action = 'bulk-toggle';
1775
- }
1776
- }
1777
-
1778
- $active = get_option('popover_activated_addons', array());
1779
-
1780
- switch (addslashes($action)) {
1781
-
1782
- case 'deactivate': $key = addslashes($_GET['addon']);
1783
- if (!empty($key)) {
1784
- check_admin_referer('toggle-addon-' . $key);
1785
-
1786
- $found = array_search($key, $active);
1787
- if ($found !== false) {
1788
- unset($active[$found]);
1789
- update_option('popover_activated_addons', array_unique($active));
1790
- wp_safe_redirect(add_query_arg('msg', 5, wp_get_referer()));
1791
- } else {
1792
- wp_safe_redirect(add_query_arg('msg', 6, wp_get_referer()));
1793
- }
1794
- }
1795
- break;
1796
-
1797
- case 'activate': $key = addslashes($_GET['addon']);
1798
- if (!empty($key)) {
1799
- check_admin_referer('toggle-addon-' . $key);
1800
-
1801
- if (!in_array($key, $active)) {
1802
- $active[] = $key;
1803
- update_option('popover_activated_addons', array_unique($active));
1804
- wp_safe_redirect(add_query_arg('msg', 3, wp_get_referer()));
1805
- } else {
1806
- wp_safe_redirect(add_query_arg('msg', 4, wp_get_referer()));
1807
- }
1808
- }
1809
- break;
1810
-
1811
- case 'bulk-toggle':
1812
- check_admin_referer('bulk-addons');
1813
- foreach ($_GET['addoncheck'] AS $key) {
1814
- $found = array_search($key, $active);
1815
- if ($found !== false) {
1816
- unset($active[$found]);
1817
- } else {
1818
- $active[] = $key;
1819
- }
1820
- }
1821
- update_option('popover_activated_addons', array_unique($active));
1822
- wp_safe_redirect(add_query_arg('msg', 7, wp_get_referer()));
1823
- break;
1824
- }
1825
- }
1826
-
1827
- function handle_addons_panel() {
1828
- global $action, $page;
1829
-
1830
- wp_reset_vars(array('action', 'page'));
1831
-
1832
- $messages = array();
1833
- $messages[1] = __('Add-on updated.', 'popover');
1834
- $messages[2] = __('Add-on not updated.', 'popover');
1835
-
1836
- $messages[3] = __('Add-on activated.', 'popover');
1837
- $messages[4] = __('Add-on not activated.', 'popover');
1838
-
1839
- $messages[5] = __('Add-on deactivated.', 'popover');
1840
- $messages[6] = __('Add-on not deactivated.', 'popover');
1841
-
1842
- $messages[7] = __('Add-on activation toggled.', 'popover');
1843
- ?>
1844
- <div class='wrap'>
1845
- <div class="icon32" id="icon-plugins"><br></div>
1846
- <h2><?php _e('Edit Add-ons', 'popover'); ?></h2>
1847
-
1848
- <?php
1849
- if (isset($_GET['msg'])) {
1850
- echo '<div id="message" class="updated fade"><p>' . $messages[(int) $_GET['msg']] . '</p></div>';
1851
- $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
1852
- }
1853
- ?>
1854
-
1855
- <form method="get" action="?page=<?php echo esc_attr($page); ?>" id="posts-filter">
1856
-
1857
- <input type='hidden' name='page' value='<?php echo esc_attr($page); ?>' />
1858
-
1859
- <div class="tablenav">
1860
-
1861
- <div class="alignleft actions">
1862
- <select name="action">
1863
- <option selected="selected" value=""><?php _e('Bulk Actions', 'popover'); ?></option>
1864
- <option value="toggle"><?php _e('Toggle activation', 'popover'); ?></option>
1865
- </select>
1866
- <input type="submit" class="button-secondary action" id="doaction" name="doaction" value="<?php _e('Apply', 'popover'); ?>">
1867
-
1868
- </div>
1869
-
1870
- <div class="alignright actions"></div>
1871
-
1872
- <br class="clear">
1873
- </div>
1874
-
1875
- <div class="clear"></div>
1876
-
1877
- <?php
1878
- wp_original_referer_field(true, 'previous');
1879
- wp_nonce_field('bulk-addons');
1880
-
1881
- $columns = array("name" => __('Add-on Name', 'popover'),
1882
- "file" => __('Add-on File', 'popover'),
1883
- "active" => __('Active', 'popover')
1884
- );
1885
-
1886
- $columns = apply_filters('popover_addoncolumns', $columns);
1887
-
1888
- $addons = get_popover_addons();
1889
-
1890
- $active = get_option('popover_activated_addons', array());
1891
- ?>
1892
-
1893
- <table cellspacing="0" class="widefat fixed">
1894
- <thead>
1895
- <tr>
1896
- <th style="" class="manage-column column-cb check-column" id="cb" scope="col"><input type="checkbox"></th>
1897
- <?php
1898
- foreach ($columns as $key => $col) {
1899
- ?>
1900
- <th style="" class="manage-column column-<?php echo $key; ?>" id="<?php echo $key; ?>" scope="col"><?php echo $col; ?></th>
1901
- <?php
1902
- }
1903
- ?>
1904
- </tr>
1905
- </thead>
1906
-
1907
- <tfoot>
1908
- <tr>
1909
- <th style="" class="manage-column column-cb check-column" scope="col"><input type="checkbox"></th>
1910
- <?php
1911
- reset($columns);
1912
- foreach ($columns as $key => $col) {
1913
- ?>
1914
- <th style="" class="manage-column column-<?php echo $key; ?>" id="<?php echo $key; ?>" scope="col"><?php echo $col; ?></th>
1915
- <?php
1916
- }
1917
- ?>
1918
- </tr>
1919
- </tfoot>
1920
-
1921
- <tbody>
1922
- <?php
1923
- if ($addons) {
1924
- foreach ($addons as $key => $addon) {
1925
- $default_headers = array(
1926
- 'Name' => 'Addon Name',
1927
- 'Author' => 'Author',
1928
- 'Description' => 'Description',
1929
- 'AuthorURI' => 'Author URI'
1930
- );
1931
-
1932
- $addon_data = get_file_data(popover_dir('popoverincludes/addons/' . $addon), $default_headers, 'plugin');
1933
-
1934
- if (empty($addon_data['Name'])) {
1935
- continue;
1936
- }
1937
- ?>
1938
- <tr valign="middle" class="alternate" id="addon-<?php echo $addon; ?>">
1939
- <th class="check-column" scope="row"><input type="checkbox" value="<?php echo esc_attr($addon); ?>" name="addoncheck[]"></th>
1940
- <td class="column-name">
1941
- <strong><?php echo esc_html($addon_data['Name']) . "</strong>" . __(' by ', 'popover') . "<a href='" . esc_attr($addon_data['AuthorURI']) . "'>" . esc_html($addon_data['Author']) . "</a>"; ?>
1942
- <?php if (!empty($addon_data['Description'])) {
1943
- ?><br/><?php
1944
- echo esc_html($addon_data['Description']);
1945
- }
1946
-
1947
- $actions = array();
1948
-
1949
- if (in_array($addon, $active)) {
1950
- $actions['toggle'] = "<span class='edit activate'><a href='" . wp_nonce_url("?page=" . $page . "&amp;action=deactivate&amp;addon=" . $addon . "", 'toggle-addon-' . $addon) . "'>" . __('Deactivate', 'popover') . "</a></span>";
1951
- } else {
1952
- $actions['toggle'] = "<span class='edit deactivate'><a href='" . wp_nonce_url("?page=" . $page . "&amp;action=activate&amp;addon=" . $addon . "", 'toggle-addon-' . $addon) . "'>" . __('Activate', 'popover') . "</a></span>";
1953
- }
1954
- ?>
1955
- <br><div class="row-actions"><?php echo implode(" | ", $actions); ?></div>
1956
- </td>
1957
-
1958
- <td class="column-name">
1959
- <?php echo esc_html($addon); ?>
1960
- </td>
1961
- <td class="column-active">
1962
- <?php
1963
- if (in_array($addon, $active)) {
1964
- echo "<strong>" . __('Active', 'popover') . "</strong>";
1965
- } else {
1966
- echo __('Inactive', 'popover');
1967
- }
1968
- ?>
1969
- </td>
1970
- </tr>
1971
- <?php
1972
- }
1973
- } else {
1974
- $columncount = count($columns) + 1;
1975
- ?>
1976
- <tr valign="middle" class="alternate" >
1977
- <td colspan="<?php echo $columncount; ?>" scope="row"><?php _e('No Add-ons where found for this install.', 'popover'); ?></td>
1978
- </tr>
1979
- <?php
1980
- }
1981
- ?>
1982
-
1983
- </tbody>
1984
- </table>
1985
-
1986
-
1987
- <div class="tablenav">
1988
-
1989
- <div class="alignleft actions">
1990
- <select name="action2">
1991
- <option selected="selected" value=""><?php _e('Bulk Actions', 'popover'); ?></option>
1992
- <option value="toggle"><?php _e('Toggle activation', 'popover'); ?></option>
1993
- </select>
1994
- <input type="submit" class="button-secondary action" id="doaction2" name="doaction2" value="<?php _e('Apply', 'popover'); ?>">
1995
- </div>
1996
- <div class="alignright actions"></div>
1997
- <br class="clear">
1998
- </div>
1999
-
2000
- </form>
2001
-
2002
- </div> <!-- wrap -->
2003
- <?php
2004
- }
2005
-
2006
- function handle_settings_page() {
2007
-
2008
- global $action, $page;
2009
-
2010
- $messages = array();
2011
- $messages[1] = __('Your settings have been updated.', 'popover');
2012
- ?>
2013
- <div class='wrap nosubsub'>
2014
-
2015
- <div class="icon32" id="icon-options-general"><br></div>
2016
- <h2><?php _e('Pop Over Settings', 'popover'); ?></h2>
2017
-
2018
- <?php
2019
- if (isset($_GET['msg'])) {
2020
- echo '<div id="message" class="updated fade"><p>' . $messages[(int) $_GET['msg']] . '</p></div>';
2021
- $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
2022
- }
2023
- ?>
2024
- <div id="poststuff" class="metabox-holder m-settings">
2025
- <form action='?page=<?php echo $page; ?>' method='post'>
2026
-
2027
- <input type='hidden' name='page' value='<?php echo $page; ?>' />
2028
- <input type='hidden' name='action' value='updatesettings' />
2029
-
2030
- <?php
2031
- wp_nonce_field('update-popover-settings');
2032
- ?>
2033
-
2034
- <div class="postbox">
2035
- <h3 class="hndle" style='cursor:auto;'><span><?php _e('Pop Over loading method', 'popover'); ?></span></h3>
2036
- <div class="inside">
2037
- <p><?php _e('Select the loading method you want to use for your Pop Overs.', 'popover'); ?></p>
2038
- <ul>
2039
- <li><em><?php _e('- Page Footer : The pop over is included as part of the page html.', 'popover'); ?></em></li>
2040
- <li><em><?php _e('- External Load : The pop over is loaded separately from the page, this is the best option if you are running a caching system.', 'popover'); ?></em></li>
2041
- <li><em><?php _e('- Custom Load : The pop over is loaded separately from the page via a custom front end ajax call.', 'popover'); ?></em></li>
2042
- </ul>
2043
-
2044
- <table class="form-table">
2045
- <tbody>
2046
- <tr valign="top">
2047
- <th scope="row"><?php _e('Pop Over loaded using', 'popover'); ?></th>
2048
- <td>
2049
- <?php
2050
- $settings = get_popover_option('popover-settings', array('loadingmethod' => 'frontloading'));
2051
- ?>
2052
- <select name='loadingmethod' id='loadingmethod'>
2053
- <option value="footer" <?php if ($settings['loadingmethod'] == 'footer') echo "selected='selected'"; ?>><?php _e('Page Footer', 'popover'); ?></option>
2054
- <option value="external" <?php if ($settings['loadingmethod'] == 'external') echo "selected='selected'"; ?>><?php _e('External Load', 'popover'); ?></option>
2055
- <option value="frontloading" <?php if ($settings['loadingmethod'] == 'frontloading') echo "selected='selected'"; ?>><?php _e('Custom Load', 'popover'); ?></option>
2056
- </select>
2057
- </td>
2058
- </tr>
2059
- </tbody>
2060
- </table>
2061
- </div>
2062
- </div>
2063
-
2064
- <p class="submit">
2065
- <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes', 'popover') ?>" />
2066
- </p>
2067
-
2068
- </form>
2069
- </div>
2070
- </div> <!-- wrap -->
2071
- <?php
2072
- }
2073
-
2074
- function update_settings_page() {
2075
-
2076
- if (isset($_POST['action']) && $_POST['action'] == 'updatesettings') {
2077
-
2078
- check_admin_referer('update-popover-settings');
2079
-
2080
- update_popover_option('popover-settings', $_POST);
2081
-
2082
- wp_safe_redirect(add_query_arg('msg', 1, wp_get_referer()));
2083
- }
2084
- }
2085
-
2086
- }
2087
-
2088
- }
2089
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/classes/popoverajax.php DELETED
@@ -1,566 +0,0 @@
1
- <?php
2
- /*
3
- * The processing part of the popover plugin
4
- * - was previously in popoverpublic.php
5
- */
6
-
7
- if(!class_exists('popoverajax')) {
8
-
9
- class popoverajax {
10
-
11
- var $mylocation = '';
12
- var $build = 5;
13
- var $db;
14
-
15
- var $tables = array( 'popover', 'popover_ip_cache' );
16
- var $popover;
17
- var $popover_ip_cache;
18
-
19
- var $activepopover = false;
20
-
21
- function __construct() {
22
-
23
- global $wpdb;
24
-
25
- $this->db =& $wpdb;
26
-
27
- foreach($this->tables as $table) {
28
- $this->$table = popover_db_prefix($this->db, $table);
29
- }
30
-
31
- add_action('init', array(&$this, 'initialise_ajax'), 99);
32
-
33
- add_action( 'plugins_loaded', array(&$this, 'load_textdomain'));
34
-
35
- $directories = explode(DIRECTORY_SEPARATOR,dirname(__FILE__));
36
- $this->mylocation = $directories[count($directories)-1];
37
-
38
- }
39
-
40
- function popoverajax() {
41
- $this->__construct();
42
- }
43
-
44
- function initialise_ajax() {
45
-
46
- $settings = get_popover_option('popover-settings', array( 'loadingmethod' => 'external'));
47
-
48
- switch( $settings['loadingmethod'] ) {
49
-
50
- case 'external': add_action( 'wp_ajax_popover_selective_ajax', array(&$this,'ajax_selective_message_display') );
51
- add_action( 'wp_ajax_nopriv_popover_selective_ajax', array(&$this,'ajax_selective_message_display') );
52
- break;
53
-
54
- case 'frontloading': if( isset( $_GET['popoverajaxaction']) && $_GET['popoverajaxaction'] == 'popover_selective_ajax' ) {
55
- $this->ajax_selective_message_display();
56
- }
57
- break;
58
- }
59
-
60
- }
61
-
62
- function load_textdomain() {
63
-
64
- $locale = apply_filters( 'popover_locale', get_locale() );
65
- $mofile = popover_dir( "popoverincludes/languages/popover-$locale.mo" );
66
-
67
- if ( file_exists( $mofile ) )
68
- load_textdomain( 'popover', $mofile );
69
-
70
- }
71
-
72
- function get_active_popovers() {
73
- $sql = $this->db->prepare( "SELECT * FROM {$this->popover} WHERE popover_active = %d ORDER BY popover_order ASC", 1 );
74
-
75
- return $this->db->get_results( $sql );
76
- }
77
-
78
- function ajax_selective_message_display() {
79
-
80
- if(isset($_GET['callback'])) {
81
- $data = $this->selective_message_display();
82
- echo $_GET['callback'] . "(" . json_encode($data) . ")";
83
- }
84
-
85
- exit;
86
-
87
- }
88
-
89
- function selective_message_display() {
90
-
91
- if(function_exists('get_site_option') && defined('PO_GLOBAL') && PO_GLOBAL == true) {
92
- $updateoption = 'update_site_option';
93
- $getoption = 'get_site_option';
94
- } else {
95
- $updateoption = 'update_option';
96
- $getoption = 'get_option';
97
- }
98
-
99
- $popovers = $this->get_active_popovers();
100
-
101
- if(!empty($popovers)) {
102
-
103
- foreach( (array) $popovers as $popover ) {
104
-
105
- // We have an active popover so extract the information and test it
106
- $popover_title = stripslashes($popover->popover_title);
107
- $popover_content = stripslashes($popover->popover_content);
108
- $popover->popover_settings = unserialize($popover->popover_settings);
109
-
110
- $popover_size = $popover->popover_settings['popover_size'];
111
- $popover_location = $popover->popover_settings['popover_location'];
112
- $popover_colour = $popover->popover_settings['popover_colour'];
113
- $popover_margin = $popover->popover_settings['popover_margin'];
114
-
115
- $popover_size = $this->sanitise_array($popover_size);
116
- $popover_location = $this->sanitise_array($popover_location);
117
- $popover_colour = $this->sanitise_array($popover_colour);
118
- $popover_margin = $this->sanitise_array($popover_margin);
119
-
120
- $popover_check = $popover->popover_settings['popover_check'];
121
- $popover_ereg = $popover->popover_settings['popover_ereg'];
122
- $popover_count = $popover->popover_settings['popover_count'];
123
-
124
- $popover_usejs = $popover->popover_settings['popover_usejs'];
125
-
126
- $popoverstyle = (isset($popover->popover_settings['popover_style'])) ? $popover->popover_settings['popover_style'] : '';
127
-
128
- $popover_hideforever = (isset($popover->popover_settings['popoverhideforeverlink'])) ? $popover->popover_settings['popoverhideforeverlink'] : '';
129
-
130
- $popover_delay = (isset($popover->popover_settings['popoverdelay'])) ? $popover->popover_settings['popoverdelay'] : '';
131
-
132
- $popover_onurl = (isset($popover->popover_settings['onurl'])) ? $popover->popover_settings['onurl'] : '';
133
- $popover_notonurl = (isset($popover->popover_settings['notonurl'])) ? $popover->popover_settings['notonurl'] : '';
134
-
135
- $popover_incountry = (isset($popover->popover_settings['incountry'])) ? $popover->popover_settings['incountry'] : '';
136
- $popover_notincountry = (isset($popover->popover_settings['notincountry'])) ? $popover->popover_settings['notincountry'] : '';
137
-
138
- $popover_onurl = $this->sanitise_array($popover_onurl);
139
- $popover_notonurl = $this->sanitise_array($popover_notonurl);
140
-
141
- $show = true;
142
-
143
- if(!empty($popover_check)) {
144
-
145
- $order = explode(',', $popover_check['order']);
146
-
147
- foreach($order as $key) {
148
-
149
- switch ($key) {
150
-
151
- case "supporter":
152
- if(function_exists('is_pro_site') && is_pro_site()) {
153
- $show = false;
154
- }
155
- break;
156
-
157
- case "loggedin": if($this->is_loggedin()) {
158
- $show = false;
159
- }
160
- break;
161
-
162
- case "isloggedin": if(!$this->is_loggedin()) {
163
- $show = false;
164
- }
165
- break;
166
-
167
- case "commented": if($this->has_commented()) {
168
- $show = false;
169
- }
170
- break;
171
-
172
- case "searchengine":
173
- if(!$this->is_fromsearchengine( $_REQUEST['thereferrer'] )) {
174
- $show = false;
175
- }
176
- break;
177
-
178
- case "internal": $internal = str_replace('^http://','',get_option('home'));
179
- if($this->referrer_matches( $internal, $_REQUEST['thereferrer'] )) {
180
- $show = false;
181
- }
182
- break;
183
-
184
- case "referrer": $match = $popover_ereg;
185
- if(!$this->referrer_matches( $match, $_REQUEST['thereferrer'])) {
186
- $show = false;
187
- }
188
- break;
189
-
190
- case "count": if($this->has_reached_limit($popover_count)) {
191
- $show = false;
192
- }
193
- break;
194
-
195
- case 'onurl': if(!$this->onurl( $popover_onurl, $_REQUEST['thefrom'] )) {
196
- $show = false;
197
- }
198
- break;
199
-
200
- case 'notonurl': if($this->onurl( $popover_notonurl, $_REQUEST['thefrom'] )) {
201
- $show = false;
202
- }
203
- break;
204
-
205
- case 'incountry': $incountry = $this->incountry( $popover_incountry );
206
- if(!$incountry || $incountry === 'XX') {
207
- $show = false;
208
- }
209
- break;
210
-
211
- case 'notincountry':
212
- $incountry = $this->incountry( $popover_notincountry );
213
- if($incountry || $incountry === 'XX') {
214
- $show = false;
215
- }
216
- break;
217
-
218
- default: if(has_filter('popover_process_rule_' . $key)) {
219
- if(!apply_filters( 'popover_process_rule_' . $key, false )) {
220
- $show = false;
221
- }
222
- }
223
- break;
224
-
225
- }
226
- }
227
-
228
- // Check for forced popover and if set then output that one instead of any other
229
- if(isset($_REQUEST['active_popover']) && (int) $_REQUEST['active_popover'] != 0) {
230
- if($popover->id == (int) $_REQUEST['active_popover']) {
231
- $show = true;
232
- } else {
233
- $show = false;
234
- }
235
- }
236
- }
237
-
238
- if($show == true) {
239
-
240
- if($this->clear_forever()) {
241
- $show = false;
242
- }
243
-
244
- }
245
-
246
- if($show == true) {
247
-
248
- // return the popover to the calling function
249
-
250
- $popover = array();
251
-
252
- $popover['name'] = 'a' . md5(date('d')) . '-po';
253
-
254
- // Show the advert
255
- if(!empty($popover_delay) && $popover_delay != 'immediate') {
256
- // Set the delay
257
- $popover['delay'] = $popover_delay * 1000;
258
- } else {
259
- $popover['delay'] = 0;
260
- }
261
-
262
- if($popover_usejs == 'yes') {
263
- $popover['usejs'] = 'yes';
264
- } else {
265
- $popover['usejs'] = 'no';
266
- }
267
-
268
- $style = '';
269
- $backgroundstyle = '';
270
-
271
- if($popover_usejs == 'yes') {
272
- $style = 'z-index:999999;';
273
- $box = 'color: #' . $popover_colour['fore'] . '; background: #' . $popover_colour['back'] . ';';
274
- $style .= 'left: -1000px; top: =100px;';
275
- } else {
276
- $style = 'left: ' . $popover_location['left'] . '; top: ' . $popover_location['top'] . ';' . ' z-index:999999;';
277
- $style .= 'margin-top: ' . $popover_margin['top'] . '; margin-bottom: ' . $popover_margin['bottom'] . '; margin-right: ' . $popover_margin['right'] . '; margin-left: ' . $popover_margin['left'] . ';';
278
-
279
- $box = 'width: ' . $popover_size['width'] . '; height: ' . $popover_size['height'] . '; color: #' . $popover_colour['fore'] . '; background: #' . $popover_colour['back'] . ';';
280
-
281
- }
282
-
283
- if(!empty($popover_delay) && $popover_delay != 'immediate') {
284
- // Hide the popover initially
285
- $style .= ' visibility: hidden;';
286
- $backgroundstyle .= ' visibility: hidden;';
287
- }
288
-
289
- $availablestyles = apply_filters( 'popover_available_styles_directory', array() );
290
-
291
- $popover['html'] = '';
292
- if( in_array($popoverstyle, array_keys($availablestyles)) ) {
293
- $popover_messagebox = 'a' . md5(date('d')) . '-po';
294
-
295
- if(file_exists(trailingslashit($availablestyles[$popoverstyle]) . 'popover.php')) {
296
- ob_start();
297
- include_once( trailingslashit($availablestyles[$popoverstyle]) . 'popover.php' );
298
- $popover['html'] = ob_get_contents();
299
- ob_end_clean();
300
- }
301
- }
302
-
303
- $availablestylesurl = apply_filters( 'popover_available_styles_url', array() );
304
-
305
- $popover['style'] = '';
306
- if( in_array($popoverstyle, array_keys($availablestyles)) ) {
307
- // Add the styles
308
- if(file_exists(trailingslashit($availablestyles[$popoverstyle]) . 'style.css')) {
309
- ob_start();
310
- include_once( trailingslashit($availablestyles[$popoverstyle]) . 'style.css' );
311
- $content = ob_get_contents();
312
- ob_end_clean();
313
-
314
- $popover['style'] = str_replace('#messagebox', '#' . $popover_messagebox, $content);
315
- $popover['style'] = str_replace('%styleurl%', trailingslashit($availablestylesurl[$popoverstyle]), $popover['style']);
316
-
317
- }
318
-
319
- }
320
-
321
-
322
- // Add the cookie
323
- if ( isset($_COOKIE['popover_view_'.COOKIEHASH]) ) {
324
- $count = intval($_COOKIE['popover_view_'.COOKIEHASH]);
325
- if(!is_numeric($count)) $count = 0;
326
- $count++;
327
- } else {
328
- $count = 1;
329
- }
330
- if(!headers_sent()) setcookie('popover_view_'.COOKIEHASH, $count , time() + 30000000, COOKIEPATH, COOKIE_DOMAIN);
331
-
332
-
333
- return $popover;
334
- // Exit from the for - as we have sent a popover
335
- break;
336
- }
337
- }
338
-
339
- }
340
-
341
- // There is no popover to show - so send back a no-popover message
342
- return array( 'name' => 'nopopover' );
343
-
344
-
345
- }
346
-
347
- function sanitise_array($arrayin) {
348
-
349
- foreach( (array) $arrayin as $key => $value) {
350
- $arrayin[$key] = htmlentities(stripslashes($value) ,ENT_QUOTES, 'UTF-8');
351
- }
352
-
353
- return $arrayin;
354
- }
355
-
356
- function is_fromsearchengine( $ref = '') {
357
-
358
- $SE = array('/search?', '.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.', '.bing.' );
359
-
360
- foreach ($SE as $url) {
361
- if (strpos( $ref, $url) !== false ) {
362
- if($url == '.google.') {
363
- if( $this->is_googlesearch( $ref) ) {
364
- return true;
365
- } else {
366
- return false;
367
- }
368
- } else {
369
- return true;
370
- }
371
- }
372
- }
373
- return false;
374
- }
375
-
376
- function is_googlesearch( $ref = '' ) {
377
- $SE = array('.google.');
378
-
379
- foreach ($SE as $url) {
380
- if (strpos($ref,$url) !== false ) {
381
- // We've found a google referrer - get the query strings and check its a web source
382
- $qs = parse_url( $ref, PHP_URL_QUERY );
383
- $qget = array();
384
- foreach(explode('&', $qs) as $keyval) {
385
- list( $key, $value ) = explode('=', $keyval);
386
- $qget[ trim($key) ] = trim($value);
387
- }
388
- if(array_key_exists('source', $qget) && $qget['source'] == 'web') {
389
- return true;
390
- }
391
- }
392
- }
393
- return false;
394
- }
395
-
396
- function is_ie()
397
- {
398
- if (isset($_SERVER['HTTP_USER_AGENT']) && (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
399
- return true;
400
- else
401
- return false;
402
- }
403
-
404
- function is_loggedin() {
405
- return is_user_logged_in();
406
- }
407
-
408
- function has_commented() {
409
- if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) {
410
- return true;
411
- } else {
412
- return false;
413
- }
414
- }
415
-
416
- function referrer_matches($check, $referer = '') {
417
-
418
- if(preg_match( '#' . $check . '#i', $referer )) {
419
- return true;
420
- } else {
421
- return false;
422
- }
423
-
424
- }
425
-
426
- function has_reached_limit($count = 3) {
427
- if ( isset($_COOKIE['popover_view_'.COOKIEHASH]) && addslashes($_COOKIE['popover_view_'.COOKIEHASH]) >= $count ) {
428
- return true;
429
- } else {
430
- return false;
431
- }
432
- }
433
-
434
- function myURL() {
435
-
436
- if ($_SERVER["HTTPS"] == "on") {
437
- $url .= "https://";
438
- } else {
439
- $url = 'http://';
440
- }
441
-
442
- if ($_SERVER["SERVER_PORT"] != "80") {
443
- $url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
444
- } else {
445
- $url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
446
- }
447
-
448
- return trailingslashit($url);
449
- }
450
-
451
- function onurl( $urllist = array(), $url = '' ) {
452
-
453
- $urllist = array_map( 'trim', $urllist );
454
-
455
- if(!empty($urllist)) {
456
- foreach( $urllist as $ul ) {
457
- if(preg_match( '#^' . $ul . '$#i', $url )) {
458
- return true;
459
- }
460
- }
461
- // if we are here then there hasn't been a match
462
- return false;
463
- } else {
464
- return true;
465
- }
466
-
467
- }
468
-
469
- function incountry( $countrycode ) {
470
- // Grab the users IP address
471
- $ip = $_SERVER["REMOTE_ADDR"];
472
-
473
- if( has_filter('popover_pre_incountry') ) {
474
- // We have an override for the ipcountry in place so ignore the rest
475
- return apply_filters('popover_pre_incountry', false, $ip, $countrycode );
476
- }
477
-
478
- $country = $this->get_country_from_cache( $ip );
479
-
480
- if(empty($country)) {
481
- // No country to get from API
482
- $country = $this->get_country_from_api( $ip );
483
-
484
- if($country !== false) {
485
- $this->put_country_in_cache( $ip, $country );
486
- } else {
487
- $country = 'XX';
488
- }
489
- }
490
-
491
- if($country == $countrycode) {
492
- return true;
493
- } else {
494
- return false;
495
- }
496
-
497
- }
498
-
499
- function get_country_from_cache( $ip ) {
500
-
501
- $country = $this->db->get_var( $this->db->prepare( "SELECT country FROM {$this->popover_ip_cache} WHERE IP = %s", $ip ) );
502
-
503
- return $country;
504
-
505
- }
506
-
507
- function put_country_in_cache( $ip, $country ) {
508
-
509
- return $this->insertonduplicate( $this->popover_ip_cache, array( 'IP' => $ip, 'country' => $country, 'cached' => time() ) );
510
-
511
- }
512
-
513
- function get_country_from_api( $ip ) {
514
-
515
- $url = str_replace('%ip%', $ip, PO_REMOTE_IP_URL);
516
-
517
- $response = wp_remote_get( $url );
518
-
519
- if(!is_wp_error($response) && $response['response']['code'] == '200' && $response['body'] != 'XX') {
520
- // cache the response for future use
521
- $country = trim($response['body']);
522
- } else {
523
- if(PO_DEFAULT_COUNTRY !== false) {
524
- return PO_DEFAULT_COUNTRY;
525
- } else {
526
- return false;
527
- }
528
- }
529
-
530
- }
531
-
532
- function insertonduplicate($table, $data) {
533
-
534
- global $wpdb;
535
-
536
- $fields = array_keys($data);
537
- $formatted_fields = array();
538
- foreach ( $fields as $field ) {
539
- $form = '%s';
540
- $formatted_fields[] = $form;
541
- }
542
- $sql = "INSERT INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')";
543
- $sql .= " ON DUPLICATE KEY UPDATE ";
544
-
545
- $dup = array();
546
- foreach($fields as $field) {
547
- $dup[] = "`" . $field . "` = VALUES(`" . $field . "`)";
548
- }
549
-
550
- $sql .= implode(',', $dup);
551
-
552
- return $wpdb->query( $wpdb->prepare( $sql, $data) );
553
- }
554
-
555
- function clear_forever() {
556
- if ( isset($_COOKIE['popover_never_view']) ) {
557
- return true;
558
- } else {
559
- return false;
560
- }
561
- }
562
-
563
- }
564
-
565
- }
566
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/classes/popoverpublic.php DELETED
@@ -1,209 +0,0 @@
1
- <?php
2
- if (!class_exists('popoverpublic')) {
3
-
4
- class popoverpublic {
5
-
6
- var $mylocation = '';
7
- var $build = 5;
8
- var $db;
9
- var $tables = array('popover', 'popover_ip_cache');
10
- var $popover;
11
- var $popover_ip_cache;
12
- var $activepopover = false;
13
- var $thepopover;
14
-
15
- function __construct() {
16
-
17
- global $wpdb;
18
-
19
- $this->db = & $wpdb;
20
-
21
- foreach ($this->tables as $table) {
22
- $this->$table = popover_db_prefix($this->db, $table);
23
- }
24
-
25
- // Adds the JS to the themes header - this replaces all previous methods of loading
26
- add_action('init', array(&$this, 'initialise_plugin'));
27
-
28
- add_action('plugins_loaded', array(&$this, 'load_textdomain'));
29
-
30
- $directories = explode(DIRECTORY_SEPARATOR, dirname(__FILE__));
31
- $this->mylocation = $directories[count($directories) - 1];
32
-
33
- $installed = get_option('popover_installed', false);
34
-
35
- if ($installed === false || $installed != $this->build) {
36
- $this->install();
37
-
38
- update_option('popover_installed', $this->build);
39
- }
40
- }
41
-
42
- function popoverpublic() {
43
- $this->__construct();
44
- }
45
-
46
- function install() {
47
-
48
- $charset_collate = '';
49
-
50
- if (!empty($this->db->charset)) {
51
- $charset_collate = "DEFAULT CHARACTER SET " . $this->db->charset;
52
- }
53
-
54
- if (!empty($this->db->collate)) {
55
- $charset_collate .= " COLLATE " . $this->db->collate;
56
- }
57
-
58
- if ($this->db->get_var("SHOW TABLES LIKE '" . $this->popover . "' ") != $this->popover) {
59
- $sql = "CREATE TABLE `" . $this->popover . "` (
60
- `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
61
- `popover_title` varchar(250) DEFAULT NULL,
62
- `popover_content` text,
63
- `popover_settings` text,
64
- `popover_order` bigint(20) DEFAULT '0',
65
- `popover_active` int(11) DEFAULT '0',
66
- PRIMARY KEY (`id`)
67
- ) $charset_collate;";
68
-
69
- $this->db->query($sql);
70
- }
71
-
72
- // Add in IP cache table
73
- if ($this->db->get_var("SHOW TABLES LIKE '" . $this->popover_ip_cache . "' ") != $this->popover_ip_cache) {
74
- $sql = "CREATE TABLE `" . $this->popover_ip_cache . "` (
75
- `IP` varchar(12) NOT NULL DEFAULT '',
76
- `country` varchar(2) DEFAULT NULL,
77
- `cached` bigint(20) DEFAULT NULL,
78
- PRIMARY KEY (`IP`),
79
- KEY `cached` (`cached`)
80
- ) $charset_collate;";
81
-
82
- $this->db->query($sql);
83
- }
84
- }
85
-
86
- function load_textdomain() {
87
-
88
- $locale = apply_filters('popover_locale', get_locale());
89
- $mofile = popover_dir("popoverincludes/languages/popover-$locale.mo");
90
-
91
- if (file_exists($mofile))
92
- load_textdomain('popover', $mofile);
93
- }
94
-
95
- function initialise_plugin() {
96
-
97
- $settings = get_popover_option('popover-settings', array('loadingmethod' => 'frontloading'));
98
-
99
- switch ($settings['loadingmethod']) {
100
-
101
- case 'external': $this->add_selective_javascript();
102
- break;
103
-
104
- case 'footer': $this->add_popover_files();
105
- break;
106
-
107
- case 'frontloading': $this->add_frontend_selective_javascript();
108
- break;
109
- }
110
- }
111
-
112
- function add_selective_javascript() {
113
- global $pagenow;
114
-
115
- if (!in_array($pagenow, array('wp-login.php', 'wp-register.php'))) {
116
- // We need javascript so make sure we load it here
117
- wp_enqueue_script('jquery');
118
-
119
- // Now to register our new js file
120
- wp_register_script('popover_selective_load', popover_url('popoverincludes/js/popover-load.js'));
121
- wp_enqueue_script('popover_selective_load');
122
-
123
- wp_localize_script('popover_selective_load', 'popover_load_custom', array(
124
- 'admin_ajax_url' => admin_url( 'admin-ajax.php' ),
125
- ));
126
- }
127
- }
128
-
129
- function add_frontend_selective_javascript() {
130
- global $pagenow;
131
-
132
- if (!in_array($pagenow, array('wp-login.php', 'wp-register.php'))) {
133
- // We need javascript so make sure we load it here
134
- wp_enqueue_script('jquery');
135
-
136
- // Now to register our new js file
137
- wp_register_script('popover_load_custom', popover_url('popoverincludes/js/popover-load-custom.js'));
138
- wp_enqueue_script('popover_load_custom');
139
-
140
- wp_localize_script('popover_load_custom', 'popover_selective_custom', array(
141
- 'admin_ajax_url' => admin_url( 'admin-ajax.php' ),
142
- ));
143
- }
144
- }
145
-
146
- function myURL() {
147
-
148
- if (isset($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) == "on") {
149
- $url .= "https://";
150
- } else {
151
- $url = 'http://';
152
- }
153
-
154
- if ($_SERVER["SERVER_PORT"] != "80") {
155
- $url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
156
- } else {
157
- $url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
158
- }
159
-
160
- return trailingslashit($url);
161
- }
162
-
163
- function add_popover_files() {
164
-
165
- global $popoverajax;
166
-
167
- if (method_exists($popoverajax, 'selective_message_display')) {
168
-
169
- // Set up the rquest information from here - this is passed in using the standard JS interface so we need to fake it
170
- $_REQUEST['thereferrer'] = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
171
- $_REQUEST['thefrom'] = $this->myURL();
172
-
173
- $this->thepopover = $popoverajax->selective_message_display();
174
-
175
- if (isset($this->thepopover['name']) && $this->thepopover['name'] != 'nopopover') {
176
- wp_enqueue_script('jquery');
177
-
178
- wp_enqueue_script('popoverlegacyjs', popover_url('popoverincludes/js/popoverlegacy.js'), array('jquery'), $this->build);
179
- wp_localize_script('popoverlegacyjs', 'popover', array('divname' => $this->thepopover['name'],
180
- 'usejs' => $this->thepopover['usejs'],
181
- 'delay' => $this->thepopover['delay']
182
- ));
183
-
184
- add_action('wp_head', array(&$this, 'output_header_content'));
185
- add_action('wp_footer', array(&$this, 'output_footer_content'));
186
- }
187
- }
188
- }
189
-
190
- function output_header_content() {
191
- // Output the styles
192
- ?>
193
- <style type="text/css">
194
- <?php
195
- echo $this->thepopover['style'];
196
- ?>
197
- </style>
198
- <?php
199
- }
200
-
201
- function output_footer_content() {
202
-
203
- echo $this->thepopover['html'];
204
- }
205
-
206
- }
207
-
208
- }
209
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/default/popover.php DELETED
@@ -1,15 +0,0 @@
1
- <div id='<?php echo $popover_messagebox; ?>' class='visiblebox' style='<?php echo $style; ?>'>
2
- <a href='' id='closebox' title='<?php _e('Close this box','popover'); ?>'></a>
3
- <div id='message' style='<?php echo $box; ?>'>
4
- <?php echo do_shortcode($popover_content); ?>
5
-
6
- <div class='clear'></div>
7
- <?php if($popover_hideforever != 'yes') {
8
- ?>
9
- <div class='claimbutton hide'><a href='#' id='clearforever'><?php _e('Never see this message again.','popover'); ?></a></div>
10
- <?php
11
- }
12
- ?>
13
- </div>
14
- <div class='clear'></div>
15
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/default/style.css DELETED
@@ -1,88 +0,0 @@
1
- div#messagebox {
2
- position: absolute;
3
- background: transparent url(%styleurl%images/opaque.png) repeat;
4
- z-index: 999;
5
- padding: 10px;
6
- visibility: visible;
7
- }
8
-
9
- div#messagebox div.claimbutton {
10
- position: absolute;
11
- bottom: 0;
12
- right: 0;
13
- width: 100%;
14
- background: transparent url(%styleurl%images/opaque.png) repeat;
15
- text-align: right;
16
- padding-top: 5px;
17
- padding-bottom: 5px;
18
- }
19
-
20
- div#messagebox div.claimbutton a:visited, div#messagebox div.claimbutton a {
21
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
22
- color: #FFF;
23
- text-shadow: #000 1px 1px 0px;
24
- font-weight: bold;
25
- padding-right: 5px;
26
- }
27
-
28
- #message p {
29
- position: relative;
30
- clear: both;
31
- }
32
-
33
- #messagebox #closebox {
34
- position: absolute;
35
- width: 30px;
36
- height: 29px;
37
- background: transparent url(%styleurl%images/closemessagebland.png) no-repeat;
38
- top: -5px;
39
- left: -5px;
40
- z-index: 5;
41
- }
42
-
43
- div#message {
44
- position: relative;
45
- background: #fff;
46
- font: 0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
47
- min-height: 90%;
48
- overflow: hidden;
49
- }
50
-
51
- div#message.waiting {
52
- background: #fff url(%styleurl%images/loading.gif) no-repeat center center;
53
- }
54
-
55
- div#message h2 {
56
- color: #000;
57
- font: bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
58
- margin-top: 0px;
59
- }
60
- div#message h2 a {
61
- text-decoration: none;
62
- color: #000;
63
- }
64
-
65
- div#message blockquote {
66
- padding: 0px;
67
- font-weight: bold;
68
- border-left: 5px solid #ccc;
69
- }
70
-
71
- div#message blockquote p{
72
- padding: 2px 5px;
73
- }
74
-
75
- div#message img {
76
- }
77
-
78
- div#messagebox.visiblebox {
79
- display: block;
80
- }
81
- div#messagebox.hiddenbox {
82
- display: none;
83
- }
84
- .hide { display: none; }
85
-
86
- .clear {
87
- clear: both;
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fixed/popover.php DELETED
@@ -1,14 +0,0 @@
1
- <div id='<?php echo $popover_messagebox; ?>' class='visiblebox' style='position: fixed; <?php echo $style; ?>'>
2
- <a href='' id='closebox' title='<?php _e('Close this box','popover'); ?>'></a>
3
- <div id='message' style='<?php echo $box; ?>'>
4
- <?php echo do_shortcode($popover_content); ?>
5
- <div class='clear'></div>
6
- <?php if($popover_hideforever != 'yes') {
7
- ?>
8
- <div class='claimbutton hide'><a href='#' id='clearforever'><?php _e('Never see this message again.','popover'); ?></a></div>
9
- <?php
10
- }
11
- ?>
12
- </div>
13
- <div class='clear'></div>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fixed/style.css DELETED
@@ -1,88 +0,0 @@
1
- div#messagebox {
2
- position: absolute;
3
- background: transparent url(%styleurl%images/opaque.png) repeat;
4
- z-index: 999;
5
- padding: 10px;
6
- visibility: visible;
7
- }
8
-
9
- div#messagebox div.claimbutton {
10
- position: absolute;
11
- bottom: 0;
12
- right: 0;
13
- width: 100%;
14
- background: transparent url(%styleurl%images/opaque.png) repeat;
15
- text-align: right;
16
- padding-top: 5px;
17
- padding-bottom: 5px;
18
- }
19
-
20
- div#messagebox div.claimbutton a:visited, div#messagebox div.claimbutton a {
21
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
22
- color: #FFF;
23
- text-shadow: #000 1px 1px 0px;
24
- font-weight: bold;
25
- padding-right: 5px;
26
- }
27
-
28
- #message p {
29
- position: relative;
30
- clear: both;
31
- }
32
-
33
- #messagebox #closebox {
34
- position: absolute;
35
- width: 30px;
36
- height: 29px;
37
- background: transparent url(%styleurl%images/closemessagebland.png) no-repeat;
38
- top: -5px;
39
- left: -5px;
40
- z-index: 5;
41
- }
42
-
43
- div#message {
44
- position: relative;
45
- background: #fff;
46
- font: 0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
47
- min-height: 90%;
48
- overflow: hidden;
49
- }
50
-
51
- div#message.waiting {
52
- background: #fff url(%styleurl%images/loading.gif) no-repeat center center;
53
- }
54
-
55
- div#message h2 {
56
- color: #000;
57
- font: bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
58
- margin-top: 0px;
59
- }
60
- div#message h2 a {
61
- text-decoration: none;
62
- color: #000;
63
- }
64
-
65
- div#message blockquote {
66
- padding: 0px;
67
- font-weight: bold;
68
- border-left: 5px solid #ccc;
69
- }
70
-
71
- div#message blockquote p{
72
- padding: 2px 5px;
73
- }
74
-
75
- div#message img {
76
- }
77
-
78
- div#messagebox.visiblebox {
79
- display: block;
80
- }
81
- div#messagebox.hiddenbox {
82
- display: none;
83
- }
84
- .hide { display: none; }
85
-
86
- .clear {
87
- clear: both;
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fullbackground/popover.php DELETED
@@ -1,16 +0,0 @@
1
- <div id='darkbackground' style='<?php echo $backgroundstyle; ?>'>
2
- <div id='<?php echo $popover_messagebox; ?>' class='visiblebox' style='<?php echo $style; ?>'>
3
- <a href='' id='closebox' title='<?php _e('Close this box','popover'); ?>'></a>
4
- <div id='message' style='<?php echo $box; ?>'>
5
- <?php echo do_shortcode($popover_content); ?>
6
- <div class='clear'></div>
7
- <?php if($popover_hideforever != 'yes') {
8
- ?>
9
- <div class='claimbutton hide'><a href='#' id='clearforever'><?php _e('Never see this message again.','popover'); ?></a></div>
10
- <?php
11
- }
12
- ?>
13
- </div>
14
- <div class='clear'></div>
15
- </div>
16
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fullbackground/style.css DELETED
@@ -1,99 +0,0 @@
1
- #darkbackground {
2
- position: fixed;
3
- background: transparent url(%styleurl%images/opaque80.png) repeat;
4
- top: 0;
5
- width: 100%;
6
- left: 0;
7
- height: 100%;
8
- z-index: 99999;
9
- visibility: visible;
10
- }
11
-
12
- div#messagebox {
13
- position: absolute;
14
- background: transparent url(%styleurl%images/opaque.png) repeat;
15
- z-index: 999;
16
- padding: 10px;
17
- visibility: visible;
18
- }
19
-
20
- div#messagebox div.claimbutton {
21
- position: absolute;
22
- bottom: 0;
23
- right: 0;
24
- width: 100%;
25
- background: transparent url(%styleurl%images/opaque.png) repeat;
26
- text-align: right;
27
- padding-top: 5px;
28
- padding-bottom: 5px;
29
- }
30
-
31
- div#messagebox div.claimbutton a:visited, div#messagebox div.claimbutton a {
32
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
33
- color: #FFF;
34
- text-shadow: #000 1px 1px 0px;
35
- font-weight: bold;
36
- padding-right: 5px;
37
- }
38
-
39
- #message p {
40
- position: relative;
41
- clear: both;
42
- }
43
-
44
- #messagebox #closebox {
45
- position: absolute;
46
- width: 30px;
47
- height: 29px;
48
- background: transparent url(%styleurl%images/closemessagebland.png) no-repeat;
49
- top: -5px;
50
- left: -5px;
51
- z-index: 5;
52
- }
53
-
54
- div#message {
55
- position: relative;
56
- background: #fff;
57
- font: 0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
58
- min-height: 90%;
59
- overflow: hidden;
60
- }
61
-
62
- div#message.waiting {
63
- background: #fff url(%styleurl%images/loading.gif) no-repeat center center;
64
- }
65
-
66
- div#message h2 {
67
- color: #000;
68
- font: bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
69
- margin-top: 0px;
70
- }
71
- div#message h2 a {
72
- text-decoration: none;
73
- color: #000;
74
- }
75
-
76
- div#message blockquote {
77
- padding: 0px;
78
- font-weight: bold;
79
- border-left: 5px solid #ccc;
80
- }
81
-
82
- div#message blockquote p{
83
- padding: 2px 5px;
84
- }
85
-
86
- div#message img {
87
- }
88
-
89
- div#messagebox.visiblebox {
90
- display: block;
91
- }
92
- div#messagebox.hiddenbox {
93
- display: none;
94
- }
95
- .hide { display: none; }
96
-
97
- .clear {
98
- clear: both;
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fullbackgroundfixed/images/closemessage.png DELETED
Binary file
popoverincludes/css/fullbackgroundfixed/images/closemessagebland.png DELETED
Binary file
popoverincludes/css/fullbackgroundfixed/images/loading.gif DELETED
Binary file
popoverincludes/css/fullbackgroundfixed/images/opaque.png DELETED
Binary file
popoverincludes/css/fullbackgroundfixed/images/opaque80.png DELETED
Binary file
popoverincludes/css/fullbackgroundfixed/popover.php DELETED
@@ -1,14 +0,0 @@
1
- <div id='<?php echo $popover_messagebox; ?>' class='visiblebox' style='position: fixed; <?php echo $style; ?>'>
2
- <a href='' id='closebox' title='<?php _e('Close this box','popover'); ?>'></a>
3
- <div id='message' style='<?php echo $box; ?>'>
4
- <?php echo do_shortcode($popover_content); ?>
5
- <div class='clear'></div>
6
- <?php if($popover_hideforever != 'yes') {
7
- ?>
8
- <div class='claimbutton hide'><a href='#' id='clearforever'><?php _e('Never see this message again.','popover'); ?></a></div>
9
- <?php
10
- }
11
- ?>
12
- </div>
13
- <div class='clear'></div>
14
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/fullbackgroundfixed/style.css DELETED
@@ -1,88 +0,0 @@
1
- div#messagebox {
2
- position: absolute;
3
- background: transparent url(%styleurl%images/opaque.png) repeat;
4
- z-index: 999;
5
- padding: 10px;
6
- visibility: hidden;
7
- }
8
-
9
- div#messagebox div.claimbutton {
10
- position: absolute;
11
- bottom: 0;
12
- right: 0;
13
- width: 100%;
14
- background: transparent url(%styleurl%images/opaque.png) repeat;
15
- text-align: right;
16
- padding-top: 5px;
17
- padding-bottom: 5px;
18
- }
19
-
20
- div#messagebox div.claimbutton a:visited, div#messagebox div.claimbutton a {
21
- font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
22
- color: #FFF;
23
- text-shadow: #000 1px 1px 0px;
24
- font-weight: bold;
25
- padding-right: 5px;
26
- }
27
-
28
- #message p {
29
- position: relative;
30
- clear: both;
31
- }
32
-
33
- #messagebox #closebox {
34
- position: absolute;
35
- width: 30px;
36
- height: 29px;
37
- background: transparent url(%styleurl%images/closemessagebland.png) no-repeat;
38
- top: -5px;
39
- left: -5px;
40
- z-index: 5;
41
- }
42
-
43
- div#message {
44
- position: relative;
45
- background: #fff;
46
- font: 0.9em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
47
- min-height: 90%;
48
- overflow: hidden;
49
- }
50
-
51
- div#message.waiting {
52
- background: #fff url(%styleurl%images/loading.gif) no-repeat center center;
53
- }
54
-
55
- div#message h2 {
56
- color: #000;
57
- font: bold 1.3em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
58
- margin-top: 0px;
59
- }
60
- div#message h2 a {
61
- text-decoration: none;
62
- color: #000;
63
- }
64
-
65
- div#message blockquote {
66
- padding: 0px;
67
- font-weight: bold;
68
- border-left: 5px solid #ccc;
69
- }
70
-
71
- div#message blockquote p{
72
- padding: 2px 5px;
73
- }
74
-
75
- div#message img {
76
- }
77
-
78
- div#messagebox.visiblebox {
79
- display: block;
80
- }
81
- div#messagebox.hiddenbox {
82
- display: none;
83
- }
84
- .hide { display: none; }
85
-
86
- .clear {
87
- clear: both;
88
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/popoveradmin.css DELETED
@@ -1,359 +0,0 @@
1
- /* @override http://dev.site/wp-content/plugins/popover/popoverincludes/css/popoveradmin.css?ver=4 */
2
-
3
- div.popover-liquid-left {
4
- float: left;
5
- clear: left;
6
- width: 100%;
7
- margin-right: -325px;
8
- }
9
- div.popover-liquid-right {
10
- float: right;
11
- clear: right;
12
- width: 300px;
13
- }
14
- #popover-left {
15
- margin-left: 5px;
16
- margin-right: 325px;
17
- }
18
- #popover-left #edit-popover {
19
- background-color: transparent;
20
- border: 0 none;
21
- }
22
- div.popover-holder-wrap {
23
- padding: 0;
24
- margin: 10px 0 20px;
25
- }
26
-
27
- .sidebar-name {
28
- background-color: #aaa;
29
- background-image: url(../images/ed-bg.gif);
30
- text-shadow: #FFF 0 1px 0;
31
- border-color: #dfdfdf;
32
- -moz-border-radius-topleft: 8px;
33
- -moz-border-radius-topright: 8px;
34
- -webkit-border-top-right-radius: 8px;
35
- -webkit-border-top-left-radius: 8px;
36
- -khtml-border-top-right-radius: 8px;
37
- -khtml-border-top-left-radius: 8px;
38
- border-top-right-radius: 8px;
39
- border-top-left-radius: 8px;
40
- }
41
-
42
- .sidebar-name:hover {
43
- color: #333 !Important;
44
- cursor: move;
45
- }
46
-
47
- p.description {
48
- margin: 0 12px 12px;
49
- }
50
-
51
- .section-holder {
52
- border-width: 0 1px 1px;
53
- border-style: none solid solid;
54
- -moz-border-radius-bottomleft: 8px;
55
- -moz-border-radius-bottomright: 8px;
56
- -webkit-border-bottom-right-radius: 8px;
57
- -webkit-border-bottom-left-radius: 8px;
58
- -khtml-border-bottom-right-radius: 8px;
59
- -khtml-border-bottom-left-radius: 8px;
60
- border-bottom-right-radius: 8px;
61
- border-bottom-left-radius: 8px;
62
- background-color: #f1f1f1;
63
- border-color: #ddd;
64
- padding-top: 15px;
65
- padding-bottom: 15px;
66
- margin-bottom: 20px;
67
- overflow: hidden;
68
- }
69
-
70
- .popover-holder {
71
- position: relative;
72
- background-color: #fff;
73
- border-color: #ddd;
74
- border-width: 0 1px 1px;
75
- border-style: none solid solid;
76
- -moz-border-radius-bottomleft: 8px;
77
- -moz-border-radius-bottomright: 8px;
78
- -webkit-border-bottom-right-radius: 8px;
79
- -webkit-border-bottom-left-radius: 8px;
80
- -khtml-border-bottom-right-radius: 8px;
81
- -khtml-border-bottom-left-radius: 8px;
82
- border-bottom-right-radius: 8px;
83
- border-bottom-left-radius: 8px;
84
- padding: 0;
85
- }
86
-
87
- div.popover-details {
88
- padding-top: 10px;
89
- padding-left: 10px;
90
- }
91
-
92
- .popover-holder label {
93
- margin-bottom: 10px;
94
- font-weight: bold;
95
- }
96
-
97
- input.wide {
98
- margin-top: 5px;
99
- width: 98%;
100
- margin-left: 0;
101
- margin-bottom: 5px;
102
- }
103
-
104
- #wp-popover_content-wrap {
105
- width: 98%;
106
- }
107
-
108
- .popover-holder h3 {
109
- background-color: #efefef;
110
- text-shadow: 0 1px 0 #FFFFFF;
111
- color: #000;
112
- font: normal bold 12px/2.2em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
113
- margin-left: 0;
114
- margin-right: 0;
115
- padding-left: 10px;
116
- padding-top: 2px;
117
- padding-bottom: 2px;
118
- }
119
-
120
- .placeholder-rules {
121
- width: 95%;
122
- margin-left: 15px;
123
- margin-bottom: 20px;
124
- -moz-border-radius: 5px;
125
- -webkit-border-radius: 5px;
126
- -khtml-border-radius: 5px;
127
- border-radius: 5px;
128
- border: 2px dashed #ddd;
129
- color: #a9a9a9;
130
- font-weight: bold;
131
- text-transform: uppercase;
132
- text-align: center;
133
- padding-top: 15px;
134
- padding-bottom: 15px;
135
- clear: both;
136
- min-height: 80px;
137
- }
138
-
139
- .droppable-rules {
140
- margin-right: 15px;
141
- margin-left: 15px;
142
- margin-bottom: 20px;
143
- -moz-border-radius: 5px;
144
- -webkit-border-radius: 5px;
145
- -khtml-border-radius: 5px;
146
- border-radius: 5px;
147
- border: 3px dashed #ddd;
148
- color: #a9a9a9;
149
- font-weight: bold;
150
- text-transform: uppercase;
151
- text-align: center;
152
- padding-top: 15px;
153
- padding-bottom: 15px;
154
- clear: both;
155
- }
156
-
157
- .droppable-rules.hoveringover {
158
- border: 3px dashed #78aad3;
159
- color: #78aad3;
160
- }
161
-
162
- #positive-rules {
163
- background: #fcfcfc;
164
- }
165
- #negative-rules {
166
- background: #fcfcfc;
167
- }
168
-
169
- .action-top.open {
170
- -moz-border-radius-topleft: 6px;
171
- -moz-border-radius-topright: 6px;
172
- -webkit-border-top-right-radius: 6px;
173
- -webkit-border-top-left-radius: 6px;
174
- -khtml-border-top-right-radius: 6px;
175
- -khtml-border-top-left-radius: 6px;
176
- border-top-right-radius: 6px;
177
- border-top-left-radius: 6px;
178
- background: #dfdfdf url("../images/gray-grad.png") repeat-x left top;
179
- text-shadow: #fff 0 1px 0;
180
- width: 260px;
181
- margin-left: 10px;
182
- padding: 5px 5px 5px 15px;
183
- font-weight: bold;
184
- border: 1px solid #ddd;
185
- margin-bottom: 0px;
186
- min-height: 20px;
187
- }
188
-
189
- .action-top.closed {
190
- -moz-border-radius: 6px;
191
- -webkit-border-radius: 6px;
192
- -khtml-border-radius: 6px;
193
- border-radius: 6px;
194
- border-radius: 6px;
195
- background: #dfdfdf url("../images/gray-grad.png") repeat-x left top;
196
- text-shadow: #fff 0 1px 0;
197
- width: 260px;
198
- margin-left: 10px;
199
- padding: 5px 5px 5px 15px;
200
- font-weight: bold;
201
- border: 1px solid #ddd;
202
- margin-bottom: 10px;
203
- min-height: 20px;
204
- }
205
-
206
- .action-top:hover {
207
- cursor: move;
208
- }
209
-
210
- .action-body.open {
211
- -moz-border-radius-bottomleft: 6px;
212
- -moz-border-radius-bottomright: 6px;
213
- -webkit-border-bottom-right-radius: 6px;
214
- -webkit-border-bottm-left-radius: 6px;
215
- -khtml-border-bottm-right-radius: 6px;
216
- -khtml-border-bottom-left-radius: 6px;
217
- border-bottom-right-radius: 6px;
218
- border-bottom-left-radius: 6px;
219
- background: #f7f7f7;
220
- text-shadow: #fff 0 1px 0;
221
- width: 250px;
222
- margin-left: 10px;
223
- padding: 5px 15px;
224
- font-weight: normal;
225
- border: 1px solid #ddd;
226
- margin-bottom: 10px;
227
- min-height: 20px;
228
- }
229
-
230
- .action-body.closed {
231
- display: none;
232
- }
233
-
234
- .action-button {
235
- float: right;
236
- margin-right: 0px;
237
- width: 26px;
238
- height: 20px;
239
- background: url("../images/arrows.png") no-repeat scroll 5px 3px transparent;
240
- }
241
-
242
- .action-button:hover {
243
- background: url("../images/arrows-dark.png") no-repeat scroll 5px 3px transparent;
244
- }
245
-
246
- .action-top-placeholder {
247
- -moz-border-radius: 6px;
248
- -webkit-border-radius: 6px;
249
- -khtml-border-radius: 6px;
250
- border-radius: 6px;
251
- border-radius: 6px;
252
- background: transparent;
253
- width: 250px;
254
- margin-left: 10px;
255
- padding: 5px 15px;
256
- font-weight: bold;
257
- margin-bottom: 10px;
258
- min-height: 20px;
259
- border: 1px dashed #ddd;
260
- }
261
-
262
- div.popover-operation {
263
- margin-right: 15px;
264
- margin-left: 15px;
265
- margin-bottom: 20px;
266
- -moz-border-radius: 8px;
267
- -webkit-border-radius: 8px;
268
- -khtml-border-radius: 8px;
269
- border-radius: 8px;
270
- border: 1px solid #ddd;
271
- }
272
-
273
- #upmessage p a {
274
- text-decoration: none;
275
- float:right;
276
- cursor: pointer;
277
- }
278
-
279
- h2.sidebar-name span {
280
- float: right;
281
- }
282
- h2.sidebar-name span a {
283
- text-decoration: none;
284
- font-size: 11px;
285
- }
286
-
287
- #hiden-actions {
288
- margin-left: 5px;
289
- margin-right: 325px;
290
- display: none;
291
- }
292
-
293
- div.popover-operation h2 {
294
- text-shadow: 0 1px 0 #FFFFFF;
295
- color: #000;
296
- font: normal bold 12px/2.2em "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
297
- margin-left: 0;
298
- margin-right: 0;
299
- padding-left: 10px;
300
- padding-top: 2px;
301
- padding-bottom: 2px;
302
- }
303
-
304
- div.popover-operation .inner-operation {
305
- padding: 10px;
306
- font-size: 12px;
307
- background: #fff;
308
- -moz-border-radius-bottomleft: 8px;
309
- -moz-border-radius-bottomright: 8px;
310
- -webkit-border-bottom-right-radius: 8px;
311
- -webkit-border-bottom-left-radius: 8px;
312
- -khtml-border-bottom-right-radius: 8px;
313
- -khtml-border-bottom-left-radius: 8px;
314
- border-bottom-right-radius: 8px;
315
- border-bottom-left-radius: 8px;
316
- }
317
-
318
- div.popover-operation .inner-operation p {
319
- margin-top: 0;
320
- }
321
-
322
- div.popover-operation .inner-operation p.description {
323
- margin: 10px 0 0;
324
- }
325
-
326
- #positive-rules-holder, #negative-rules-holder {
327
- clear: both;
328
- }
329
-
330
- div.buttons {
331
- text-align: right;
332
- padding: 10px 15px 10px 10px;
333
- }
334
- div.buttons a.cancellink {
335
- margin-right: 10px;
336
- font-size: 12px;
337
- text-decoration: underline;
338
- color: #797979;
339
- }
340
-
341
- .no-movecursor {
342
- cursor: auto !Important;
343
- }
344
-
345
- #upmessage p {
346
- padding: 5px;
347
- margin-top: 0;
348
- margin-bottom: 10px;
349
- background-color: #ffffe0;
350
- border: 1px solid #e6db55;
351
- margin-right: 15px;
352
- }
353
-
354
- #popovernotonurl, #popoveronurl {
355
- width: 99%;
356
- min-height: 10em;
357
- }
358
-
359
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/css/popovermenu.css DELETED
@@ -1,46 +0,0 @@
1
- /* @override http://dev.site/wp-content/plugins/popover/popoverincludes/css/popovermenu.css?ver=3 */
2
-
3
- td.check-drag {
4
-
5
- }
6
-
7
- tr.draghandle a.draganchor {
8
- float: left;
9
- display: inline;
10
- width: 20px;
11
- display: block;
12
- text-decoration: none;
13
- width: 16px;
14
- height: 16px;
15
- background: url(../images/drag.png) no-repeat center;
16
- cursor: move;
17
- padding: 0;
18
- margin: 0;
19
- }
20
-
21
- td.check-drag {
22
- vertical-align: top;
23
- padding: 5px 2px 0 5px;
24
- }
25
-
26
- td.check-column {
27
- vertical-align: top;
28
- padding: 3px 2px 0 0 !Important;
29
- }
30
-
31
- td.check-column input {
32
- margin: 0 0 0 8px;
33
- }
34
-
35
- tr.draghandle:hover td.check-drag {
36
- background: url(../images/drag.png) no-repeat 5px 7px;
37
- cursor: move;
38
- }
39
-
40
- tr.draghandle td.check-drag {
41
- background: transparent;
42
- }
43
-
44
- tr.dragging {
45
- background-color: #edf3fe;
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/help/images/addonslist.png DELETED
Binary file
popoverincludes/help/images/popoveractivate.png DELETED
Binary file
popoverincludes/help/images/popovercontent.png DELETED
Binary file
popoverincludes/help/images/popoverdeactivate.png DELETED
Binary file
popoverincludes/help/images/popoverdragconditions.png DELETED
Binary file
popoverincludes/help/images/popovermove.png DELETED
Binary file
popoverincludes/help/images/popoversettings.png DELETED
Binary file
popoverincludes/help/popover.help.php DELETED
@@ -1,14 +0,0 @@
1
- <h2><?php _e('Introduction','popover'); ?></h2>
2
- <p><?php _e('The main Pop Over screen show all of the Pop Overs you have set up, you can edit, activate / deactivate and reorder the priority of the Pop Overs using this screen.','popover'); ?></p>
3
- <h2><?php _e('Adding a Pop Over','popover'); ?></h2>
4
- <p><?php _e('To add a Pop Over you can either click on the <strong>Add New</strong> link near the top of the page, or click on the <strong>Create New</strong> menu item in the main Popover menu.','pop Over'); ?></p>
5
- <h2><?php _e('Activating / Deactivating a Popover','popover'); ?></h2>
6
- <p><?php _e('If you find that you do not need a particular Pop Over for a period of time, but want to keep it for later use, then clicking on the Deactivate link underneath the Pop Overs title will ensure the Pop Over is not included in the processing.','popover'); ?></p>
7
- <p><?php popover_helpimage('popoverdeactivate.png'); ?></p>
8
- <p><?php _e('You can re-activate at any time by clicking on the Activate link underneath the Pop Overs title','popover'); ?></p>
9
- <p><?php popover_helpimage('popoveractivate.png'); ?></p>
10
- <h2><?php _e('Ordering Pop Overs','popover'); ?></h2>
11
- <p><?php _e('The Pop Overs are processed in the order they show in the list. As soon as a Pop Over is shown, the remainder of the Pop Overs in the list are ignored. You can change the order of the Pop Overs processing by clicking in the left hand column of the list and dragging the relevant pop Over to the desired location.','popover'); ?></p>
12
- <p><?php popover_helpimage('popovermove.png'); ?></p>
13
- <h2><?php _e('Deleting Pop Overs','popover'); ?></h2>
14
- <p><?php _e('Once you have finished with a Pop Over you can delete it by clicking on the Delete link underneath the Pop Overs title.','popover'); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/help/popoveraddons.help.php DELETED
@@ -1,3 +0,0 @@
1
- <h2><?php _e('Introduction','popover'); ?></h2>
2
- <p><?php _e('Add-ons allow you to extend the Pop Over plugin. The Add-on screen lists all of the Add-ons currently installed. To activate or deactivate an Add-on you should click on the Activate or Deactivate link underneath the Add-ons title.','popover'); ?></p>
3
- <p><?php popover_helpimage('addonslist.png'); ?></p>
 
 
 
popoverincludes/help/popoveredit.help.php DELETED
@@ -1,14 +0,0 @@
1
- <h2><?php _e('Adding / Editing a Pop Over','popover'); ?></h2>
2
- <p><?php _e('A Pop Over should have the following information.','popover'); ?></p>
3
- <ul>
4
- <li><?php _e('<strong>A Title</strong> - The Pop Over title helps you to identify different Pop Overs in the main list.','popover'); ?></li>
5
- <li><?php _e('<strong>Pop Over content</strong> - This is the content that the Pop Over will display. You can upload any images you require by clicking on the Add Media button at the top of the edit area.','popover'); ?>
6
- <p><?php popover_helpimage('popovercontent.png'); ?></p>
7
- </li>
8
- <li><?php _e('<strong>Active Conditions</strong> - You can determine the conditions that need to be fulfilled in order for this Pop Over to display by dragging the relevant conditions in the the <strong>Drop Here</strong> box. All of the conditions must be true in order for the Pop Over to display.','popover'); ?>
9
- <p><?php popover_helpimage('popoverdragconditions.png'); ?></p>
10
- </li>
11
- <li><?php _e('<strong>Appearance Settings</strong> - You can set the size and position of the Pop Over by setting the Appearance options. If you want the Pop Over system to attempt to determine the size of the Pop Overs content and automatically resize the Pop Over and attempt to center it on your browser window.','popover'); ?>
12
- <p><?php popover_helpimage('popoversettings.png'); ?></p>
13
- </li>
14
- </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/images/arrows-dark.png DELETED
Binary file
popoverincludes/images/arrows.png DELETED
Binary file
popoverincludes/images/closemessage.png DELETED
Binary file
popoverincludes/images/closemessagebland.png DELETED
Binary file
popoverincludes/images/drag.png DELETED
Binary file
popoverincludes/images/ed-bg.gif DELETED
Binary file
popoverincludes/images/gray-grad.png DELETED
Binary file
popoverincludes/images/loading.gif DELETED
Binary file
popoverincludes/images/olddrag.png DELETED
Binary file
popoverincludes/images/opaque.png DELETED
Binary file
popoverincludes/images/window.png DELETED
Binary file
popoverincludes/includes/class_wd_help_tooltips.php DELETED
@@ -1,463 +0,0 @@
1
- <?php
2
- /**
3
- * Very simple tooltip implementation for admin pages.
4
- *
5
- * Example usage:
6
- * <code>
7
- * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php';
8
- * $tips = new WpmuDev_HelpTooltips();
9
- * $tips->set_icon_url("URL_TO_YOUR_ICON");
10
- * echo $tips->add_tip("Tip 1 text here");
11
- * // ...
12
- * echo $tips->add_tip("Tip 2 text here");
13
- * </code>
14
- * This is a basic usage scenario.
15
- *
16
- * Alternative usage example:
17
- * <code>
18
- * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php';
19
- * $tips = new WpmuDev_HelpTooltips();
20
- * $tips->set_icon_url("URL_TO_YOUR_ICON");
21
- * $tips->bind_tip('My tip text here', '.icon32:first ~h2');
22
- * // Note that you don't echo anything in this usage example - the tip will be
23
- * // added automatically next to the supplied selector (second argument)
24
- * </code>
25
- * This scenario may be useful for e.g. adding our tips to UI elements created by WP or other plugins.
26
- * You can freely alternate between add_tip() and bind_tip() methods,
27
- * just remember to echo add_tip() and *not* echo bind_tip().
28
- *
29
- * Another alternative usage example, setting tips for multiple pages in one place:
30
- * <code>
31
- * if (!class_exists('WpmuDev_HelpTooltips')) require_once YOUR_PLUGIN_BASE_DIR . '/lib/external/class_wd_help_tooltips.php';
32
- * // Tips added to $tips1 object will only show on Social Marketing add/edit advert page
33
- * $tips1 = new WpmuDev_HelpTooltips();
34
- * $tips1->set_icon_url("URL_TO_YOUR_ICON");
35
- * $tips1->set_screen_id("social_marketing_ad");
36
- * $tips1->bind_tip('My tip 1 text here', '.icon32:first ~h2');
37
- * // ...
38
- * // Tips added to $tips2 object will only show on Social Marketing getting started page
39
- * $tips2 = new WpmuDev_HelpTooltips();
40
- * $tips2->set_icon_url("URL_TO_YOUR_ICON");
41
- * $tips2->set_screen_id("social_marketing_ad_page_wdsm-get_started");
42
- * $tips2->bind_tip('My tip 2 text here', '.icon32:first ~h2');
43
- * </code>
44
- * Using add_tip() method will do nothing in this last scenario, as it doesn't make sense in that context.
45
- * This scenario may be useful for adding tooltips to all pages in one central location.
46
- * E.g. for adding tooltips in a plugin add-on.
47
- */
48
-
49
- if(!class_exists('WpmuDev_HelpTooltips')) {
50
- class WpmuDev_HelpTooltips {
51
-
52
- /**
53
- * Holds an array of inline tips: used as dependency inclusion switch.
54
- */
55
- private $_inline_tips = array();
56
-
57
- /**
58
- * Holds an array of bound tips: used as dependency inclusion switch and bound tips buffer.
59
- */
60
- private $_bound_tips = array();
61
-
62
- /**
63
- * Holds an array of bound tips selectors: used as bound tips selectors buffer.
64
- */
65
- private $_bound_selectors = array();
66
-
67
- /**
68
- * Full URL to help icon, which is used as tip anchor
69
- * and as notice background image.
70
- */
71
- private $_icon_url;
72
-
73
- /**
74
- * Flag that determines do we want to use notices
75
- * (tips expanded on click).
76
- * Defaults to true.
77
- */
78
- private $_use_notice = true;
79
-
80
- /**
81
- * Limits tip output to a screen (page).
82
- * Optional.
83
- * Works best with bind_tip() method.
84
- */
85
- private $_screen_id = false;
86
-
87
- /**
88
- * Bind to footer hooks when instantiated.
89
- */
90
- public function __construct () {
91
- global $wp_version;
92
- $version = preg_replace('/-.*$/', '', $wp_version);
93
-
94
- if (version_compare($version, '3.3', '>=')) {
95
- add_action('admin_footer', array($this, 'add_bound_tips'), 999);
96
- add_action('admin_print_footer_scripts', array($this, 'initialize'));
97
- }
98
- }
99
-
100
- /**
101
- * Sets icon URL.
102
- * @param string $icon_url Full URL to help anchor icon
103
- */
104
- public function set_icon_url ($icon_url) {
105
- $this->_icon_url = $icon_url;
106
- }
107
-
108
- /**
109
- * Set show notices (tips expanded on click) flag.
110
- * @param bool $use_notice True to use notices (default), false otherwise.
111
- */
112
- public function set_use_notice ($use_notice=true) {
113
- $this->_use_notice = $use_notice;
114
- }
115
-
116
- /**
117
- * Set screen limiting flag.
118
- * @param $screen_id Screen ID that tips in this object apply to.
119
- */
120
- public function set_screen_id ($screen_id) {
121
- $this->_screen_id = $screen_id;
122
- }
123
-
124
- /**
125
- * Returns inline tip markup.
126
- * Scenario: for echoing inline tips next to elements on the page.
127
- * Usage example:
128
- * <code>
129
- * echo $tips->add_tip('My tip text here');
130
- * </code>
131
- * @param string $tip Tip text
132
- * @return string Inline tip markup
133
- */
134
- public function add_tip ($tip) {
135
- if (!$this->_check_screen()) return false;
136
- $this->_inline_tips[] = $tip;
137
- return $this->_get_tip_markup($tip);
138
- }
139
-
140
- /**
141
- * Binds a tip to selector.
142
- * This is different from inline tips, as you don't have to output them yourself.
143
- * Scenario: for adding help tips next to elements determined by the selector on page load time.
144
- * Usage example:
145
- * <code>
146
- * $tips->bind_tip('My tip text here', '.icon32:first ~h2');
147
- * </code>
148
- * @param string $tip Tip text
149
- * @param string $selector jQuery selector of the element that tip is related to.
150
- */
151
- public function bind_tip ($tip, $bind_to_selector) {
152
- $tip_id = 'wpmudev-help-tip-for-' . md5($bind_to_selector);
153
- $this->_bound_tips[$tip_id] = $tip;
154
- $this->_bound_selectors[$tip_id] = $bind_to_selector;
155
- }
156
-
157
- /**
158
- * Bounded tips injection handler.
159
- * Will queue up the bounded tips.
160
- */
161
- function add_bound_tips () {
162
- if (!$this->_check_screen()) return false;
163
- if (!$this->_bound_tips) return false;
164
-
165
- foreach ($this->_bound_tips as $id => $tip) {
166
- echo $this->_get_tip_markup($tip, 'id="' . $id . '" style=display:none');
167
- }
168
- }
169
-
170
- /**
171
- * Dependency injection handler.
172
- * Will only add dependencies if there are actual tooltips to show.
173
- */
174
- function initialize () {
175
- if (!$this->_check_screen()) return false;
176
- if (!$this->_inline_tips && !$this->_bound_tips) return false;
177
-
178
- $this->_print_styles();
179
- $this->_print_scripts();
180
- }
181
-
182
- /**
183
- * Screen limitation check.
184
- * @return bool True if we're good to go, false if we're on a wrong screen.
185
- */
186
- private function _check_screen () {
187
- if (!$this->_screen_id) return true; // No screen dependency
188
-
189
- $screen = get_current_screen();
190
- if (!is_object($screen)) return false; // Actually older then 3.3
191
- if ($this->_screen_id != @$screen->id) return false; // Not for this screen
192
-
193
- return true;
194
- }
195
-
196
- private function _get_tip_markup ($tip, $arg='') {
197
- return "<span class='wpmudev-help' {$arg}>{$tip}</span>";
198
- }
199
-
200
- /**
201
- * Private helper method that prints style dependencies.
202
- */
203
- private function _print_styles () {
204
- // Have we already done this?
205
- if (!defined('WPMUDEV_TOOLTIPS_CSS_ADDED')) define('WPMUDEV_TOOLTIPS_CSS_ADDED', true);
206
- else return false;
207
-
208
- ?>
209
- <style type="text/css">
210
- .wpmudev-help {
211
- display: block;
212
- background-color: #ffffe0;
213
- border: 1px solid #e6db55;
214
- padding: 1em 1em;
215
- -moz-border-radius:3px;
216
- -khtml-border-radius:3px;
217
- -webkit-border-radius:3px;
218
- border-radius:3px;
219
- }
220
- <?php
221
- if ($this->_icon_url) {
222
- ?>
223
- .wpmudev-help {
224
- background: url(<?php echo $this->_icon_url; ?>) no-repeat scroll 10px center #ffffe0;
225
- padding-left: 40px;
226
- }
227
- .wpmudev-help-trigger span {
228
- display: block;
229
- position: absolute;
230
- left: -12000000px;
231
- }
232
- .wpmudev-help-trigger {
233
- position: relative;
234
- background: url(<?php echo $this->_icon_url; ?>) no-repeat scroll center bottom transparent;
235
- padding: 1px 12px;
236
- text-decoration: none;
237
- }
238
- <?php
239
- }
240
- ?>
241
- #wpmudev-tooltip-source {
242
- margin: 0 13px;
243
- padding: 8px;
244
-
245
- background: #fff;
246
- border-style: solid;
247
- border-width: 1px;
248
- /* Fallback for non-rgba-compliant browsers */
249
- border-color: #dfdfdf;
250
- /* Use rgba to look better against non-white backgrounds. */
251
- border-color: rgba(0,0,0,.125);
252
- -webkit-border-radius: 3px;
253
- border-radius: 3px;
254
-
255
- -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.19);
256
- -moz-box-shadow: 0 2px 4px rgba(0,0,0,.19);
257
- box-shadow: 0 2px 4px rgba(0,0,0,.19);
258
- }
259
- .wpmudev-left_pointer {
260
- float: left;
261
- width: 14px;
262
- height: 30px;
263
- margin-top: 8px;
264
- background: url(<?php echo site_url("/wp-includes/images/arrow-pointer-blue.png");?>) 0 -15px no-repeat;
265
- }
266
- .wpmudev-right_pointer {
267
- float: right;
268
- width: 14px;
269
- height: 30px;
270
- margin-top: 8px;
271
- background: url(<?php echo site_url("/wp-includes/images/arrow-pointer-blue.png");?>) -16px -15px no-repeat;
272
- }
273
- </style>
274
- <?php
275
- }
276
-
277
- /**
278
- * Private helper method that prints javascript dependencies.
279
- */
280
- private function _print_scripts () {
281
- // Have we already done this?
282
- if (!defined('WPMUDEV_TOOLTIPS_JS_ADDED')) define('WPMUDEV_TOOLTIPS_JS_ADDED', true);
283
- else return false;
284
-
285
- // Initialize bound selectors
286
- $selectors = json_encode($this->_bound_selectors);
287
-
288
- ?>
289
- <script type="text/javascript">
290
- (function ($) {
291
-
292
- /**
293
- * Converts help text placeholders to tooltip items.
294
- */
295
- function initialize_help_item ($me) {
296
- var $prev = $me.prev();
297
- var help = '&nbsp;<a class="wpmudev-help-trigger" href="#help"><span><?php _e('Help');?></span></a>';
298
- $prev = $prev.length ?
299
- $prev.after(help)
300
- :
301
- $me.before(help)
302
- ;
303
- $me.hide();
304
- }
305
-
306
- /**
307
- * Finds a help block corresponding to trigger.
308
- */
309
- function get_help_block ($me) {
310
- var $parent = $me.parent();
311
- return $parent.find('.wpmudev-help');
312
- }
313
-
314
- /**
315
- * Handles help block visibility.
316
- */
317
- function show_help_block ($me) {
318
- var $help = get_help_block($me);
319
- if (!$help.length) return false;
320
-
321
- if ($("#wpmudev-tooltip").length) $("#wpmudev-tooltip").remove();
322
- if ($help.is(":visible")) $help.hide('fast');
323
- else $help.show('fast');
324
- }
325
-
326
- /**
327
- * Pops tooltip open.
328
- */
329
- function open_tooltip ($me) {
330
- var $help = get_help_block($me);
331
- if ($help.is(":visible")) return false;
332
-
333
- if ($("#wpmudev-tooltip").length) $("#wpmudev-tooltip").remove();
334
- if (!$("#wpmudev-tooltip").length) $("body").append('<div id="wpmudev-tooltip"><div class="wpmudev-pointer wpmudev-left_pointer"></div><div id="wpmudev-tooltip-source"></div></div>');
335
- var $tip = $("#wpmudev-tooltip");
336
- if (!$tip.length) return false;
337
-
338
- var width = 200;
339
- var margin = 20;
340
- var src_pos = $me.offset();
341
-
342
- var top_pos = src_pos.top + ($me.height() / 2);
343
- var left_pos = src_pos.left + margin;
344
- var $pointer = $tip.find(".wpmudev-pointer");
345
-
346
- // Setup left/right orientation
347
- <?php if (!is_rtl()) { ?>
348
- if ((left_pos+width+60) >= $(window).width()) {
349
- left_pos = src_pos.left - ($me.outerWidth()+width+margin);
350
- $pointer
351
- .removeClass("wpmudev-left_pointer")
352
- .addClass("wpmudev-right_pointer")
353
- ;
354
- }
355
- <?php } else { ?>
356
- var min_left = left_pos - (width+60);
357
- if (min_left > 0) {
358
- left_pos = min_left;
359
- $pointer
360
- .removeClass("wpmudev-left_pointer")
361
- .addClass("wpmudev-right_pointer")
362
- ;
363
- }
364
- <?php } ?>
365
-
366
- // IE safeguard
367
- if ($.browser.msie) {
368
- var $pointer_left = $tip.find(".wpmudev-left_pointer");
369
- if ($pointer_left.length) $pointer_left.css("position", "absolute");
370
- }
371
-
372
- $tip
373
- // Populate tip text
374
- .find("#wpmudev-tooltip-source")
375
- .width(width)
376
- .html($help.html())
377
- .end()
378
- // Position tip
379
- .css({
380
- "position": "absolute",
381
- })
382
- .offset({
383
- "top": top_pos - ($tip.height()/2),
384
- "left": left_pos
385
- })
386
- // Vertically align pointer
387
- .find(".wpmudev-pointer")
388
- .css({
389
- "margin-top": ($tip.height() - 32) / 2
390
- })
391
- .end()
392
- // Show entire tip
393
- .show()
394
- ;
395
- }
396
-
397
- /**
398
- * Closes tooltip.
399
- */
400
- function close_tooltip () {
401
- if (!$("#wpmudev-tooltip").length) return false;
402
-
403
- // IE conditional alternate removal
404
- if ($.browser.msie) {
405
- $("#wpmudev-tooltip").hide('fast');
406
- } else {
407
- // Not IE, do regular transparency animation
408
- $("#wpmudev-tooltip")
409
- .animate({
410
- "opacity": 0
411
- },
412
- 'fast',
413
- function () {
414
- $(this).remove();
415
- }
416
- );
417
- }
418
- }
419
-
420
-
421
- // Init
422
- $(function () {
423
-
424
- // Populate and place bound tips
425
- $.each($.parseJSON('<?php echo $selectors; ?>'), function (tip_id, selector) {
426
- var $tip = $("#" + tip_id);
427
- if (!$tip.length) return true;
428
-
429
- var $selector = $(selector);
430
- if (!$selector.length) return true;
431
-
432
- $selector.append($tip);
433
- });
434
-
435
- // Initialize help and add handles
436
- $(".wpmudev-help").each(function () {
437
- initialize_help_item($(this));
438
-
439
- });
440
-
441
- // Handle help requests
442
- $(".wpmudev-help-trigger")
443
- .click(function (e) {
444
- <?php if ($this->_use_notice) { ?>
445
- show_help_block($(this));
446
- <?php } ?>
447
- return false;
448
- })
449
- .mouseover(function (e) {
450
- open_tooltip($(this));
451
-
452
- })
453
- .mouseout(close_tooltip)
454
- ;
455
-
456
-
457
- });
458
- })(jQuery);
459
- </script>
460
- <?php
461
- }
462
- }
463
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/includes/config.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- // a true setting for PO_GLOBAL means that this plugin operates on a global site-admin basis
3
- // setting this to false means that the plugin operates on a blog by blog basis
4
- if(!defined('PO_GLOBAL')) define('PO_GLOBAL', false);
5
- // The url that we are using to return the country - it should only return the country code for the passed IP address
6
- if(!defined('PO_REMOTE_IP_URL')) define('PO_REMOTE_IP_URL', 'http://api.hostip.info/country.php?ip=%ip%');
7
- // If there is a problem with the API, then you can set a default country to use for popover showing. Set this to false if you'd rather have the popover not show in such circumstances
8
- if(!defined('PO_DEFAULT_COUNTRY')) define('PO_DEFAULT_COUNTRY', 'US');
9
- // Set plugin directory
10
- if(!defined('PO_PLUGIN_DIR')) define('PO_PLUGIN_DIR', 'wordpress-popup');
11
- ?>
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/includes/functions.php DELETED
@@ -1,432 +0,0 @@
1
- <?php
2
-
3
- function set_popover_url($base) {
4
-
5
- global $popover_url;
6
-
7
- if(defined('WPMU_PLUGIN_URL') && defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . '/' . basename($base))) {
8
- $popover_url = trailingslashit(WPMU_PLUGIN_URL);
9
- } elseif(defined('WP_PLUGIN_URL') && defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/'.PO_PLUGIN_DIR.'/' . basename($base))) {
10
- $popover_url = trailingslashit(WP_PLUGIN_URL . '/'.PO_PLUGIN_DIR);
11
- } else {
12
- $popover_url = trailingslashit(WP_PLUGIN_URL . '/'.PO_PLUGIN_DIR);
13
- }
14
-
15
- }
16
-
17
- function set_popover_dir($base) {
18
-
19
- global $popover_dir;
20
-
21
- if(defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . '/' . basename($base))) {
22
- $popover_dir = trailingslashit(WPMU_PLUGIN_URL);
23
- } elseif(defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/'.PO_PLUGIN_DIR.'/' . basename($base))) {
24
- $popover_dir = trailingslashit(WP_PLUGIN_DIR . '/'.PO_PLUGIN_DIR);
25
- } else {
26
- $popover_dir = trailingslashit(WP_PLUGIN_DIR . '/'.PO_PLUGIN_DIR);
27
- }
28
-
29
-
30
- }
31
-
32
- function popover_url($extended) {
33
-
34
- global $popover_url;
35
-
36
- return $popover_url . $extended;
37
-
38
- }
39
-
40
- function popover_dir($extended) {
41
-
42
- global $popover_dir;
43
-
44
- return $popover_dir . $extended;
45
-
46
-
47
- }
48
-
49
- function popover_helpimage( $image ) {
50
- echo "<img src='" . popover_url('popoverincludes/help/images/' . $image) . "' />";
51
- }
52
-
53
- function popover_db_prefix(&$wpdb, $table) {
54
-
55
- if( defined('PO_GLOBAL') && PO_GLOBAL == true ) {
56
- if(!empty($wpdb->base_prefix)) {
57
- return $wpdb->base_prefix . $table;
58
- } else {
59
- return $wpdb->prefix . $table;
60
- }
61
- } else {
62
- return $wpdb->prefix . $table;
63
- }
64
-
65
- }
66
-
67
- function get_popover_addons() {
68
- if ( is_dir( popover_dir('popoverincludes/addons') ) ) {
69
- if ( $dh = opendir( popover_dir('popoverincludes/addons') ) ) {
70
- $pop_addons = array ();
71
- while ( ( $addon = readdir( $dh ) ) !== false )
72
- if ( substr( $addon, -4 ) == '.php' )
73
- $pop_addons[] = $addon;
74
- closedir( $dh );
75
- sort( $pop_addons );
76
-
77
- return apply_filters('popover_available_addons', $pop_addons);
78
-
79
- }
80
- }
81
-
82
- return false;
83
- }
84
-
85
- function load_popover_addons() {
86
-
87
- $addons = get_option('popover_activated_addons', array());
88
-
89
- if ( is_dir( popover_dir('popoverincludes/addons') ) ) {
90
- if ( $dh = opendir( popover_dir('popoverincludes/addons') ) ) {
91
- $pop_addons = array ();
92
- while ( ( $addon = readdir( $dh ) ) !== false )
93
- if ( substr( $addon, -4 ) == '.php' )
94
- $pop_addons[] = $addon;
95
- closedir( $dh );
96
- sort( $pop_addons );
97
-
98
- $pop_addons = apply_filters('popover_available_addons', $pop_addons);
99
-
100
- foreach( $pop_addons as $pop_addon ) {
101
- if(in_array($pop_addon, (array) $addons)) {
102
- include_once( popover_dir('popoverincludes/addons/' . $pop_addon) );
103
- }
104
- }
105
-
106
- }
107
- }
108
- }
109
-
110
- function load_all_popover_addons() {
111
- if ( is_dir( popover_dir('popoverincludes/addons') ) ) {
112
- if ( $dh = opendir( popover_dir('popoverincludes/addons') ) ) {
113
- $pop_addons = array ();
114
- while ( ( $addon = readdir( $dh ) ) !== false )
115
- if ( substr( $addon, -4 ) == '.php' )
116
- $pop_addons[] = $addon;
117
- closedir( $dh );
118
- sort( $pop_addons );
119
- foreach( $pop_addons as $pop_addon )
120
- include_once( popover_dir('popoverincludes/addons/' . $pop_addon) );
121
- }
122
- }
123
- }
124
-
125
- function P_style_urls( $styles = array() ) {
126
-
127
- $styles['Default'] = popover_url('popoverincludes/css/default');
128
- $styles['Default Fixed'] = popover_url('popoverincludes/css/fixed');
129
- $styles['Dark Background Fixed'] = popover_url('popoverincludes/css/fullbackground');
130
-
131
- return $styles;
132
- }
133
- add_filter( 'popover_available_styles_url', 'P_style_urls');
134
-
135
- function P_style_dirs() {
136
- $styles['Default'] = popover_dir('popoverincludes/css/default');
137
- $styles['Default Fixed'] = popover_dir('popoverincludes/css/fixed');
138
- $styles['Dark Background Fixed'] = popover_dir('popoverincludes/css/fullbackground');
139
-
140
- return $styles;
141
- }
142
- add_filter( 'popover_available_styles_directory', 'P_style_dirs');
143
-
144
- /* country list array from http://snipplr.com/view.php?codeview&id=33825 */
145
- function P_CountryList() {
146
-
147
- $textdomain = 'popover';
148
-
149
- $countries = array(
150
- "AU" => __("Australia", $textdomain ),
151
- "AF" => __("Afghanistan", $textdomain ),
152
- "AL" => __("Albania", $textdomain ),
153
- "DZ" => __("Algeria", $textdomain ),
154
- "AS" => __("American Samoa", $textdomain ),
155
- "AD" => __("Andorra", $textdomain ),
156
- "AO" => __("Angola", $textdomain ),
157
- "AI" => __("Anguilla", $textdomain ),
158
- "AQ" => __("Antarctica", $textdomain ),
159
- "AG" => __("Antigua & Barbuda", $textdomain ),
160
- "AR" => __("Argentina", $textdomain ),
161
- "AM" => __("Armenia", $textdomain ),
162
- "AW" => __("Aruba", $textdomain ),
163
- "AT" => __("Austria", $textdomain ),
164
- "AZ" => __("Azerbaijan", $textdomain ),
165
- "BS" => __("Bahamas", $textdomain ),
166
- "BH" => __("Bahrain", $textdomain ),
167
- "BD" => __("Bangladesh", $textdomain ),
168
- "BB" => __("Barbados", $textdomain ),
169
- "BY" => __("Belarus", $textdomain ),
170
- "BE" => __("Belgium", $textdomain ),
171
- "BZ" => __("Belize", $textdomain ),
172
- "BJ" => __("Benin", $textdomain ),
173
- "BM" => __("Bermuda", $textdomain ),
174
- "BT" => __("Bhutan", $textdomain ),
175
- "BO" => __("Bolivia", $textdomain ),
176
- "BA" => __("Bosnia/Hercegovina", $textdomain ),
177
- "BW" => __("Botswana", $textdomain ),
178
- "BV" => __("Bouvet Island", $textdomain ),
179
- "BR" => __("Brazil", $textdomain ),
180
- "IO" => __("British Indian Ocean Territory", $textdomain ),
181
- "BN" => __("Brunei Darussalam", $textdomain ),
182
- "BG" => __("Bulgaria", $textdomain ),
183
- "BF" => __("Burkina Faso", $textdomain ),
184
- "BI" => __("Burundi", $textdomain ),
185
- "KH" => __("Cambodia", $textdomain ),
186
- "CM" => __("Cameroon", $textdomain ),
187
- "CA" => __("Canada", $textdomain ),
188
- "CV" => __("Cape Verde", $textdomain ),
189
- "KY" => __("Cayman Is", $textdomain ),
190
- "CF" => __("Central African Republic", $textdomain ),
191
- "TD" => __("Chad", $textdomain ),
192
- "CL" => __("Chile", $textdomain ),
193
- "CN" => __("China, People's Republic of", $textdomain ),
194
- "CX" => __("Christmas Island", $textdomain ),
195
- "CC" => __("Cocos Islands", $textdomain ),
196
- "CO" => __("Colombia", $textdomain ),
197
- "KM" => __("Comoros", $textdomain ),
198
- "CG" => __("Congo", $textdomain ),
199
- "CD" => __("Congo, Democratic Republic", $textdomain ),
200
- "CK" => __("Cook Islands", $textdomain ),
201
- "CR" => __("Costa Rica", $textdomain ),
202
- "CI" => __("Cote d'Ivoire", $textdomain ),
203
- "HR" => __("Croatia", $textdomain ),
204
- "CU" => __("Cuba", $textdomain ),
205
- "CY" => __("Cyprus", $textdomain ),
206
- "CZ" => __("Czech Republic", $textdomain ),
207
- "DK" => __("Denmark", $textdomain ),
208
- "DJ" => __("Djibouti", $textdomain ),
209
- "DM" => __("Dominica", $textdomain ),
210
- "DO" => __("Dominican Republic", $textdomain ),
211
- "TP" => __("East Timor", $textdomain ),
212
- "EC" => __("Ecuador", $textdomain ),
213
- "EG" => __("Egypt", $textdomain ),
214
- "SV" => __("El Salvador", $textdomain ),
215
- "GQ" => __("Equatorial Guinea", $textdomain ),
216
- "ER" => __("Eritrea", $textdomain ),
217
- "EE" => __("Estonia", $textdomain ),
218
- "ET" => __("Ethiopia", $textdomain ),
219
- "FK" => __("Falkland Islands", $textdomain ),
220
- "FO" => __("Faroe Islands", $textdomain ),
221
- "FJ" => __("Fiji", $textdomain ),
222
- "FI" => __("Finland", $textdomain ),
223
- "FR" => __("France", $textdomain ),
224
- "FX" => __("France, Metropolitan", $textdomain ),
225
- "GF" => __("French Guiana", $textdomain ),
226
- "PF" => __("French Polynesia", $textdomain ),
227
- "TF" => __("French South Territories", $textdomain ),
228
- "GA" => __("Gabon", $textdomain ),
229
- "GM" => __("Gambia", $textdomain ),
230
- "GE" => __("Georgia", $textdomain ),
231
- "DE" => __("Germany", $textdomain ),
232
- "GH" => __("Ghana", $textdomain ),
233
- "GI" => __("Gibraltar", $textdomain ),
234
- "GR" => __("Greece", $textdomain ),
235
- "GL" => __("Greenland", $textdomain ),
236
- "GD" => __("Grenada", $textdomain ),
237
- "GP" => __("Guadeloupe", $textdomain ),
238
- "GU" => __("Guam", $textdomain ),
239
- "GT" => __("Guatemala", $textdomain ),
240
- "GN" => __("Guinea", $textdomain ),
241
- "GW" => __("Guinea-Bissau", $textdomain ),
242
- "GY" => __("Guyana", $textdomain ),
243
- "HT" => __("Haiti", $textdomain ),
244
- "HM" => __("Heard Island And Mcdonald Island", $textdomain ),
245
- "HN" => __("Honduras", $textdomain ),
246
- "HK" => __("Hong Kong", $textdomain ),
247
- "HU" => __("Hungary", $textdomain ),
248
- "IS" => __("Iceland", $textdomain ),
249
- "IN" => __("India", $textdomain ),
250
- "ID" => __("Indonesia", $textdomain ),
251
- "IR" => __("Iran", $textdomain ),
252
- "IQ" => __("Iraq", $textdomain ),
253
- "IE" => __("Ireland", $textdomain ),
254
- "IL" => __("Israel", $textdomain ),
255
- "IT" => __("Italy", $textdomain ),
256
- "JM" => __("Jamaica", $textdomain ),
257
- "JP" => __("Japan", $textdomain ),
258
- "JT" => __("Johnston Island", $textdomain ),
259
- "JO" => __("Jordan", $textdomain ),
260
- "KZ" => __("Kazakhstan", $textdomain ),
261
- "KE" => __("Kenya", $textdomain ),
262
- "KI" => __("Kiribati", $textdomain ),
263
- "KP" => __("Korea, Democratic Peoples Republic", $textdomain ),
264
- "KR" => __("Korea, Republic of", $textdomain ),
265
- "KW" => __("Kuwait", $textdomain ),
266
- "KG" => __("Kyrgyzstan", $textdomain ),
267
- "LA" => __("Lao People's Democratic Republic", $textdomain ),
268
- "LV" => __("Latvia", $textdomain ),
269
- "LB" => __("Lebanon", $textdomain ),
270
- "LS" => __("Lesotho", $textdomain ),
271
- "LR" => __("Liberia", $textdomain ),
272
- "LY" => __("Libyan Arab Jamahiriya", $textdomain ),
273
- "LI" => __("Liechtenstein", $textdomain ),
274
- "LT" => __("Lithuania", $textdomain ),
275
- "LU" => __("Luxembourg", $textdomain ),
276
- "MO" => __("Macau", $textdomain ),
277
- "MK" => __("Macedonia", $textdomain ),
278
- "MG" => __("Madagascar", $textdomain ),
279
- "MW" => __("Malawi", $textdomain ),
280
- "MY" => __("Malaysia", $textdomain ),
281
- "MV" => __("Maldives", $textdomain ),
282
- "ML" => __("Mali", $textdomain ),
283
- "MT" => __("Malta", $textdomain ),
284
- "MH" => __("Marshall Islands", $textdomain ),
285
- "MQ" => __("Martinique", $textdomain ),
286
- "MR" => __("Mauritania", $textdomain ),
287
- "MU" => __("Mauritius", $textdomain ),
288
- "YT" => __("Mayotte", $textdomain ),
289
- "MX" => __("Mexico", $textdomain ),
290
- "FM" => __("Micronesia", $textdomain ),
291
- "MD" => __("Moldavia", $textdomain ),
292
- "MC" => __("Monaco", $textdomain ),
293
- "MN" => __("Mongolia", $textdomain ),
294
- "MS" => __("Montserrat", $textdomain ),
295
- "MA" => __("Morocco", $textdomain ),
296
- "MZ" => __("Mozambique", $textdomain ),
297
- "MM" => __("Union Of Myanmar", $textdomain ),
298
- "NA" => __("Namibia", $textdomain ),
299
- "NR" => __("Nauru Island", $textdomain ),
300
- "NP" => __("Nepal", $textdomain ),
301
- "NL" => __("Netherlands", $textdomain ),
302
- "AN" => __("Netherlands Antilles", $textdomain ),
303
- "NC" => __("New Caledonia", $textdomain ),
304
- "NZ" => __("New Zealand", $textdomain ),
305
- "NI" => __("Nicaragua", $textdomain ),
306
- "NE" => __("Niger", $textdomain ),
307
- "NG" => __("Nigeria", $textdomain ),
308
- "NU" => __("Niue", $textdomain ),
309
- "NF" => __("Norfolk Island", $textdomain ),
310
- "MP" => __("Mariana Islands, Northern", $textdomain ),
311
- "NO" => __("Norway", $textdomain ),
312
- "OM" => __("Oman", $textdomain ),
313
- "PK" => __("Pakistan", $textdomain ),
314
- "PW" => __("Palau Islands", $textdomain ),
315
- "PS" => __("Palestine", $textdomain ),
316
- "PA" => __("Panama", $textdomain ),
317
- "PG" => __("Papua New Guinea", $textdomain ),
318
- "PY" => __("Paraguay", $textdomain ),
319
- "PE" => __("Peru", $textdomain ),
320
- "PH" => __("Philippines", $textdomain ),
321
- "PN" => __("Pitcairn", $textdomain ),
322
- "PL" => __("Poland", $textdomain ),
323
- "PT" => __("Portugal", $textdomain ),
324
- "PR" => __("Puerto Rico", $textdomain ),
325
- "QA" => __("Qatar", $textdomain ),
326
- "RE" => __("Reunion Island", $textdomain ),
327
- "RO" => __("Romania", $textdomain ),
328
- "RU" => __("Russian Federation", $textdomain ),
329
- "RW" => __("Rwanda", $textdomain ),
330
- "WS" => __("Samoa", $textdomain ),
331
- "SH" => __("St Helena", $textdomain ),
332
- "KN" => __("St Kitts & Nevis", $textdomain ),
333
- "LC" => __("St Lucia", $textdomain ),
334
- "PM" => __("St Pierre & Miquelon", $textdomain ),
335
- "VC" => __("St Vincent", $textdomain ),
336
- "SM" => __("San Marino", $textdomain ),
337
- "ST" => __("Sao Tome & Principe", $textdomain ),
338
- "SA" => __("Saudi Arabia", $textdomain ),
339
- "SN" => __("Senegal", $textdomain ),
340
- "SC" => __("Seychelles", $textdomain ),
341
- "SL" => __("Sierra Leone", $textdomain ),
342
- "SG" => __("Singapore", $textdomain ),
343
- "SK" => __("Slovakia", $textdomain ),
344
- "SI" => __("Slovenia", $textdomain ),
345
- "SB" => __("Solomon Islands", $textdomain ),
346
- "SO" => __("Somalia", $textdomain ),
347
- "ZA" => __("South Africa", $textdomain ),
348
- "GS" => __("South Georgia and South Sandwich", $textdomain ),
349
- "ES" => __("Spain", $textdomain ),
350
- "LK" => __("Sri Lanka", $textdomain ),
351
- "XX" => __("Stateless Persons", $textdomain ),
352
- "SD" => __("Sudan", $textdomain ),
353
- "SR" => __("Suriname", $textdomain ),
354
- "SJ" => __("Svalbard and Jan Mayen", $textdomain ),
355
- "SZ" => __("Swaziland", $textdomain ),
356
- "SE" => __("Sweden", $textdomain ),
357
- "CH" => __("Switzerland", $textdomain ),
358
- "SY" => __("Syrian Arab Republic", $textdomain ),
359
- "TW" => __("Taiwan, Republic of China", $textdomain ),
360
- "TJ" => __("Tajikistan", $textdomain ),
361
- "TZ" => __("Tanzania", $textdomain ),
362
- "TH" => __("Thailand", $textdomain ),
363
- "TL" => __("Timor Leste", $textdomain ),
364
- "TG" => __("Togo", $textdomain ),
365
- "TK" => __("Tokelau", $textdomain ),
366
- "TO" => __("Tonga", $textdomain ),
367
- "TT" => __("Trinidad & Tobago", $textdomain ),
368
- "TN" => __("Tunisia", $textdomain ),
369
- "TR" => __("Turkey", $textdomain ),
370
- "TM" => __("Turkmenistan", $textdomain ),
371
- "TC" => __("Turks And Caicos Islands", $textdomain ),
372
- "TV" => __("Tuvalu", $textdomain ),
373
- "UG" => __("Uganda", $textdomain ),
374
- "UA" => __("Ukraine", $textdomain ),
375
- "AE" => __("United Arab Emirates", $textdomain ),
376
- "GB" => __("United Kingdom", $textdomain ),
377
- "UM" => __("US Minor Outlying Islands", $textdomain ),
378
- "US" => __("USA", $textdomain ),
379
- "HV" => __("Upper Volta", $textdomain ),
380
- "UY" => __("Uruguay", $textdomain ),
381
- "UZ" => __("Uzbekistan", $textdomain ),
382
- "VU" => __("Vanuatu", $textdomain ),
383
- "VA" => __("Vatican City State", $textdomain ),
384
- "VE" => __("Venezuela", $textdomain ),
385
- "VN" => __("Vietnam", $textdomain ),
386
- "VG" => __("Virgin Islands (British)", $textdomain ),
387
- "VI" => __("Virgin Islands (US)", $textdomain ),
388
- "WF" => __("Wallis And Futuna Islands", $textdomain ),
389
- "EH" => __("Western Sahara", $textdomain ),
390
- "YE" => __("Yemen Arab Rep.", $textdomain ),
391
- "YD" => __("Yemen Democratic", $textdomain ),
392
- "YU" => __("Yugoslavia", $textdomain ),
393
- "ZR" => __("Zaire", $textdomain ),
394
- "ZM" => __("Zambia", $textdomain ),
395
- "ZW" => __("Zimbabwe", $textdomain )
396
- );
397
-
398
- return apply_filters( 'popover_country_list', $countries );
399
-
400
- }
401
-
402
- function get_popover_option($key, $default = false) {
403
-
404
- if(is_multisite() && function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('popover/popover.php')) {
405
- return get_site_option($key, $default);
406
- } else {
407
- return get_option($key, $default);
408
- }
409
-
410
- }
411
-
412
- function update_popover_option($key, $value) {
413
-
414
- if(is_multisite() && function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('popover/popover.php')) {
415
- return update_site_option($key, $value);
416
- } else {
417
- return update_option($key, $value);
418
- }
419
-
420
- }
421
-
422
- function delete_popover_option($key) {
423
-
424
- if(is_multisite() && function_exists('is_plugin_active_for_network') && is_plugin_active_for_network('popover/popover.php')) {
425
- return delete_site_option($key);
426
- } else {
427
- return delete_option($key);
428
- }
429
-
430
- }
431
-
432
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/jquery.tablednd_0_5.js DELETED
@@ -1,382 +0,0 @@
1
- /**
2
- * TableDnD plug-in for JQuery, allows you to drag and drop table rows
3
- * You can set up various options to control how the system will work
4
- * Copyright (c) Denis Howlett <denish@isocra.com>
5
- * Licensed like jQuery, see http://docs.jquery.com/License.
6
- *
7
- * Configuration options:
8
- *
9
- * onDragStyle
10
- * This is the style that is assigned to the row during drag. There are limitations to the styles that can be
11
- * associated with a row (such as you can't assign a border--well you can, but it won't be
12
- * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
13
- * a map (as used in the jQuery css(...) function).
14
- * onDropStyle
15
- * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
16
- * to what you can do. Also this replaces the original style, so again consider using onDragClass which
17
- * is simply added and then removed on drop.
18
- * onDragClass
19
- * This class is added for the duration of the drag and then removed when the row is dropped. It is more
20
- * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
21
- * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
22
- * stylesheet.
23
- * onDrop
24
- * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
25
- * and the row that was dropped. You can work out the new order of the rows by using
26
- * table.rows.
27
- * onDragStart
28
- * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
29
- * table and the row which the user has started to drag.
30
- * onAllowDrop
31
- * Pass a function that will be called as a row is over another row. If the function returns true, allow
32
- * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
33
- * the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
34
- * scrollAmount
35
- * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
36
- * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
37
- * FF3 beta
38
- * dragHandle
39
- * This is the name of a class that you assign to one or more cells in each row that is draggable. If you
40
- * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
41
- * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
42
- * the whole row is draggable.
43
- *
44
- * Other ways to control behaviour:
45
- *
46
- * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
47
- * that you don't want to be draggable.
48
- *
49
- * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
50
- * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
51
- * an ID as must all the rows.
52
- *
53
- * Other methods:
54
- *
55
- * $("...").tableDnDUpdate()
56
- * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
57
- * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
58
- * The table maintains the original configuration (so you don't have to specify it again).
59
- *
60
- * $("...").tableDnDSerialize()
61
- * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
62
- * called from anywhere and isn't dependent on the currentTable being set up correctly before calling
63
- *
64
- * Known problems:
65
- * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
66
- *
67
- * Version 0.2: 2008-02-20 First public version
68
- * Version 0.3: 2008-02-07 Added onDragStart option
69
- * Made the scroll amount configurable (default is 5 as before)
70
- * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
71
- * Added onAllowDrop to control dropping
72
- * Fixed a bug which meant that you couldn't set the scroll amount in both directions
73
- * Added serialize method
74
- * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
75
- * draggable
76
- * Improved the serialize method to use a default (and settable) regular expression.
77
- * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
78
- */
79
- jQuery.tableDnD = {
80
- /** Keep hold of the current table being dragged */
81
- currentTable : null,
82
- /** Keep hold of the current drag object if any */
83
- dragObject: null,
84
- /** The current mouse offset */
85
- mouseOffset: null,
86
- /** Remember the old value of Y so that we don't do too much processing */
87
- oldY: 0,
88
-
89
- /** Actually build the structure */
90
- build: function(options) {
91
- // Set up the defaults if any
92
-
93
- this.each(function() {
94
- // This is bound to each matching table, set up the defaults and override with user options
95
- this.tableDnDConfig = jQuery.extend({
96
- onDragStyle: null,
97
- onDropStyle: null,
98
- // Add in the default class for whileDragging
99
- onDragClass: "tDnD_whileDrag",
100
- onDrop: null,
101
- onDragStart: null,
102
- scrollAmount: 5,
103
- serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
104
- serializeParamName: null, // If you want to specify another parameter name instead of the table ID
105
- dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
106
- }, options || {});
107
- // Now make the rows draggable
108
- jQuery.tableDnD.makeDraggable(this);
109
- });
110
-
111
- // Now we need to capture the mouse up and mouse move event
112
- // We can use bind so that we don't interfere with other event handlers
113
- jQuery(document)
114
- .bind('mousemove', jQuery.tableDnD.mousemove)
115
- .bind('mouseup', jQuery.tableDnD.mouseup);
116
-
117
- // Don't break the chain
118
- return this;
119
- },
120
-
121
- /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
122
- makeDraggable: function(table) {
123
- var config = table.tableDnDConfig;
124
- if (table.tableDnDConfig.dragHandle) {
125
- // We only need to add the event to the specified cells
126
- var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
127
- cells.each(function() {
128
- // The cell is bound to "this"
129
- jQuery(this).mousedown(function(ev) {
130
- jQuery.tableDnD.dragObject = this.parentNode;
131
- jQuery.tableDnD.currentTable = table;
132
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
133
- if (config.onDragStart) {
134
- // Call the onDrop method if there is one
135
- config.onDragStart(table, this);
136
- }
137
- return false;
138
- });
139
- })
140
- } else {
141
- // For backwards compatibility, we add the event to the whole row
142
- var rows = jQuery("tr", table); // get all the rows as a wrapped set
143
- rows.each(function() {
144
- // Iterate through each row, the row is bound to "this"
145
- var row = jQuery(this);
146
- if (! row.hasClass("nodrag")) {
147
- row.mousedown(function(ev) {
148
- if (ev.target.tagName == "TD") {
149
- jQuery.tableDnD.dragObject = this;
150
- jQuery.tableDnD.currentTable = table;
151
- jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
152
- if (config.onDragStart) {
153
- // Call the onDrop method if there is one
154
- config.onDragStart(table, this);
155
- }
156
- return false;
157
- }
158
- }).css("cursor", "move"); // Store the tableDnD object
159
- }
160
- });
161
- }
162
- },
163
-
164
- updateTables: function() {
165
- this.each(function() {
166
- // this is now bound to each matching table
167
- if (this.tableDnDConfig) {
168
- jQuery.tableDnD.makeDraggable(this);
169
- }
170
- })
171
- },
172
-
173
- /** Get the mouse coordinates from the event (allowing for browser differences) */
174
- mouseCoords: function(ev){
175
- if(ev.pageX || ev.pageY){
176
- return {x:ev.pageX, y:ev.pageY};
177
- }
178
- return {
179
- x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
180
- y:ev.clientY + document.body.scrollTop - document.body.clientTop
181
- };
182
- },
183
-
184
- /** Given a target element and a mouse event, get the mouse offset from that element.
185
- To do this we need the element's position and the mouse position */
186
- getMouseOffset: function(target, ev) {
187
- ev = ev || window.event;
188
-
189
- var docPos = this.getPosition(target);
190
- var mousePos = this.mouseCoords(ev);
191
- return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
192
- },
193
-
194
- /** Get the position of an element by going up the DOM tree and adding up all the offsets */
195
- getPosition: function(e){
196
- var left = 0;
197
- var top = 0;
198
- /** Safari fix -- thanks to Luis Chato for this! */
199
- if (e.offsetHeight == 0) {
200
- /** Safari 2 doesn't correctly grab the offsetTop of a table row
201
- this is detailed here:
202
- http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
203
- the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
204
- note that firefox will return a text node as a first child, so designing a more thorough
205
- solution may need to take that into account, for now this seems to work in firefox, safari, ie */
206
- e = e.firstChild; // a table cell
207
- }
208
-
209
- while (e.offsetParent){
210
- left += e.offsetLeft;
211
- top += e.offsetTop;
212
- e = e.offsetParent;
213
- }
214
-
215
- left += e.offsetLeft;
216
- top += e.offsetTop;
217
-
218
- return {x:left, y:top};
219
- },
220
-
221
- mousemove: function(ev) {
222
- if (jQuery.tableDnD.dragObject == null) {
223
- return;
224
- }
225
-
226
- var dragObj = jQuery(jQuery.tableDnD.dragObject);
227
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
228
- var mousePos = jQuery.tableDnD.mouseCoords(ev);
229
- var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
230
- //auto scroll the window
231
- var yOffset = window.pageYOffset;
232
- if (document.all) {
233
- // Windows version
234
- //yOffset=document.body.scrollTop;
235
- if (typeof document.compatMode != 'undefined' &&
236
- document.compatMode != 'BackCompat') {
237
- yOffset = document.documentElement.scrollTop;
238
- }
239
- else if (typeof document.body != 'undefined') {
240
- yOffset=document.body.scrollTop;
241
- }
242
-
243
- }
244
-
245
- if (mousePos.y-yOffset < config.scrollAmount) {
246
- window.scrollBy(0, -config.scrollAmount);
247
- } else {
248
- var windowHeight = window.innerHeight ? window.innerHeight
249
- : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
250
- if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
251
- window.scrollBy(0, config.scrollAmount);
252
- }
253
- }
254
-
255
-
256
- if (y != jQuery.tableDnD.oldY) {
257
- // work out if we're going up or down...
258
- var movingDown = y > jQuery.tableDnD.oldY;
259
- // update the old value
260
- jQuery.tableDnD.oldY = y;
261
- // update the style to show we're dragging
262
- if (config.onDragClass) {
263
- dragObj.addClass(config.onDragClass);
264
- } else {
265
- dragObj.css(config.onDragStyle);
266
- }
267
- // If we're over a row then move the dragged row to there so that the user sees the
268
- // effect dynamically
269
- var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
270
- if (currentRow) {
271
- // TODO worry about what happens when there are multiple TBODIES
272
- if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
273
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
274
- } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
275
- jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
276
- }
277
- }
278
- }
279
-
280
- return false;
281
- },
282
-
283
- /** We're only worried about the y position really, because we can only move rows up and down */
284
- findDropTargetRow: function(draggedRow, y) {
285
- var rows = jQuery.tableDnD.currentTable.rows;
286
- for (var i=0; i<rows.length; i++) {
287
- var row = rows[i];
288
- var rowY = this.getPosition(row).y;
289
- var rowHeight = parseInt(row.offsetHeight)/2;
290
- if (row.offsetHeight == 0) {
291
- rowY = this.getPosition(row.firstChild).y;
292
- rowHeight = parseInt(row.firstChild.offsetHeight)/2;
293
- }
294
- // Because we always have to insert before, we need to offset the height a bit
295
- if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
296
- // that's the row we're over
297
- // If it's the same as the current row, ignore it
298
- if (row == draggedRow) {return null;}
299
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
300
- if (config.onAllowDrop) {
301
- if (config.onAllowDrop(draggedRow, row)) {
302
- return row;
303
- } else {
304
- return null;
305
- }
306
- } else {
307
- // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
308
- var nodrop = jQuery(row).hasClass("nodrop");
309
- if (! nodrop) {
310
- return row;
311
- } else {
312
- return null;
313
- }
314
- }
315
- return row;
316
- }
317
- }
318
- return null;
319
- },
320
-
321
- mouseup: function(e) {
322
- if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
323
- var droppedRow = jQuery.tableDnD.dragObject;
324
- var config = jQuery.tableDnD.currentTable.tableDnDConfig;
325
- // If we have a dragObject, then we need to release it,
326
- // The row will already have been moved to the right place so we just reset stuff
327
- if (config.onDragClass) {
328
- jQuery(droppedRow).removeClass(config.onDragClass);
329
- } else {
330
- jQuery(droppedRow).css(config.onDropStyle);
331
- }
332
- jQuery.tableDnD.dragObject = null;
333
- if (config.onDrop) {
334
- // Call the onDrop method if there is one
335
- config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
336
- }
337
- jQuery.tableDnD.currentTable = null; // let go of the table too
338
- }
339
- },
340
-
341
- serialize: function() {
342
- if (jQuery.tableDnD.currentTable) {
343
- return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
344
- } else {
345
- return "Error: No Table id set, you need to set an id on your table and every row";
346
- }
347
- },
348
-
349
- serializeTable: function(table) {
350
- var result = "";
351
- var tableId = table.id;
352
- var rows = table.rows;
353
- for (var i=0; i<rows.length; i++) {
354
- if (result.length > 0) result += "&";
355
- var rowId = rows[i].id;
356
- if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
357
- rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
358
- }
359
-
360
- result += tableId + '[]=' + rowId;
361
- }
362
- return result;
363
- },
364
-
365
- serializeTables: function() {
366
- var result = "";
367
- this.each(function() {
368
- // this is now bound to each matching table
369
- result += jQuery.tableDnD.serializeTable(this);
370
- });
371
- return result;
372
- }
373
-
374
- }
375
-
376
- jQuery.fn.extend(
377
- {
378
- tableDnD : jQuery.tableDnD.build,
379
- tableDnDUpdate : jQuery.tableDnD.updateTables,
380
- tableDnDSerialize: jQuery.tableDnD.serializeTables
381
- }
382
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popover-load-custom.js DELETED
@@ -1,125 +0,0 @@
1
- /*
2
- * Javascript file to selectively load the WPMUDEV Pop Up
3
- */
4
-
5
- var po_adminajax = popover_selective_custom.admin_ajax_url;
6
-
7
- // Enable us to get some cookie information - from http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript
8
- function po_get_cookie(name) {
9
-
10
- var nameEQ = name + "=";
11
- var ca = document.cookie.split(';');
12
- for (var i = 0; i < ca.length; i++) {
13
- var c = ca[i];
14
- while (c.charAt(0) === ' ')
15
- c = c.substring(1, c.length);
16
- if (c.indexOf(nameEQ) === 0)
17
- return c.substring(nameEQ.length, c.length);
18
- }
19
- return null;
20
- }
21
-
22
- function po_createCookie(name, value, days) {
23
- if (days) {
24
- var date = new Date();
25
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
26
- var expires = "; expires=" + date.toGMTString();
27
- }
28
- else
29
- var expires = "";
30
- document.cookie = name + "=" + value + expires + "; path=/";
31
- }
32
-
33
- function po_removeMessageBoxForever() {
34
- jQuery('#darkbackground').remove();
35
- jQuery(this).parents(popovername).remove();
36
- po_createCookie('popover_never_view', 'hidealways', 365);
37
- return false;
38
- }
39
-
40
- function po_removeMessageBox() {
41
- jQuery('#darkbackground').remove();
42
- jQuery(this).parents(popovername).remove();
43
- return false;
44
- }
45
-
46
- function po_loadMessageBox( ) {
47
-
48
- // move the data back to the data variable, from mydata so we can use it without changing a chunk of code :)
49
- data = mydata;
50
-
51
- if (data['html'] !== '') {
52
- // Set the name for other functions to use
53
- popovername = '#' + data['name'];
54
-
55
- jQuery('<style type="text/css">' + data['style'] + '</style>').appendTo('head');
56
- jQuery(data['html']).appendTo('body');
57
-
58
- if (data['usejs'] === 'yes') {
59
-
60
- jQuery('#' + data['name']).width(jQuery('#message').width());
61
- jQuery('#' + data['name']).height(jQuery('#message').height());
62
-
63
- jQuery('#' + data['name']).css('top', (jQuery(window).height() / 2) - (jQuery('#message').height() / 2));
64
- jQuery('#' + data['name']).css('left', (jQuery(window).width() / 2) - (jQuery('#message').width() / 2));
65
- }
66
-
67
- jQuery('#' + data['name']).css('visibility', 'visible');
68
- jQuery('#darkbackground').css('visibility', 'visible');
69
-
70
- jQuery('#clearforever').click(po_removeMessageBoxForever);
71
- jQuery('#closebox').click(po_removeMessageBox);
72
-
73
- jQuery('#message').hover(function() {
74
- jQuery('.claimbutton').removeClass('hide');
75
- }, function() {
76
- jQuery('.claimbutton').addClass('hide');
77
- });
78
- }
79
-
80
- }
81
-
82
- function po_onsuccess(data) {
83
- // set the data to be a global variable so we can grab it after the timeout
84
- mydata = data;
85
-
86
- if (data['name'] !== 'nopoover') {
87
- window.setTimeout(po_loadMessageBox, data['delay']);
88
- }
89
-
90
- }
91
-
92
- function po_load_popover() {
93
-
94
- var theajax = po_adminajax;
95
- var thefrom = window.location;
96
- var thereferrer = document.referrer;
97
- // Check if we are forcing a popover - if not then set it to a default value of 0
98
- if (typeof force_popover === 'undefined') {
99
- force_popover = 0;
100
- }
101
-
102
- jQuery.ajax({
103
- url: thefrom,
104
- dataType: 'jsonp',
105
- jsonpCallback: 'po_onsuccess',
106
- data: {popoverajaxaction: 'popover_selective_ajax',
107
- thefrom: thefrom.toString(),
108
- thereferrer: thereferrer.toString(),
109
- active_popover: force_popover.toString()
110
- },
111
- success: function(data) {
112
-
113
- }
114
- }
115
- );
116
- return false;
117
- }
118
-
119
- // The main function
120
- function po_selectiveLoad() {
121
- po_load_popover();
122
- }
123
-
124
- // Call when the page is fully loaded
125
- jQuery(window).load(po_selectiveLoad);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popover-load.js DELETED
@@ -1,127 +0,0 @@
1
- /*
2
- * Javascript file to selectively load the WPMUDEV Pop Up
3
- */
4
-
5
- var po_adminajax = popover_load_custom.admin_ajax_url;
6
-
7
- // Enable us to get some cookie information - from http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript
8
- function po_get_cookie(name) {
9
-
10
- var nameEQ = name + "=";
11
- var ca = document.cookie.split(';');
12
- for (var i = 0; i < ca.length; i++) {
13
- var c = ca[i];
14
- while (c.charAt(0) == ' ')
15
- c = c.substring(1, c.length);
16
- if (c.indexOf(nameEQ) == 0)
17
- return c.substring(nameEQ.length, c.length);
18
- }
19
- return null;
20
- }
21
-
22
- function po_createCookie(name, value, days) {
23
- if (days) {
24
- var date = new Date();
25
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
26
- var expires = "; expires=" + date.toGMTString();
27
- }
28
- else
29
- var expires = "";
30
- document.cookie = name + "=" + value + expires + "; path=/";
31
- }
32
-
33
- function po_removeMessageBoxForever() {
34
- jQuery('#darkbackground').remove();
35
- jQuery(this).parents(popovername).remove();
36
- po_createCookie('popover_never_view', 'hidealways', 365);
37
- return false;
38
- }
39
-
40
- function po_removeMessageBox() {
41
- jQuery('#darkbackground').remove();
42
- jQuery(this).parents(popovername).remove();
43
- return false;
44
- }
45
-
46
- function po_loadMessageBox( ) {
47
-
48
- // move the data back to the data variable, from mydata so we can use it without changing a chunk of code :)
49
- data = mydata;
50
-
51
- if (data['html'] != '') {
52
- // Set the name for other functions to use
53
- popovername = '#' + data['name'];
54
-
55
- jQuery('<style type="text/css">' + data['style'] + '</style>').appendTo('head');
56
- jQuery(data['html']).appendTo('body');
57
-
58
- if (data['usejs'] == 'yes') {
59
-
60
- jQuery('#' + data['name']).width(jQuery('#message').width());
61
- jQuery('#' + data['name']).height(jQuery('#message').height());
62
-
63
- jQuery('#' + data['name']).css('top', (jQuery(window).height() / 2) - (jQuery('#message').height() / 2));
64
- jQuery('#' + data['name']).css('left', (jQuery(window).width() / 2) - (jQuery('#message').width() / 2));
65
- }
66
-
67
- jQuery('#' + data['name']).css('visibility', 'visible');
68
- jQuery('#darkbackground').css('visibility', 'visible');
69
-
70
- jQuery('#clearforever').click(po_removeMessageBoxForever);
71
- jQuery('#closebox').click(po_removeMessageBox);
72
-
73
- jQuery('#message').hover(function() {
74
- jQuery('.claimbutton').removeClass('hide');
75
- }, function() {
76
- jQuery('.claimbutton').addClass('hide');
77
- });
78
- }
79
-
80
- }
81
-
82
- function po_onsuccess(data) {
83
- // set the data to be a global variable so we can grab it after the timeout
84
- mydata = data;
85
-
86
- if (data['name'] != 'nopoover') {
87
- window.setTimeout(po_loadMessageBox, data['delay']);
88
- }
89
-
90
- }
91
-
92
- function po_load_popover() {
93
-
94
- var theajax = po_adminajax;
95
- var thefrom = window.location;
96
- var thereferrer = document.referrer;
97
-
98
- // Check if we are forcing a popover - if not then set it to a default value of 0
99
- if (typeof force_popover === 'undefined') {
100
- force_popover = 0;
101
- }
102
-
103
- jQuery.ajax({
104
- url: theajax,
105
- dataType: 'jsonp',
106
- jsonpCallback: 'po_onsuccess',
107
- data: {action: 'popover_selective_ajax',
108
- thefrom: thefrom.toString(),
109
- thereferrer: thereferrer.toString(),
110
- active_popover: force_popover.toString()
111
- },
112
- success: function(data) {
113
-
114
- }
115
- }
116
- );
117
-
118
- return false;
119
- }
120
-
121
- // The main function
122
- function po_selectiveLoad() {
123
- po_load_popover();
124
- }
125
-
126
- // Call when the page is fully loaded
127
- jQuery(window).load(po_selectiveLoad);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popoveradmin.js DELETED
@@ -1,92 +0,0 @@
1
- function popoverremoveaction() {
2
- var section = jQuery(this).attr('id');
3
- var sectionname = section.replace('remove-','');
4
-
5
- jQuery('#main-' + sectionname).appendTo('#hiden-actions');
6
- jQuery('#' + sectionname).show();
7
-
8
- // Move from the fields
9
- jQuery('#in-positive-rules').val( jQuery('#in-positive-rules').val().replace(',' + sectionname, ''));
10
-
11
- return false;
12
- }
13
-
14
- function popoverremovemessage() {
15
-
16
- jQuery('#upmessage').remove();
17
- return false;
18
- }
19
-
20
- function popoverclickactiontoggle() {
21
- if(jQuery(this).parent().hasClass('open')) {
22
- jQuery(this).parent().removeClass('open').addClass('closed');
23
- jQuery(this).parents('.action').find('.action-body').removeClass('open').addClass('closed');
24
- } else {
25
- jQuery(this).parent().removeClass('closed').addClass('open');
26
- jQuery(this).parents('.action').find('.action-body').removeClass('closed').addClass('open');
27
- }
28
- }
29
-
30
- function popoveraddtorules() {
31
-
32
- moving = jQuery(this).parents('.popover-draggable').attr('id');
33
-
34
- if(moving != '') {
35
- jQuery('#main-' + moving).appendTo('#positive-rules-holder');
36
- jQuery('#' + moving).hide();
37
-
38
- // put the name in the relevant holding input field
39
- jQuery('#in-positive-rules').val( jQuery('#in-positive-rules').val() + ',' + moving );
40
- }
41
-
42
- return false;
43
- }
44
-
45
- function popoverReady() {
46
-
47
- jQuery('.popover-draggable').draggable({
48
- opacity: 0.7,
49
- helper: 'clone',
50
- start: function(event, ui) {
51
- jQuery('input#beingdragged').val( jQuery(this).attr('id') );
52
- },
53
- stop: function(event, ui) {
54
- jQuery('input#beingdragged').val( '' );
55
- }
56
- });
57
-
58
- jQuery('.droppable-rules').droppable({
59
- hoverClass: 'hoveringover',
60
- drop: function(event, ui) {
61
- moving = jQuery('input#beingdragged').val();
62
- ruleplace = jQuery(this).attr('id');
63
- if(moving != '') {
64
- jQuery('#main-' + moving).appendTo('#' + ruleplace + '-holder');
65
- jQuery('#' + moving).hide();
66
-
67
- // put the name in the relevant holding input field
68
- jQuery('#in-' + ruleplace).val( jQuery('#in-' + ruleplace).val() + ',' + moving );
69
- }
70
- }
71
- });
72
-
73
- jQuery('#positive-rules-holder').sortable({
74
- opacity: 0.7,
75
- helper: 'clone',
76
- placeholder: 'placeholder-rules',
77
- update: function(event, ui) {
78
- jQuery('#in-positive-rules').val(',' + jQuery('#positive-rules-holder').sortable('toArray').join(',').replace(/main-/gi, ''));
79
- }
80
- });
81
-
82
- jQuery('a.removelink').click(popoverremoveaction);
83
- jQuery('a#closemessage').click(popoverremovemessage);
84
-
85
- jQuery('.action .action-top .action-button').click(popoverclickactiontoggle);
86
-
87
- jQuery('a.action-to-popover').click(popoveraddtorules);
88
-
89
-
90
- }
91
-
92
- jQuery(document).ready(popoverReady);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popoverlegacy.js DELETED
@@ -1,79 +0,0 @@
1
- //
2
- // Legacy Javascript file to selectively load the WPMUDEV Pop Up
3
- //
4
- // Written by Barry (Incsub)
5
- //
6
-
7
- // Enable us to get some cookie information - from http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript
8
- function po_get_cookie(name) {
9
-
10
- var nameEQ = name + "=";
11
- var ca = document.cookie.split(';');
12
- for(var i=0;i < ca.length;i++) {
13
- var c = ca[i];
14
- while (c.charAt(0)==' ') c = c.substring(1,c.length);
15
- if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
16
- }
17
- return null;
18
- }
19
-
20
- function po_createCookie(name,value,days) {
21
- if (days) {
22
- var date = new Date();
23
- date.setTime(date.getTime()+(days*24*60*60*1000));
24
- var expires = "; expires="+date.toGMTString();
25
- }
26
- else var expires = "";
27
- document.cookie = name+"="+value+expires+"; path=/";
28
- }
29
-
30
- function po_removeMessageBoxForever() {
31
- jQuery('#darkbackground').remove();
32
- jQuery(this).parents( '#' + popover.divname ).remove();
33
- po_createCookie('popover_never_view', 'hidealways', 365);
34
- return false;
35
- }
36
-
37
- function po_removeMessageBox() {
38
- jQuery('#darkbackground').remove();
39
- jQuery(this).parents( '#' + popover.divname ).remove();
40
- return false;
41
- }
42
-
43
- function po_loadMessageBox( ) {
44
-
45
- if( popover.usejs == 'yes' ) {
46
-
47
- jQuery('#' + popover.divname ).width(jQuery('#message').width());
48
- jQuery('#' + popover.divname ).height(jQuery('#message').height());
49
-
50
- jQuery('#' + popover.divname ).css('top', (jQuery(window).height() / 2) - (jQuery('#message').height() / 2) );
51
- jQuery('#' + popover.divname).css('left', (jQuery(window).width() / 2) - (jQuery('#message').width() / 2) );
52
- }
53
-
54
- jQuery('#' + popover.divname ).css('visibility', 'visible');
55
- jQuery('#darkbackground').css('visibility', 'visible');
56
-
57
- jQuery('#clearforever').click(po_removeMessageBoxForever);
58
- jQuery('#closebox').click(po_removeMessageBox);
59
-
60
- jQuery('#message').hover( function() {jQuery('.claimbutton').removeClass('hide');}, function() {jQuery('.claimbutton').addClass('hide');});
61
-
62
- }
63
-
64
- function po_load_popover() {
65
-
66
- window.setTimeout( po_loadMessageBox, popover.delay );
67
-
68
- }
69
-
70
-
71
- // The main function
72
- function po_selectiveLoad() {
73
-
74
- po_load_popover();
75
-
76
- }
77
-
78
- // Call when the page is fully loaded
79
- jQuery(window).load(po_selectiveLoad);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popovermenu.js DELETED
@@ -1,53 +0,0 @@
1
-
2
- function po_updateMovePopover() {
3
- jQuery.post(
4
- popover.ajaxurl,
5
- {
6
- 'action':'popover_update_order',
7
- '_ajax_nonce': popover.ordernonce,
8
- 'data': jQuery('#dragbody').tableDnDSerialize()
9
- },
10
- function(response){
11
- if(response != 'fail') {
12
- popover.ordernonce = response;
13
- } else {
14
- alert(popover.dragerror);
15
- }
16
- }
17
- );
18
- }
19
-
20
- function po_setupReOrder() {
21
-
22
- //alert('here');
23
-
24
- //jQuery('tr.draghandle a.draganchor').click(function() {alert('click'); return false;});
25
-
26
- jQuery('#dragbody').tableDnD({
27
- onDragClass: 'dragging',
28
- dragHandle: 'check-drag',
29
- onDragStart: function( table, row ) {},
30
- onDrop: function( table, row ) {
31
- po_updateMovePopover();
32
- }
33
- });
34
-
35
- }
36
-
37
- function po_confirmDelete() {
38
- if(confirm(popover.deletepopover)) {
39
- return true;
40
- } else {
41
- return false;
42
- }
43
- }
44
-
45
- function po_MenuReady() {
46
-
47
- po_setupReOrder();
48
-
49
- jQuery('span.delete a').click(po_confirmDelete);
50
-
51
- }
52
-
53
- jQuery(document).ready(po_MenuReady);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popoverincludes/js/popoversizing.js DELETED
@@ -1,9 +0,0 @@
1
- function sizeReady() {
2
- jQuery(popover.messagebox).width(jQuery('#message').width());
3
- jQuery(popover.messagebox).height(jQuery('#message').height());
4
-
5
- jQuery(popover.messagebox).css('top', (jQuery(window).height() / 2) - (jQuery('#message').height() / 2) );
6
- jQuery(popover.messagebox).css('left', (jQuery(window).width() / 2) - (jQuery('#message').width() / 2) );
7
- }
8
-
9
- jQuery(window).load(sizeReady);
 
 
 
 
 
 
 
 
 
popoverincludes/languages/popover.po DELETED
@@ -1,1673 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: PopOver\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-08-25 11:29+0100\n"
6
- "PO-Revision-Date: 2013-08-25 11:29+0100\n"
7
- "Last-Translator: \n"
8
- "Language-Team: Incsub <barry@incsub.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: __;gettext;gettext_noop;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Poedit-SearchPath-0: /Users/barrygetty/Work/wordpress/plugins/popover\n"
15
-
16
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popover.help.php:55
17
- msgid "Overview"
18
- msgstr ""
19
-
20
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popover.help.php:61
21
- msgid "Adding / Editing"
22
- msgstr ""
23
-
24
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popover.help.php:75
25
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:120
26
- msgid "Add-ons"
27
- msgstr ""
28
-
29
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:111
30
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:115
31
- msgid "Pop Overs"
32
- msgstr ""
33
-
34
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:119
35
- msgid "Create New Pop Over"
36
- msgstr ""
37
-
38
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:119
39
- msgid "Create New"
40
- msgstr ""
41
-
42
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:120
43
- msgid "Manage Add-ons Plugins"
44
- msgstr ""
45
-
46
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:122
47
- msgid "Settings"
48
- msgstr ""
49
-
50
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:270
51
- msgid "An error occured updating the Pop Over order."
52
- msgstr ""
53
-
54
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:271
55
- msgid "Are you sure you want to delete this Pop Over?"
56
- msgstr ""
57
-
58
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:321
59
- #, php-format
60
- msgid "Welcome to Popover, would you like to transfer your existing Popover to the new format? <a href='%s'>Yes please transfer it</a> / <a href='%s'>No thanks, I'll create a new one myself.</a>"
61
- msgstr ""
62
-
63
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:340
64
- msgid "Transferred Popover"
65
- msgstr ""
66
-
67
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:702
68
- msgid "Pop Over updated."
69
- msgstr ""
70
-
71
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:703
72
- msgid "Pop Over not updated."
73
- msgstr ""
74
-
75
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:705
76
- msgid "Pop Over activated."
77
- msgstr ""
78
-
79
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:706
80
- msgid "Pop Over not activated."
81
- msgstr ""
82
-
83
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:708
84
- msgid "Pop Over deactivated."
85
- msgstr ""
86
-
87
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:709
88
- msgid "Pop Over not deactivated."
89
- msgstr ""
90
-
91
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:711
92
- msgid "Pop Over activation toggled."
93
- msgstr ""
94
-
95
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:713
96
- msgid "Pop Over deleted."
97
- msgstr ""
98
-
99
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:714
100
- msgid "Pop Over not deleted."
101
- msgstr ""
102
-
103
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:716
104
- msgid "Pop Over added."
105
- msgstr ""
106
-
107
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:717
108
- msgid "Pop Over not added."
109
- msgstr ""
110
-
111
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:721
112
- msgid "Edit Pop Overs"
113
- msgstr ""
114
-
115
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:721
116
- msgid "Add New"
117
- msgstr ""
118
-
119
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:739
120
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:915
121
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1898
122
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2026
123
- msgid "Bulk Actions"
124
- msgstr ""
125
-
126
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:740
127
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:916
128
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1899
129
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2027
130
- msgid "Toggle activation"
131
- msgstr ""
132
-
133
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:742
134
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:918
135
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1901
136
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2029
137
- msgid "Apply"
138
- msgstr ""
139
-
140
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:756
141
- msgid "Pop Over Name"
142
- msgstr ""
143
-
144
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:757
145
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1308
146
- msgid "Conditions"
147
- msgstr ""
148
-
149
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:758
150
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:888
151
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1917
152
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1999
153
- msgid "Active"
154
- msgstr ""
155
-
156
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:819
157
- msgid "Edit"
158
- msgstr ""
159
-
160
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:822
161
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1985
162
- msgid "Deactivate"
163
- msgstr ""
164
-
165
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:824
166
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1987
167
- msgid "Activate"
168
- msgstr ""
169
-
170
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:827
171
- msgid "Delete"
172
- msgstr ""
173
-
174
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:842
175
- msgid "Site is not a Pro-site"
176
- msgstr ""
177
-
178
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:845
179
- msgid "Visitor is logged in"
180
- msgstr ""
181
-
182
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:848
183
- msgid "Visitor is not logged in"
184
- msgstr ""
185
-
186
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:851
187
- msgid "Visitor has never commented"
188
- msgstr ""
189
-
190
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:854
191
- msgid "Visit via a search engine"
192
- msgstr ""
193
-
194
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:857
195
- msgid "Visit not via an Internal link"
196
- msgstr ""
197
-
198
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:860
199
- msgid "Visit via specific referer"
200
- msgstr ""
201
-
202
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:863
203
- msgid "Popover shown less than x times"
204
- msgstr ""
205
-
206
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:866
207
- msgid "On specific URL"
208
- msgstr ""
209
-
210
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:869
211
- msgid "Not on specific URL"
212
- msgstr ""
213
-
214
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:872
215
- msgid "In a specific country"
216
- msgstr ""
217
-
218
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:875
219
- msgid "Not in a specific country"
220
- msgstr ""
221
-
222
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:890
223
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2001
224
- msgid "Inactive"
225
- msgstr ""
226
-
227
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:901
228
- msgid "No Pop Overs were found."
229
- msgstr ""
230
-
231
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:950
232
- msgid "New Pop Over"
233
- msgstr ""
234
-
235
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1005
236
- msgid "Edit Pop Over"
237
- msgstr ""
238
-
239
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1007
240
- msgid "Add Pop Over"
241
- msgstr ""
242
-
243
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1020
244
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2053
245
- msgid "Pop Over Settings"
246
- msgstr ""
247
-
248
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1026
249
- msgid "Popover title"
250
- msgstr ""
251
-
252
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1029
253
- msgid "Popover content"
254
- msgstr ""
255
-
256
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1041
257
- msgid "Active conditions"
258
- msgstr ""
259
-
260
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1042
261
- msgid "These are the rules that will determine if a popover should show when a visitor arrives at your website ALL rules must be true for the popover to show."
262
- msgstr ""
263
-
264
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1094
265
- msgid "Drop here"
266
- msgstr ""
267
-
268
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1097
269
- msgid "Appearance settings"
270
- msgstr ""
271
-
272
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1100
273
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1655
274
- msgid "Pop Over Size"
275
- msgstr ""
276
-
277
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1102
278
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1657
279
- msgid "Width:"
280
- msgstr ""
281
-
282
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1104
283
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1659
284
- msgid "Height:"
285
- msgstr ""
286
-
287
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1110
288
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1665
289
- msgid "Pop Over Position"
290
- msgstr ""
291
-
292
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1112
293
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1122
294
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1667
295
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1677
296
- msgid "Left:"
297
- msgstr ""
298
-
299
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1114
300
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1126
301
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1669
302
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1681
303
- msgid "Top:"
304
- msgstr ""
305
-
306
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1120
307
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1675
308
- msgid "Pop Over Margins"
309
- msgstr ""
310
-
311
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1124
312
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1679
313
- msgid "Right:"
314
- msgstr ""
315
-
316
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1128
317
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1683
318
- msgid "Bottom:"
319
- msgstr ""
320
-
321
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1136
322
- msgid "or use Javascript to resize and center the popover"
323
- msgstr ""
324
-
325
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1144
326
- msgid "Background Color"
327
- msgstr ""
328
-
329
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1146
330
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1154
331
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1703
332
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1711
333
- msgid "Hex:"
334
- msgstr ""
335
-
336
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1152
337
- msgid "Font Color"
338
- msgstr ""
339
-
340
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1166
341
- msgid "Pop Over Style"
342
- msgstr ""
343
-
344
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1170
345
- msgid "Use Style"
346
- msgstr ""
347
-
348
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1197
349
- msgid "Remove Hide Forever Link"
350
- msgstr ""
351
-
352
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1200
353
- msgid "Remove the \"Never see this message again\" link"
354
- msgstr ""
355
-
356
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1207
357
- msgid "Pop over appearance delays"
358
- msgstr ""
359
-
360
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1210
361
- msgid "Show Pop Over"
362
- msgstr ""
363
-
364
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1213
365
- msgid "immediately"
366
- msgstr ""
367
-
368
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1217
369
- msgid "after"
370
- msgstr ""
371
-
372
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1217
373
- msgid "seconds"
374
- msgstr ""
375
-
376
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1231
377
- msgid "Update"
378
- msgstr ""
379
-
380
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1234
381
- msgid "Add"
382
- msgstr ""
383
-
384
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1234
385
- msgid "Add and Activate"
386
- msgstr ""
387
-
388
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1416
389
- msgid "Add this rule to the popover."
390
- msgstr ""
391
-
392
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1429
393
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1442
394
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1456
395
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1474
396
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1490
397
- msgid "Remove"
398
- msgstr ""
399
-
400
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1460
401
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1781
402
- msgid "times"
403
- msgstr ""
404
-
405
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1495
406
- msgid "Select a country from the list below"
407
- msgstr ""
408
-
409
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1604
410
- msgid "Your settings have been saved."
411
- msgstr ""
412
-
413
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1633
414
- msgid "Pop Over content settings"
415
- msgstr ""
416
-
417
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1634
418
- msgid "Use the settings below to modify the content of your pop over and the rules that will determine when, or if, it will be displayed."
419
- msgstr ""
420
-
421
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1636
422
- msgid "Pop Over content"
423
- msgstr ""
424
-
425
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1637
426
- msgid "Enter the content for your pop over in the text area below. HTML is allowed."
427
- msgstr ""
428
-
429
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1641
430
- msgid "Update content"
431
- msgstr ""
432
-
433
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1644
434
- msgid "Pop Over display settings"
435
- msgstr ""
436
-
437
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1645
438
- msgid "Use the options below to determine the look, and display settings for the Pop Over."
439
- msgstr ""
440
-
441
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1651
442
- msgid "Appearance Settings"
443
- msgstr ""
444
-
445
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1691
446
- msgid "or just override the above with JS"
447
- msgstr ""
448
-
449
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1701
450
- msgid "Background Colour"
451
- msgstr ""
452
-
453
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1709
454
- msgid "Font Colour"
455
- msgstr ""
456
-
457
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1721
458
- msgid "Display Rules"
459
- msgstr ""
460
-
461
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1723
462
- msgid "Show the Pop Over if <strong>one</strong> of the following checked rules is true."
463
- msgstr ""
464
-
465
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1733
466
- msgid "Visitor is not a supporter."
467
- msgstr ""
468
-
469
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1742
470
- msgid "Visitor is logged in."
471
- msgstr ""
472
-
473
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1748
474
- msgid "Visitor is not logged in."
475
- msgstr ""
476
-
477
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1754
478
- msgid "Visitor has never commented here before."
479
- msgstr ""
480
-
481
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1760
482
- msgid "Visitor came from a search engine."
483
- msgstr ""
484
-
485
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1766
486
- msgid "Visitor did not come from an internal page."
487
- msgstr ""
488
-
489
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1772
490
- msgid "Visitor referrer matches"
491
- msgstr ""
492
-
493
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1779
494
- msgid "And the visitor has seen the pop over less than"
495
- msgstr ""
496
-
497
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1789
498
- msgid "Update settings"
499
- msgstr ""
500
-
501
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1866
502
- msgid "Add-on updated."
503
- msgstr ""
504
-
505
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1867
506
- msgid "Add-on not updated."
507
- msgstr ""
508
-
509
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1869
510
- msgid "Add-on activated."
511
- msgstr ""
512
-
513
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1870
514
- msgid "Add-on not activated."
515
- msgstr ""
516
-
517
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1872
518
- msgid "Add-on deactivated."
519
- msgstr ""
520
-
521
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1873
522
- msgid "Add-on not deactivated."
523
- msgstr ""
524
-
525
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1875
526
- msgid "Add-on activation toggled."
527
- msgstr ""
528
-
529
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1880
530
- msgid "Edit Add-ons"
531
- msgstr ""
532
-
533
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1915
534
- msgid "Add-on Name"
535
- msgstr ""
536
-
537
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1916
538
- msgid "Add-on File"
539
- msgstr ""
540
-
541
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:1977
542
- msgid " by "
543
- msgstr ""
544
-
545
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2012
546
- msgid "No Add-ons where found for this install."
547
- msgstr ""
548
-
549
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2047
550
- msgid "Your settings have been updated."
551
- msgstr ""
552
-
553
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2072
554
- msgid "Pop Over loading method"
555
- msgstr ""
556
-
557
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2074
558
- msgid "Select the loading method you want to use for your Pop Overs."
559
- msgstr ""
560
-
561
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2076
562
- msgid "- Page Footer : The pop over is included as part of the page html."
563
- msgstr ""
564
-
565
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2077
566
- msgid "- External Load : The pop over is loaded separately from the page, this is the best option if you are running a caching system."
567
- msgstr ""
568
-
569
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2078
570
- msgid "- Custom Load : The pop over is loaded separately from the page via a custom front end ajax call."
571
- msgstr ""
572
-
573
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2084
574
- msgid "Pop Over loaded using"
575
- msgstr ""
576
-
577
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2090
578
- msgid "Page Footer"
579
- msgstr ""
580
-
581
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2091
582
- msgid "External Load"
583
- msgstr ""
584
-
585
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/classes/popoveradmin.php:2092
586
- msgid "Custom Load"
587
- msgstr ""
588
-
589
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/default/popover.php:2
590
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fixed/popover.php:2
591
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fullbackground/popover.php:3
592
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fullbackgroundfixed/popover.php:2
593
- msgid "Close this box"
594
- msgstr ""
595
-
596
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/default/popover.php:8
597
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fixed/popover.php:8
598
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fullbackground/popover.php:9
599
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/css/fullbackgroundfixed/popover.php:8
600
- msgid "Never see this message again."
601
- msgstr ""
602
-
603
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/external/wpmudev-dash-notification.php:57
604
- #, php-format
605
- msgid "Easily get updates, support, and one-click WPMU DEV plugin/theme installations right from in your dashboard - <strong><a href=\"%s\" title=\"Install Now &raquo;\">install the free WPMU DEV Dashboard plugin</a></strong>. &nbsp;&nbsp;&nbsp;<small><a href=\"http://premium.wpmudev.org/wpmu-dev/update-notifications-plugin-information/\">(find out more)</a></small>"
606
- msgstr ""
607
-
608
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/external/wpmudev-dash-notification.php:61
609
- #, php-format
610
- msgid "Updates, Support, Premium Plugins, Community - <strong><a href=\"%s\" title=\"Activate Now &raquo;\">activate the WPMU DEV Dashboard plugin now</a></strong>."
611
- msgstr ""
612
-
613
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:1
614
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveraddons.help.php:1
615
- msgid "Introduction"
616
- msgstr ""
617
-
618
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:2
619
- msgid "The main Pop Over screen show all of the Pop Overs you have set up, you can edit, activate / deactivate and reorder the priority of the Pop Overs using this screen."
620
- msgstr ""
621
-
622
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:3
623
- msgid "Adding a Pop Over"
624
- msgstr ""
625
-
626
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:4
627
- msgid "To add a Pop Over you can either click on the <strong>Add New</strong> link near the top of the page, or click on the <strong>Create New</strong> menu item in the main Popover menu."
628
- msgstr ""
629
-
630
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:5
631
- msgid "Activating / Deactivating a Popover"
632
- msgstr ""
633
-
634
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:6
635
- msgid "If you find that you do not need a particular Pop Over for a period of time, but want to keep it for later use, then clicking on the Deactivate link underneath the Pop Overs title will ensure the Pop Over is not included in the processing."
636
- msgstr ""
637
-
638
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:8
639
- msgid "You can re-activate at any time by clicking on the Activate link underneath the Pop Overs title"
640
- msgstr ""
641
-
642
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:10
643
- msgid "Ordering Pop Overs"
644
- msgstr ""
645
-
646
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:11
647
- msgid "The Pop Overs are processed in the order they show in the list. As soon as a Pop Over is shown, the remainder of the Pop Overs in the list are ignored. You can change the order of the Pop Overs processing by clicking in the left hand column of the list and dragging the relevant pop Over to the desired location."
648
- msgstr ""
649
-
650
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:13
651
- msgid "Deleting Pop Overs"
652
- msgstr ""
653
-
654
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popover.help.php:14
655
- msgid "Once you have finished with a Pop Over you can delete it by clicking on the Delete link underneath the Pop Overs title."
656
- msgstr ""
657
-
658
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveraddons.help.php:2
659
- msgid "Add-ons allow you to extend the Pop Over plugin. The Add-on screen lists all of the Add-ons currently installed. To activate or deactivate an Add-on you should click on the Activate or Deactivate link underneath the Add-ons title."
660
- msgstr ""
661
-
662
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:1
663
- msgid "Adding / Editing a Pop Over"
664
- msgstr ""
665
-
666
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:2
667
- msgid "A Pop Over should have the following information."
668
- msgstr ""
669
-
670
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:4
671
- msgid "<strong>A Title</strong> - The Pop Over title helps you to identify different Pop Overs in the main list."
672
- msgstr ""
673
-
674
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:5
675
- msgid "<strong>Pop Over content</strong> - This is the content that the Pop Over will display. You can upload any images you require by clicking on the Add Media button at the top of the edit area."
676
- msgstr ""
677
-
678
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:8
679
- msgid "<strong>Active Conditions</strong> - You can determine the conditions that need to be fulfilled in order for this Pop Over to display by dragging the relevant conditions in the the <strong>Drop Here</strong> box. All of the conditions must be true in order for the Pop Over to display."
680
- msgstr ""
681
-
682
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/help/popoveredit.help.php:11
683
- msgid "<strong>Appearance Settings</strong> - You can set the size and position of the Pop Over by setting the Appearance options. If you want the Pop Over system to attempt to determine the size of the Pop Overs content and automatically resize the Pop Over and attempt to center it on your browser window."
684
- msgstr ""
685
-
686
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/class_wd_help_tooltips.php:297
687
- msgid "Help"
688
- msgstr ""
689
-
690
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:150
691
- msgid "Australia"
692
- msgstr ""
693
-
694
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:151
695
- msgid "Afghanistan"
696
- msgstr ""
697
-
698
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:152
699
- msgid "Albania"
700
- msgstr ""
701
-
702
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:153
703
- msgid "Algeria"
704
- msgstr ""
705
-
706
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:154
707
- msgid "American Samoa"
708
- msgstr ""
709
-
710
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:155
711
- msgid "Andorra"
712
- msgstr ""
713
-
714
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:156
715
- msgid "Angola"
716
- msgstr ""
717
-
718
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:157
719
- msgid "Anguilla"
720
- msgstr ""
721
-
722
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:158
723
- msgid "Antarctica"
724
- msgstr ""
725
-
726
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:159
727
- msgid "Antigua & Barbuda"
728
- msgstr ""
729
-
730
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:160
731
- msgid "Argentina"
732
- msgstr ""
733
-
734
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:161
735
- msgid "Armenia"
736
- msgstr ""
737
-
738
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:162
739
- msgid "Aruba"
740
- msgstr ""
741
-
742
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:163
743
- msgid "Austria"
744
- msgstr ""
745
-
746
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:164
747
- msgid "Azerbaijan"
748
- msgstr ""
749
-
750
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:165
751
- msgid "Bahamas"
752
- msgstr ""
753
-
754
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:166
755
- msgid "Bahrain"
756
- msgstr ""
757
-
758
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:167
759
- msgid "Bangladesh"
760
- msgstr ""
761
-
762
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:168
763
- msgid "Barbados"
764
- msgstr ""
765
-
766
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:169
767
- msgid "Belarus"
768
- msgstr ""
769
-
770
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:170
771
- msgid "Belgium"
772
- msgstr ""
773
-
774
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:171
775
- msgid "Belize"
776
- msgstr ""
777
-
778
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:172
779
- msgid "Benin"
780
- msgstr ""
781
-
782
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:173
783
- msgid "Bermuda"
784
- msgstr ""
785
-
786
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:174
787
- msgid "Bhutan"
788
- msgstr ""
789
-
790
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:175
791
- msgid "Bolivia"
792
- msgstr ""
793
-
794
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:176
795
- msgid "Bosnia/Hercegovina"
796
- msgstr ""
797
-
798
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:177
799
- msgid "Botswana"
800
- msgstr ""
801
-
802
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:178
803
- msgid "Bouvet Island"
804
- msgstr ""
805
-
806
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:179
807
- msgid "Brazil"
808
- msgstr ""
809
-
810
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:180
811
- msgid "British Indian Ocean Territory"
812
- msgstr ""
813
-
814
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:181
815
- msgid "Brunei Darussalam"
816
- msgstr ""
817
-
818
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:182
819
- msgid "Bulgaria"
820
- msgstr ""
821
-
822
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:183
823
- msgid "Burkina Faso"
824
- msgstr ""
825
-
826
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:184
827
- msgid "Burundi"
828
- msgstr ""
829
-
830
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:185
831
- msgid "Cambodia"
832
- msgstr ""
833
-
834
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:186
835
- msgid "Cameroon"
836
- msgstr ""
837
-
838
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:187
839
- msgid "Canada"
840
- msgstr ""
841
-
842
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:188
843
- msgid "Cape Verde"
844
- msgstr ""
845
-
846
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:189
847
- msgid "Cayman Is"
848
- msgstr ""
849
-
850
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:190
851
- msgid "Central African Republic"
852
- msgstr ""
853
-
854
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:191
855
- msgid "Chad"
856
- msgstr ""
857
-
858
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:192
859
- msgid "Chile"
860
- msgstr ""
861
-
862
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:193
863
- msgid "China, People's Republic of"
864
- msgstr ""
865
-
866
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:194
867
- msgid "Christmas Island"
868
- msgstr ""
869
-
870
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:195
871
- msgid "Cocos Islands"
872
- msgstr ""
873
-
874
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:196
875
- msgid "Colombia"
876
- msgstr ""
877
-
878
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:197
879
- msgid "Comoros"
880
- msgstr ""
881
-
882
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:198
883
- msgid "Congo"
884
- msgstr ""
885
-
886
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:199
887
- msgid "Congo, Democratic Republic"
888
- msgstr ""
889
-
890
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:200
891
- msgid "Cook Islands"
892
- msgstr ""
893
-
894
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:201
895
- msgid "Costa Rica"
896
- msgstr ""
897
-
898
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:202
899
- msgid "Cote d'Ivoire"
900
- msgstr ""
901
-
902
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:203
903
- msgid "Croatia"
904
- msgstr ""
905
-
906
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:204
907
- msgid "Cuba"
908
- msgstr ""
909
-
910
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:205
911
- msgid "Cyprus"
912
- msgstr ""
913
-
914
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:206
915
- msgid "Czech Republic"
916
- msgstr ""
917
-
918
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:207
919
- msgid "Denmark"
920
- msgstr ""
921
-
922
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:208
923
- msgid "Djibouti"
924
- msgstr ""
925
-
926
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:209
927
- msgid "Dominica"
928
- msgstr ""
929
-
930
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:210
931
- msgid "Dominican Republic"
932
- msgstr ""
933
-
934
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:211
935
- msgid "East Timor"
936
- msgstr ""
937
-
938
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:212
939
- msgid "Ecuador"
940
- msgstr ""
941
-
942
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:213
943
- msgid "Egypt"
944
- msgstr ""
945
-
946
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:214
947
- msgid "El Salvador"
948
- msgstr ""
949
-
950
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:215
951
- msgid "Equatorial Guinea"
952
- msgstr ""
953
-
954
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:216
955
- msgid "Eritrea"
956
- msgstr ""
957
-
958
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:217
959
- msgid "Estonia"
960
- msgstr ""
961
-
962
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:218
963
- msgid "Ethiopia"
964
- msgstr ""
965
-
966
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:219
967
- msgid "Falkland Islands"
968
- msgstr ""
969
-
970
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:220
971
- msgid "Faroe Islands"
972
- msgstr ""
973
-
974
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:221
975
- msgid "Fiji"
976
- msgstr ""
977
-
978
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:222
979
- msgid "Finland"
980
- msgstr ""
981
-
982
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:223
983
- msgid "France"
984
- msgstr ""
985
-
986
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:224
987
- msgid "France, Metropolitan"
988
- msgstr ""
989
-
990
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:225
991
- msgid "French Guiana"
992
- msgstr ""
993
-
994
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:226
995
- msgid "French Polynesia"
996
- msgstr ""
997
-
998
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:227
999
- msgid "French South Territories"
1000
- msgstr ""
1001
-
1002
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:228
1003
- msgid "Gabon"
1004
- msgstr ""
1005
-
1006
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:229
1007
- msgid "Gambia"
1008
- msgstr ""
1009
-
1010
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:230
1011
- msgid "Georgia"
1012
- msgstr ""
1013
-
1014
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:231
1015
- msgid "Germany"
1016
- msgstr ""
1017
-
1018
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:232
1019
- msgid "Ghana"
1020
- msgstr ""
1021
-
1022
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:233
1023
- msgid "Gibraltar"
1024
- msgstr ""
1025
-
1026
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:234
1027
- msgid "Greece"
1028
- msgstr ""
1029
-
1030
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:235
1031
- msgid "Greenland"
1032
- msgstr ""
1033
-
1034
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:236
1035
- msgid "Grenada"
1036
- msgstr ""
1037
-
1038
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:237
1039
- msgid "Guadeloupe"
1040
- msgstr ""
1041
-
1042
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:238
1043
- msgid "Guam"
1044
- msgstr ""
1045
-
1046
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:239
1047
- msgid "Guatemala"
1048
- msgstr ""
1049
-
1050
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:240
1051
- msgid "Guinea"
1052
- msgstr ""
1053
-
1054
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:241
1055
- msgid "Guinea-Bissau"
1056
- msgstr ""
1057
-
1058
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:242
1059
- msgid "Guyana"
1060
- msgstr ""
1061
-
1062
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:243
1063
- msgid "Haiti"
1064
- msgstr ""
1065
-
1066
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:244
1067
- msgid "Heard Island And Mcdonald Island"
1068
- msgstr ""
1069
-
1070
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:245
1071
- msgid "Honduras"
1072
- msgstr ""
1073
-
1074
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:246
1075
- msgid "Hong Kong"
1076
- msgstr ""
1077
-
1078
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:247
1079
- msgid "Hungary"
1080
- msgstr ""
1081
-
1082
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:248
1083
- msgid "Iceland"
1084
- msgstr ""
1085
-
1086
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:249
1087
- msgid "India"
1088
- msgstr ""
1089
-
1090
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:250
1091
- msgid "Indonesia"
1092
- msgstr ""
1093
-
1094
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:251
1095
- msgid "Iran"
1096
- msgstr ""
1097
-
1098
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:252
1099
- msgid "Iraq"
1100
- msgstr ""
1101
-
1102
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:253
1103
- msgid "Ireland"
1104
- msgstr ""
1105
-
1106
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:254
1107
- msgid "Israel"
1108
- msgstr ""
1109
-
1110
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:255
1111
- msgid "Italy"
1112
- msgstr ""
1113
-
1114
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:256
1115
- msgid "Jamaica"
1116
- msgstr ""
1117
-
1118
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:257
1119
- msgid "Japan"
1120
- msgstr ""
1121
-
1122
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:258
1123
- msgid "Johnston Island"
1124
- msgstr ""
1125
-
1126
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:259
1127
- msgid "Jordan"
1128
- msgstr ""
1129
-
1130
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:260
1131
- msgid "Kazakhstan"
1132
- msgstr ""
1133
-
1134
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:261
1135
- msgid "Kenya"
1136
- msgstr ""
1137
-
1138
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:262
1139
- msgid "Kiribati"
1140
- msgstr ""
1141
-
1142
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:263
1143
- msgid "Korea, Democratic Peoples Republic"
1144
- msgstr ""
1145
-
1146
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:264
1147
- msgid "Korea, Republic of"
1148
- msgstr ""
1149
-
1150
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:265
1151
- msgid "Kuwait"
1152
- msgstr ""
1153
-
1154
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:266
1155
- msgid "Kyrgyzstan"
1156
- msgstr ""
1157
-
1158
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:267
1159
- msgid "Lao People's Democratic Republic"
1160
- msgstr ""
1161
-
1162
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:268
1163
- msgid "Latvia"
1164
- msgstr ""
1165
-
1166
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:269
1167
- msgid "Lebanon"
1168
- msgstr ""
1169
-
1170
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:270
1171
- msgid "Lesotho"
1172
- msgstr ""
1173
-
1174
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:271
1175
- msgid "Liberia"
1176
- msgstr ""
1177
-
1178
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:272
1179
- msgid "Libyan Arab Jamahiriya"
1180
- msgstr ""
1181
-
1182
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:273
1183
- msgid "Liechtenstein"
1184
- msgstr ""
1185
-
1186
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:274
1187
- msgid "Lithuania"
1188
- msgstr ""
1189
-
1190
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:275
1191
- msgid "Luxembourg"
1192
- msgstr ""
1193
-
1194
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:276
1195
- msgid "Macau"
1196
- msgstr ""
1197
-
1198
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:277
1199
- msgid "Macedonia"
1200
- msgstr ""
1201
-
1202
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:278
1203
- msgid "Madagascar"
1204
- msgstr ""
1205
-
1206
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:279
1207
- msgid "Malawi"
1208
- msgstr ""
1209
-
1210
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:280
1211
- msgid "Malaysia"
1212
- msgstr ""
1213
-
1214
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:281
1215
- msgid "Maldives"
1216
- msgstr ""
1217
-
1218
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:282
1219
- msgid "Mali"
1220
- msgstr ""
1221
-
1222
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:283
1223
- msgid "Malta"
1224
- msgstr ""
1225
-
1226
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:284
1227
- msgid "Marshall Islands"
1228
- msgstr ""
1229
-
1230
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:285
1231
- msgid "Martinique"
1232
- msgstr ""
1233
-
1234
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:286
1235
- msgid "Mauritania"
1236
- msgstr ""
1237
-
1238
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:287
1239
- msgid "Mauritius"
1240
- msgstr ""
1241
-
1242
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:288
1243
- msgid "Mayotte"
1244
- msgstr ""
1245
-
1246
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:289
1247
- msgid "Mexico"
1248
- msgstr ""
1249
-
1250
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:290
1251
- msgid "Micronesia"
1252
- msgstr ""
1253
-
1254
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:291
1255
- msgid "Moldavia"
1256
- msgstr ""
1257
-
1258
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:292
1259
- msgid "Monaco"
1260
- msgstr ""
1261
-
1262
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:293
1263
- msgid "Mongolia"
1264
- msgstr ""
1265
-
1266
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:294
1267
- msgid "Montserrat"
1268
- msgstr ""
1269
-
1270
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:295
1271
- msgid "Morocco"
1272
- msgstr ""
1273
-
1274
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:296
1275
- msgid "Mozambique"
1276
- msgstr ""
1277
-
1278
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:297
1279
- msgid "Union Of Myanmar"
1280
- msgstr ""
1281
-
1282
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:298
1283
- msgid "Namibia"
1284
- msgstr ""
1285
-
1286
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:299
1287
- msgid "Nauru Island"
1288
- msgstr ""
1289
-
1290
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:300
1291
- msgid "Nepal"
1292
- msgstr ""
1293
-
1294
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:301
1295
- msgid "Netherlands"
1296
- msgstr ""
1297
-
1298
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:302
1299
- msgid "Netherlands Antilles"
1300
- msgstr ""
1301
-
1302
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:303
1303
- msgid "New Caledonia"
1304
- msgstr ""
1305
-
1306
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:304
1307
- msgid "New Zealand"
1308
- msgstr ""
1309
-
1310
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:305
1311
- msgid "Nicaragua"
1312
- msgstr ""
1313
-
1314
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:306
1315
- msgid "Niger"
1316
- msgstr ""
1317
-
1318
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:307
1319
- msgid "Nigeria"
1320
- msgstr ""
1321
-
1322
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:308
1323
- msgid "Niue"
1324
- msgstr ""
1325
-
1326
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:309
1327
- msgid "Norfolk Island"
1328
- msgstr ""
1329
-
1330
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:310
1331
- msgid "Mariana Islands, Northern"
1332
- msgstr ""
1333
-
1334
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:311
1335
- msgid "Norway"
1336
- msgstr ""
1337
-
1338
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:312
1339
- msgid "Oman"
1340
- msgstr ""
1341
-
1342
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:313
1343
- msgid "Pakistan"
1344
- msgstr ""
1345
-
1346
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:314
1347
- msgid "Palau Islands"
1348
- msgstr ""
1349
-
1350
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:315
1351
- msgid "Palestine"
1352
- msgstr ""
1353
-
1354
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:316
1355
- msgid "Panama"
1356
- msgstr ""
1357
-
1358
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:317
1359
- msgid "Papua New Guinea"
1360
- msgstr ""
1361
-
1362
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:318
1363
- msgid "Paraguay"
1364
- msgstr ""
1365
-
1366
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:319
1367
- msgid "Peru"
1368
- msgstr ""
1369
-
1370
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:320
1371
- msgid "Philippines"
1372
- msgstr ""
1373
-
1374
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:321
1375
- msgid "Pitcairn"
1376
- msgstr ""
1377
-
1378
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:322
1379
- msgid "Poland"
1380
- msgstr ""
1381
-
1382
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:323
1383
- msgid "Portugal"
1384
- msgstr ""
1385
-
1386
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:324
1387
- msgid "Puerto Rico"
1388
- msgstr ""
1389
-
1390
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:325
1391
- msgid "Qatar"
1392
- msgstr ""
1393
-
1394
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:326
1395
- msgid "Reunion Island"
1396
- msgstr ""
1397
-
1398
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:327
1399
- msgid "Romania"
1400
- msgstr ""
1401
-
1402
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:328
1403
- msgid "Russian Federation"
1404
- msgstr ""
1405
-
1406
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:329
1407
- msgid "Rwanda"
1408
- msgstr ""
1409
-
1410
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:330
1411
- msgid "Samoa"
1412
- msgstr ""
1413
-
1414
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:331
1415
- msgid "St Helena"
1416
- msgstr ""
1417
-
1418
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:332
1419
- msgid "St Kitts & Nevis"
1420
- msgstr ""
1421
-
1422
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:333
1423
- msgid "St Lucia"
1424
- msgstr ""
1425
-
1426
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:334
1427
- msgid "St Pierre & Miquelon"
1428
- msgstr ""
1429
-
1430
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:335
1431
- msgid "St Vincent"
1432
- msgstr ""
1433
-
1434
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:336
1435
- msgid "San Marino"
1436
- msgstr ""
1437
-
1438
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:337
1439
- msgid "Sao Tome & Principe"
1440
- msgstr ""
1441
-
1442
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:338
1443
- msgid "Saudi Arabia"
1444
- msgstr ""
1445
-
1446
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:339
1447
- msgid "Senegal"
1448
- msgstr ""
1449
-
1450
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:340
1451
- msgid "Seychelles"
1452
- msgstr ""
1453
-
1454
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:341
1455
- msgid "Sierra Leone"
1456
- msgstr ""
1457
-
1458
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:342
1459
- msgid "Singapore"
1460
- msgstr ""
1461
-
1462
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:343
1463
- msgid "Slovakia"
1464
- msgstr ""
1465
-
1466
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:344
1467
- msgid "Slovenia"
1468
- msgstr ""
1469
-
1470
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:345
1471
- msgid "Solomon Islands"
1472
- msgstr ""
1473
-
1474
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:346
1475
- msgid "Somalia"
1476
- msgstr ""
1477
-
1478
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:347
1479
- msgid "South Africa"
1480
- msgstr ""
1481
-
1482
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:348
1483
- msgid "South Georgia and South Sandwich"
1484
- msgstr ""
1485
-
1486
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:349
1487
- msgid "Spain"
1488
- msgstr ""
1489
-
1490
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:350
1491
- msgid "Sri Lanka"
1492
- msgstr ""
1493
-
1494
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:351
1495
- msgid "Stateless Persons"
1496
- msgstr ""
1497
-
1498
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:352
1499
- msgid "Sudan"
1500
- msgstr ""
1501
-
1502
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:353
1503
- msgid "Suriname"
1504
- msgstr ""
1505
-
1506
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:354
1507
- msgid "Svalbard and Jan Mayen"
1508
- msgstr ""
1509
-
1510
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:355
1511
- msgid "Swaziland"
1512
- msgstr ""
1513
-
1514
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:356
1515
- msgid "Sweden"
1516
- msgstr ""
1517
-
1518
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:357
1519
- msgid "Switzerland"
1520
- msgstr ""
1521
-
1522
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:358
1523
- msgid "Syrian Arab Republic"
1524
- msgstr ""
1525
-
1526
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:359
1527
- msgid "Taiwan, Republic of China"
1528
- msgstr ""
1529
-
1530
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:360
1531
- msgid "Tajikistan"
1532
- msgstr ""
1533
-
1534
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:361
1535
- msgid "Tanzania"
1536
- msgstr ""
1537
-
1538
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:362
1539
- msgid "Thailand"
1540
- msgstr ""
1541
-
1542
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:363
1543
- msgid "Timor Leste"
1544
- msgstr ""
1545
-
1546
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:364
1547
- msgid "Togo"
1548
- msgstr ""
1549
-
1550
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:365
1551
- msgid "Tokelau"
1552
- msgstr ""
1553
-
1554
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:366
1555
- msgid "Tonga"
1556
- msgstr ""
1557
-
1558
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:367
1559
- msgid "Trinidad & Tobago"
1560
- msgstr ""
1561
-
1562
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:368
1563
- msgid "Tunisia"
1564
- msgstr ""
1565
-
1566
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:369
1567
- msgid "Turkey"
1568
- msgstr ""
1569
-
1570
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:370
1571
- msgid "Turkmenistan"
1572
- msgstr ""
1573
-
1574
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:371
1575
- msgid "Turks And Caicos Islands"
1576
- msgstr ""
1577
-
1578
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:372
1579
- msgid "Tuvalu"
1580
- msgstr ""
1581
-
1582
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:373
1583
- msgid "Uganda"
1584
- msgstr ""
1585
-
1586
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:374
1587
- msgid "Ukraine"
1588
- msgstr ""
1589
-
1590
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:375
1591
- msgid "United Arab Emirates"
1592
- msgstr ""
1593
-
1594
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:376
1595
- msgid "United Kingdom"
1596
- msgstr ""
1597
-
1598
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:377
1599
- msgid "US Minor Outlying Islands"
1600
- msgstr ""
1601
-
1602
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:378
1603
- msgid "USA"
1604
- msgstr ""
1605
-
1606
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:379
1607
- msgid "Upper Volta"
1608
- msgstr ""
1609
-
1610
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:380
1611
- msgid "Uruguay"
1612
- msgstr ""
1613
-
1614
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:381
1615
- msgid "Uzbekistan"
1616
- msgstr ""
1617
-
1618
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:382
1619
- msgid "Vanuatu"
1620
- msgstr ""
1621
-
1622
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:383
1623
- msgid "Vatican City State"
1624
- msgstr ""
1625
-
1626
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:384
1627
- msgid "Venezuela"
1628
- msgstr ""
1629
-
1630
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:385
1631
- msgid "Vietnam"
1632
- msgstr ""
1633
-
1634
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:386
1635
- msgid "Virgin Islands (British)"
1636
- msgstr ""
1637
-
1638
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:387
1639
- msgid "Virgin Islands (US)"
1640
- msgstr ""
1641
-
1642
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:388
1643
- msgid "Wallis And Futuna Islands"
1644
- msgstr ""
1645
-
1646
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:389
1647
- msgid "Western Sahara"
1648
- msgstr ""
1649
-
1650
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:390
1651
- msgid "Yemen Arab Rep."
1652
- msgstr ""
1653
-
1654
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:391
1655
- msgid "Yemen Democratic"
1656
- msgstr ""
1657
-
1658
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:392
1659
- msgid "Yugoslavia"
1660
- msgstr ""
1661
-
1662
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:393
1663
- msgid "Zaire"
1664
- msgstr ""
1665
-
1666
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:394
1667
- msgid "Zambia"
1668
- msgstr ""
1669
-
1670
- #: /Users/barrygetty/Work/wordpress/plugins/popover/popoverincludes/includes/functions.php:395
1671
- msgid "Zimbabwe"
1672
- msgstr ""
1673
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WordPress PopUp ===
2
  Contributors: WPMUDEV
3
- Tags: Buddypress,buddypress plugin,Geo Tag,Geo Target,GEOTag,Jquery,Light Box,Lightbox,making money,multisite,Pop Over,Pop Over Box,Pop Over Message,Pop Up Message,Pop-up,Pop-up advertising,Pop-up advertising Box,Popover,Popover Box,Popover Message,Popup,Popup Box,Popup Message,Post Type,Post Type Rules,SEO,Show On Click,Show On Exit,WordPress Pop Over,WordPress Pop Up,WordPress Popover,WordPress Popup,wpmu,wpmu plugin,xProfile Fields, Popover WP Roles, Popover Responsive Rules, Popover Specific Country, Popover Specific URL, Popup WP Roles, Popup Responsive Rules, Popup Specific Country, Popup Specific URL, Exit Intent, Exit Popup, Exit Popover, Popover Ads, Popup Ads, Pop Over Ads, Pop Up Ads, Pop-up Ads, xProfile
4
  Requires at least: 3.1
5
- Tested up to: 3.9.1
6
- Stable tag: 4.4.5.4
7
 
8
  Allows you to display a fancy popup to visitors, a *very* effective way of advertising a mailing list, special offer or running a plain old ad.
9
 
@@ -11,8 +11,6 @@ Allows you to display a fancy popup to visitors, a *very* effective way of adver
11
 
12
  One of the most effective ways to advertise your mailing list, special offer or simply to show ads is via javascript ‘pop over’ on your site. And that’s exactly what his easy-to-use and guaranteed-to-work plugin does.
13
 
14
- [youtube https://www.youtube.com/watch?v=eqhZebtA-SU]
15
-
16
  Here is just a taste of what it can do:
17
 
18
  - Display fancy pop up(s) (powered as a popover!) to visitors network wide, per site or on specific URLs
@@ -46,8 +44,6 @@ Then, set the display rules, namely: Show the Pop Over if one of the following c
46
 
47
  And you’re good to go!
48
 
49
- * <a href='http://premium.wpmudev.org/project/the-pop-over-plugin/'>Download the pro version &raquo;</a>
50
-
51
  == Installation ==
52
 
53
  WordPress Installation Instructions:
@@ -69,8 +65,6 @@ For blog by blog, leave as is.
69
 
70
  For network wide control - add the line define('PO_GLOBAL', true); to your wp-config.php file.
71
 
72
- * You can find <a href='http://premium.wpmudev.org/manuals/installing-regular-plugins-on-wpmu/'>in-depth setup and usage instructions with screenshots here &raquo;</a>
73
-
74
  == Screenshots ==
75
 
76
  1. The PopUp in action
@@ -79,60 +73,18 @@ For network wide control - add the line define('PO_GLOBAL', true); to your wp-co
79
 
80
  == Changelog ==
81
 
82
- = 4.4.5.4 =
83
-
84
- * Performance improvements
85
- * Fixed issue with dynamic JavaScript loading
86
- * Added PO_PLUGIN_DIR in config for changing plugin directory name
87
-
88
- = 4.4.5.2 =
89
-
90
- * Added missing translatable strings
91
- * Updated language file
92
-
93
- = 4.4.5.1 =
94
-
95
- * added collation to tables creation code
96
- * updated require calls to include directory path
97
- * moved custom loading out of experimental status
98
- * set default loading method to custom loading
99
-
100
- = 4.4.5 =
101
-
102
- * Added different custom loading method that should be cache resistant and remove issues with other ajax loading method.
103
- * Made On URL rule more specific so that it doesn't match child pages when the main page is specified
104
-
105
- = 4.4.4 =
106
-
107
- * Added option to switch from JS loading to standard loading of pop ups.
108
- * Added ability to use regular expressions in the referrers and on url conditions.
109
- * Prepared code to make it easy to upgrade interface for future releases.
110
-
111
- = 4.4.3 =
112
-
113
- * Updated for WP 3.5
114
- * Added initial attempt to distinguish referrers from Google search and referrers from Google custom site search.
115
-
116
- = 4.4.2 =
117
-
118
- * Removed unneeded css and js files
119
- * Updated language file
120
-
121
- = 4.4.1 =
122
-
123
- * Moved popover loading js to be created by a php file due to needing extra processing.
124
- * Fixed issue with directory based sites loading popover script from main site.
125
- * Fixed issue of popover loading on login and register pages.
126
-
127
- = 4.4 =
128
-
129
- * Updated Popover to load via ajax call rather than page creation for cache plugin compatibility
130
 
131
  = 4.3.2 =
132
  * Major rewrite
133
  * Multiple PopUps can be created
134
- * Fixed issue of network activation not creating tables until admin area visited
135
- * Updated code to remove all notifications, warnings and depreciated function calls ready for WP 3.4
136
 
137
  = 3.1.4 =
138
  * WP3.3 style updating
1
  === WordPress PopUp ===
2
  Contributors: WPMUDEV
3
+ Tags: Popup, Pop-up, Pop Over, popover, Responsive Popup, Advertise, Promotion, Marketing, Lightbox, Mailing list pop-up
4
  Requires at least: 3.1
5
+ Tested up to: 4.0
6
+ Stable tag: 4.6
7
 
8
  Allows you to display a fancy popup to visitors, a *very* effective way of advertising a mailing list, special offer or running a plain old ad.
9
 
11
 
12
  One of the most effective ways to advertise your mailing list, special offer or simply to show ads is via javascript ‘pop over’ on your site. And that’s exactly what his easy-to-use and guaranteed-to-work plugin does.
13
 
 
 
14
  Here is just a taste of what it can do:
15
 
16
  - Display fancy pop up(s) (powered as a popover!) to visitors network wide, per site or on specific URLs
44
 
45
  And you’re good to go!
46
 
 
 
47
  == Installation ==
48
 
49
  WordPress Installation Instructions:
65
 
66
  For network wide control - add the line define('PO_GLOBAL', true); to your wp-config.php file.
67
 
 
 
68
  == Screenshots ==
69
 
70
  1. The PopUp in action
73
 
74
  == Changelog ==
75
 
76
+ = 4.6 =
77
+ * Completely re-build the UI from ground up!
78
+ * Migrated PopUps to a much more flexible data structure.
79
+ * Merged sections "Add-Ons" and "Settings" to a single page.
80
+ * Removed old legacy code; plugin is cleaner and faster.
81
+ * New feature: Preview PopUp inside the Editor!
82
+ * Three new, modern PopUp styles added.
83
+ * Featured Image support for new PopUp styles.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  = 4.3.2 =
86
  * Major rewrite
87
  * Multiple PopUps can be created
 
 
88
 
89
  = 3.1.4 =
90
  * WP3.3 style updating
views/meta-appearance.php ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Metabox "Appearance"
4
+ *
5
+ * Used in class-popup-admin.php
6
+ * Available variables: $popup
7
+ */
8
+
9
+ $styles = apply_filters( 'popup-styles', array() );
10
+
11
+ ?>
12
+ <div class="wpmui-grid-12">
13
+ <div class="col-12">
14
+ <label for="po-style">
15
+ <strong>
16
+ <?php _e( 'Select which style you want to use:', PO_LANG ); ?>
17
+ </strong>
18
+ </label>
19
+ </div>
20
+ </div>
21
+ <div class="wpmui-grid-12">
22
+ <div class="col-7">
23
+ <input type="hidden"
24
+ class="po-orig-style"
25
+ name="po_orig_style"
26
+ value="<?php echo esc_attr( $popup->style ); ?>" />
27
+ <input type="hidden"
28
+ class="po-orig-style-old"
29
+ name="po_orig_style_old"
30
+ value="<?php echo esc_attr( $popup->deprecated_style ); ?>" />
31
+ <select class="block" id="po-style" name="po_style">
32
+ <?php foreach ( $styles as $key => $data ) : ?>
33
+ <?php if ( $data->deprecated && $popup->style != $key ) { continue; } ?>
34
+ <?php if ( ! $data->pro && PO_VERSION != 'pro' ) : ?>
35
+ <option value="<?php echo esc_attr( $key ); ?>"
36
+ data-old="<?php echo esc_attr( $data->deprecated ); ?>"
37
+ <?php selected( $key, $popup->style ); ?>>
38
+ <?php echo esc_attr( $data->name ); ?>
39
+ <?php if ( $data->deprecated ) : ?>*)<?php endif; ?>
40
+ </option>
41
+ <?php endif; ?>
42
+ <?php endforeach; ?>
43
+ <?php foreach ( $styles as $key => $data ) : ?>
44
+ <?php if ( $data->deprecated ) { continue; } ?>
45
+ <?php if ( $data->pro && PO_VERSION != 'pro' ) : ?>
46
+ <option disabled="disabled">
47
+ <?php echo esc_attr( $data->name ); ?> -
48
+ <?php _e( 'PRO Version only', PO_LANG ); ?>
49
+ </option>
50
+ <?php endif; ?>
51
+ <?php endforeach; ?>
52
+ </select>
53
+ </div>
54
+ <div class="col-5">
55
+ <label>
56
+ <input type="checkbox"
57
+ name="po_no_round_corners"
58
+ <?php checked( $popup->round_corners, false ); ?> />
59
+ <?php _e( 'No rounded corners', PO_LANG ); ?>
60
+ </label>
61
+ </div>
62
+ </div>
63
+ <?php if ( $popup->deprecated_style ) :
64
+ ?>
65
+ <div class="wpmui-grid-12">
66
+ <div class="col-12">
67
+ <p style="margin-top:0"><em><?php _e(
68
+ '*) This style is outdated and does not support all options '.
69
+ 'on this page. ' .
70
+ 'Once you save your PopUp with a new style you cannot ' .
71
+ 'revert to this style!<br />' .
72
+ 'Tipp: Use the Preview function to test this PopUp with one ' .
73
+ 'of the new styles before saving it.', PO_LANG
74
+ ); ?></em></p>
75
+ </div>
76
+ </div>
77
+ <?php
78
+ endif; ?>
79
+
80
+ <div class="pro-only">
81
+ <div class="wpmui-grid-12">
82
+ <div class="col-12 inp-row">
83
+ <label>
84
+ <input type="checkbox"
85
+ readonly="readonly"
86
+ id="po-custom-colors"
87
+ data-toggle=".chk-custom-colors"
88
+ />
89
+ <?php _e( 'Use custom colors', PO_LANG ); ?>
90
+ </label>
91
+ </div>
92
+ </div>
93
+ <div class="wpmui-grid-12 chk-custom-colors">
94
+ <div class="col-colorpicker inp-row">
95
+ <input type="text"
96
+ class="colorpicker inp-small"
97
+ readonly="readonly"
98
+ value="<?php echo esc_attr( $popup->color['col1'] ); ?>" />
99
+ <br />
100
+ <?php _e( 'Links, button background, heading and subheading', PO_LANG ); ?>
101
+ </div>
102
+ <div class="col-colorpicker inp-row">
103
+ <input type="text"
104
+ class="colorpicker inp-small"
105
+ readonly="readonly"
106
+ value="<?php echo esc_attr( $popup->color['col2'] ); ?>" />
107
+ <br />
108
+ <?php _e( 'Button text', PO_LANG ); ?>
109
+ </div>
110
+ </div>
111
+ <div class="pro-note">
112
+ <div style="padding:50px 0 0;">
113
+ <?php printf(
114
+ __( 'Pro feature only. <a href="%1$s" target="_blank">Find out more &raquo;</a>', PO_LANG ),
115
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
116
+ ); ?>
117
+ </div>
118
+ </div>
119
+ </div>
120
+
121
+ <div class="wpmui-grid-12">
122
+ <div class="col-12 inp-row">
123
+ <label>
124
+ <input type="checkbox"
125
+ name="po_custom_size"
126
+ id="po-custom-size"
127
+ data-toggle=".chk-custom-size"
128
+ <?php checked( $popup->custom_size ); ?> />
129
+ <?php _e( 'Use custom size (if selected the PopUp won\'t be responsive)', PO_LANG ); ?>
130
+ </label>
131
+ </div>
132
+ </div>
133
+ <div class="wpmui-grid-12 chk-custom-size">
134
+ <div class="col-5 inp-row">
135
+ <label for="po-size-width"><?php _e( 'Width:', PO_LANG ); ?></label>
136
+ <input type="text"
137
+ id="po-size-width"
138
+ name="po_size_width"
139
+ class="inp-small"
140
+ value="<?php echo esc_attr( $popup->size['width'] ); ?>"
141
+ placeholder="600px" />
142
+ </div>
143
+ <div class="col-5 inp-row">
144
+ <label for="po-size-height"><?php _e( 'Height:', PO_LANG ); ?></label>
145
+ <input type="text"
146
+ id="po-size-height"
147
+ name="po_size_height"
148
+ class="inp-small"
149
+ value="<?php echo esc_attr( $popup->size['height'] ); ?>"
150
+ placeholder="300px" />
151
+ </div>
152
+ </div>
views/meta-behavior.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Metabox "Behavior"
4
+ *
5
+ * Used in class-popup-admin.php
6
+ * Available variables: $popup
7
+ */
8
+
9
+ ?>
10
+ <div class="wpmui-grid-12">
11
+ <div class="col-12">
12
+ <strong><?php _e( 'When to show the PopUp:', PO_LANG ); ?></strong>
13
+ </div>
14
+ </div>
15
+ <div class="wpmui-grid-12" style="overflow: visible">
16
+ <div class="col-12 inp-row">
17
+ <label>
18
+ <input type="radio"
19
+ name="po_display"
20
+ id="po-display-delay"
21
+ value="delay"
22
+ data-toggle=".opt-display-delay"
23
+ checked="checked" />
24
+ <?php _e( 'Appear after', PO_LANG ); ?>
25
+ </label>
26
+ <span class="opt-display-delay">
27
+ <input type="number"
28
+ min="0"
29
+ max="999"
30
+ maxlength="3"
31
+ name="po_display_data[delay]"
32
+ class="inp-small"
33
+ value="<?php echo esc_attr( $popup->display_data['delay'] ); ?>"
34
+ placeholder="10" />
35
+ <select name="po_display_data[delay_type]">
36
+ <option value="s" <?php selected( $popup->display_data['delay_type'], 's' ); ?>>
37
+ <?php _e( 'Seconds', PO_LANG ); ?>
38
+ </option>
39
+ <option value="m" <?php selected( $popup->display_data['delay_type'], 'm' ); ?>>
40
+ <?php _e( 'Minutes', PO_LANG ); ?>
41
+ </option>
42
+ </select>
43
+ </span>
44
+ </div>
45
+
46
+ <div class="pro-only">
47
+ <div class="col-12 inp-row">
48
+ <label>
49
+ <input type="radio"
50
+ name="po_display"
51
+ id="po-display-scroll"
52
+ value="scroll"
53
+ data-toggle=".opt-display-scroll"
54
+ readonly="readonly" />
55
+ <?php _e( 'Appear after', PO_LANG ); ?>
56
+ </label>
57
+ <span class="opt-display-scroll">
58
+ <input type="number"
59
+ min="0"
60
+ max="9999"
61
+ maxlength="4"
62
+ readonly="readonly"
63
+ class="inp-small"
64
+ value="<?php echo esc_attr( $popup->display_data['scroll'] ); ?>"
65
+ placeholder="25" />
66
+ <select>
67
+ <option value="%" <?php selected( $popup->display_data['scroll_type'], '%' ); ?>>
68
+ <?php _e( '%', PO_LANG ); ?>
69
+ </option>
70
+ <option value="px" <?php selected( $popup->display_data['scroll_type'], 'px' ); ?>>
71
+ <?php _e( 'px', PO_LANG ); ?>
72
+ </option>
73
+ </select>
74
+ </span>
75
+ <?php _e( 'of the page has been scrolled.', PO_LANG ); ?>
76
+ </div>
77
+ <div class="col-12 inp-row">
78
+ <label>
79
+ <input type="radio"
80
+ name="po_display"
81
+ id="po-display-anchor"
82
+ value="anchor"
83
+ data-toggle=".opt-display-anchor"
84
+ readonly="readonly" />
85
+ <?php _e( 'Appear after user scrolled until CSS selector', PO_LANG ); ?>
86
+ </label>
87
+ <span class="opt-display-anchor">
88
+ <input type="text"
89
+ maxlength="50"
90
+ readonly="readonly"
91
+ value="<?php echo esc_attr( $popup->display_data['anchor'] ); ?>"
92
+ placeholder="<?php _e( '.class or #id', PO_LANG ); ?>" />
93
+ </span>
94
+ </div>
95
+ <?php do_action( 'popup-display-behavior', $popup ); ?>
96
+ <div class="pro-note">
97
+ <div style="padding:30px 0 0;">
98
+ <?php printf(
99
+ __( 'Pro feature only. <a href="%1$s" target="_blank">Find out more &raquo;</a>', PO_LANG ),
100
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
101
+ ); ?>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </div>
106
+
107
+ <hr />
108
+
109
+ <div class="wpmui-grid-12">
110
+ <div class="col-12">
111
+ <strong><?php _e( '"Never see this message again" settings:', PO_LANG ); ?></strong>
112
+ </div>
113
+ </div>
114
+ <div class="wpmui-grid-12">
115
+ <div class="col-12 inp-row">
116
+ <label>
117
+ <input type="checkbox"
118
+ name="po_can_hide"
119
+ id="po-can-hide"
120
+ data-toggle=".chk-can-hide"
121
+ data-or="#po-can-hide,#po-close-hides"
122
+ <?php checked( $popup->can_hide ); ?>/>
123
+ <?php _e( 'Add "Never see this message again" link', PO_LANG ); ?>
124
+ </label>
125
+ </div>
126
+ <div class="pro-only">
127
+ <div class="col-12 inp-row">
128
+ <label>
129
+ <input type="checkbox"
130
+ readonly="readonly"
131
+ id="po-close-hides"
132
+ data-toggle=".chk-can-hide"
133
+ data-or="#po-can-hide,#po-close-hides"
134
+ />
135
+ <?php _e( 'Close button acts as "Never see this message again" link', PO_LANG ); ?>
136
+ </label>
137
+ </div>
138
+ <div class="col-12 inp-row chk-can-hide">
139
+ <label for="po-hide-expire">
140
+ <?php _e( 'Expiry time', PO_LANG ); ?>
141
+ <input type="number"
142
+ readonly="readonly"
143
+ id="po-hide-expire"
144
+ class="inp-small"
145
+ value="<?php echo esc_attr( $popup->hide_expire ); ?>"
146
+ placeholder="365" />
147
+ <?php _e( 'days', PO_LANG ); ?>
148
+ <?php _e( '(upon expiry, user will see this PopUp again)', PO_LANG ); ?>
149
+ </label>
150
+ </div>
151
+ <div class="pro-note">
152
+ <div style="padding:30px 0 0;">
153
+ <?php printf(
154
+ __( 'Pro feature only. <a href="%1$s" target="_blank">Find out more &raquo;</a>', PO_LANG ),
155
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
156
+ ); ?>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </div>
161
+
162
+ <hr />
163
+
164
+ <div class="wpmui-grid-12">
165
+ <div class="col-12">
166
+ <strong><?php _e( 'Closing Pop-up conditions', PO_LANG ); ?></strong>
167
+ </div>
168
+ </div>
169
+ <div class="pro-only">
170
+ <div class="wpmui-grid-12">
171
+ <div class="col-12 inp-row">
172
+ <label>
173
+ <input type="checkbox"
174
+ readonly="readonly"
175
+ name="po_overlay_close"
176
+ />
177
+ <?php _e( 'Click on the background does not close PopUp.', PO_LANG ); ?>
178
+ </label>
179
+ </div>
180
+ </div>
181
+ <div class="pro-note">
182
+ <div style="padding:15px 0 0;">
183
+ <?php printf(
184
+ __( 'Pro feature only. <a href="%1$s" target="_blank">Find out more &raquo;</a>', PO_LANG ),
185
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
186
+ ); ?>
187
+ </div>
188
+ </div>
189
+
190
+ </div>
views/meta-content.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Metabox "PopUp Content"
4
+ *
5
+ * Used in class-popup-admin.php
6
+ * Available variables: $popup
7
+ */
8
+
9
+ $has_image = ! empty( $popup->image );
10
+
11
+ ?>
12
+ <div class="content-main">
13
+ <div class="wpmui-grid-12">
14
+ <div class="col-6">
15
+ <label for="po-heading"><h3><?php _e( 'Heading (optional)', PO_LANG ); ?></h3></label>
16
+ </div>
17
+ <div class="col-6">
18
+ <label for="po-subheading"><h3><?php _e( 'Subheading (optional)', PO_LANG ); ?></h3></label>
19
+ </div>
20
+ </div>
21
+ <div class="wpmui-grid-12">
22
+ <div class="col-6">
23
+ <input class="block"
24
+ type="text"
25
+ id="po-heading"
26
+ name="po_heading"
27
+ placeholder="<?php _e( 'Enter your heading here...', PO_LANG ); ?>"
28
+ value="<?php echo esc_attr( $popup->title ); ?>" />
29
+ </div>
30
+ <div class="col-6">
31
+ <input class="block"
32
+ type="text"
33
+ id="po-subheading"
34
+ name="po_subheading"
35
+ placeholder="<?php _e( 'Enter your subheading here...', PO_LANG ); ?>"
36
+ value="<?php echo esc_attr( $popup->subtitle ); ?>" />
37
+ </div>
38
+ </div>
39
+
40
+ <div class="wpmui-grid-12">
41
+ <label for="po_content">
42
+ <h3 class="main-content"><?php _e( 'Main PopUp Content', PO_LANG ); ?></h3>
43
+ </label>
44
+ </div>
45
+ <div>
46
+ <?php
47
+ $args = array(
48
+ 'textarea_rows' => 4,
49
+ 'drag_drop_upload' => true,
50
+ );
51
+ wp_editor( $popup->content, 'po_content', $args );
52
+ ?>
53
+ </div>
54
+
55
+ <div class="wpmui-grid-12">
56
+ <label for="po-cta">
57
+ <h3><?php _e( 'Call To Action Button (optional)', PO_LANG ); ?></h3>
58
+ </label>
59
+ </div>
60
+ <div class="wpmui-grid-12">
61
+ <div class="col-4">
62
+ <input class="block"
63
+ type="text"
64
+ id="po-cta"
65
+ name="po_cta"
66
+ placeholder="<?php _e( 'Button Label', PO_LANG ); ?>"
67
+ value="<?php echo esc_attr( $popup->cta_label ); ?>" />
68
+ </div>
69
+ <div class="col-4">
70
+ <input class="block"
71
+ type="text"
72
+ id="po-cta-link"
73
+ name="po_cta_link"
74
+ placeholder="<?php _e( 'Button Link (http://www.example.com)', PO_LANG ); ?>"
75
+ value="<?php echo esc_attr( $popup->cta_link ); ?>" />
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+
81
+ <div class="content-image">
82
+ <div class="wpmui-grid-12">
83
+ <label>
84
+ <h3><?php _e( 'PopUp Feature Image (optional)', PO_LANG ); ?></h3>
85
+ </label>
86
+ </div>
87
+ <div class="wpmui-grid-12">
88
+ <button class="button add_image"
89
+ type="button"
90
+ title="<?php _e( 'Add featured image to PopUp.', PO_LANG ); ?>"
91
+ data-title="<?php _e( 'PopUp Featured Image', PO_LANG ); ?>"
92
+ data-button="<?php _e( 'Select Image', PO_LANG ); ?>" >
93
+ <i class="add-image-icon dashicons dashicons-format-image"></i>
94
+ <?php _e( 'Add Image', PO_LANG ); ?>
95
+ </button>
96
+
97
+ <input type="hidden"
98
+ name="po_image"
99
+ class="po-image"
100
+ value="<?php echo esc_url( $popup->image ); ?>" />
101
+
102
+ <div class="featured-img <?php if ( $has_image ) : ?>has-image<?php endif; ?>">
103
+ <img src="<?php echo esc_url( $popup->image ); ?>"
104
+ class="img-preview"
105
+ <?php if ( ! $has_image ) : ?>
106
+ style="display: none;"
107
+ <?php endif; ?> />
108
+
109
+ <span class="lbl-empty"
110
+ <?php if ( $has_image ) : ?>
111
+ style="display: none;"
112
+ <?php endif; ?> >
113
+ <?php _e( '(No image selected)', PO_LANG ); ?>
114
+ </span>
115
+ <div class="drop-marker" style="display:none">
116
+ <div class="drop-marker-content" title="<?php _e( 'Drop here', PO_LANG ); ?>">
117
+ </div>
118
+ </div>
119
+
120
+ <a href="#remove-image" class="reset">
121
+ <i class="dashicons dashicons-dismiss"></i>
122
+ <?php _e( 'Remove image', PO_LANG ); ?>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="img-pos"
127
+ <?php if ( ! $has_image ) : ?>
128
+ style="display: none;"
129
+ <?php endif; ?> >
130
+
131
+ <div>
132
+ <label>
133
+ <input type="checkbox"
134
+ name="po_image_no_mobile"
135
+ <?php checked( $popup->image_mobile, false ); ?>>
136
+ <?php _e( 'Hide image for mobile devices', PO_LANG ); ?>
137
+ </label>
138
+ </div>
139
+
140
+ <div>
141
+ <label class="option <?php if ( 'left' == $popup->image_pos ) : ?>selected<?php endif; ?>">
142
+ <input type="radio" name="po_image_pos" value="left" <?php checked( 'left' == $popup->image_pos ); ?> />
143
+ <span class="image left">
144
+ <i class="dashicons dashicons-format-image"></i>
145
+ </span>
146
+ <i class="dashicons dashicons-editor-alignleft"></i>
147
+ </label>
148
+
149
+ <label class="option <?php if ( 'left' != $popup->image_pos ) : ?>selected<?php endif; ?>">
150
+ <input type="radio" name="po_image_pos" value="right" <?php checked( 'left' != $popup->image_pos ); ?> />
151
+ <i class="dashicons dashicons-editor-alignleft"></i>
152
+ <span class="image right">
153
+ <i class="dashicons dashicons-format-image"></i>
154
+ </span>
155
+ </label>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
views/meta-rules.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Metabox "Conditions" (rules)
4
+ *
5
+ * Used in class-popup-admin.php
6
+ * Available variables: $popup
7
+ */
8
+
9
+ ?>
10
+ <div class="wpmui-loading init-loading">
11
+ <div class="wpmui-grid-12">
12
+ <div class="col-all-rules">
13
+ <strong><?php _e( 'Available Conditions', PO_LANG ); ?></strong>
14
+ </div>
15
+ <div class="col-active-rules">
16
+ <strong><?php _e( 'Show this PopUp if the following conditions are met', PO_LANG ); ?></strong>
17
+ </div>
18
+ </div>
19
+ <div class="wpmui-grid-12">
20
+ <div class="col-all-rules">
21
+ <div class="scroller all-rules-box">
22
+ <ul class="all-rules">
23
+ <?php do_action( 'popup-rule-switch', $popup ); ?>
24
+ </ul>
25
+ </div>
26
+ </div>
27
+ <div class="col-active-rules">
28
+ <div class="scroller active-rules-box">
29
+ <ul class="active-rules">
30
+ <?php do_action( 'popup-rule-forms', $popup ); ?>
31
+ </ul>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </div>
views/meta-submitdiv.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Metabox "submitdiv"
4
+ *
5
+ * Used in class-popup-admin.php
6
+ * Available variables: $popup
7
+ */
8
+
9
+ $delete_url = get_delete_post_link( $post->ID );
10
+ $duplicate_url = add_query_arg( 'do', 'duplicate' );
11
+ $warn = ( 0 != IncPopupDatabase::count_active( $post->ID ) );
12
+
13
+ ?>
14
+ <div class="submitbox" id="submitpost">
15
+ <?php /* Save/Deactivate/Preview */ ?>
16
+ <div id="minor-publishing">
17
+ <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
18
+ <div style="display:none;">
19
+ <?php submit_button( __( 'Save', PO_LANG ), 'button', 'save', false ); ?>
20
+ </div>
21
+
22
+ <div id="minor-publishing-actions" class="non-sticky">
23
+ <div class="status"
24
+ <?php if ( $warn ) : ?>
25
+ data-tooltip="<?php _e( 'In the free version you can activate 1 PopUp. When you activate this PopUp then all other PopUps will be deactivated ', PO_LANG ); ?>"
26
+ data-class="status-hint"
27
+ data-pos="left"
28
+ data-width="250"
29
+ <?php endif; ?>
30
+ >
31
+ <div class="status-switch">
32
+ <input type="checkbox"
33
+ name="po_active"
34
+ id="po-status"
35
+ <?php checked( $popup->status, 'active' ); ?>/>
36
+ <label class="status-box" for="po-status">
37
+ <span class="indicator"></span>
38
+ <span class="label-active"><?php _e( 'Status: <strong>Active</strong>', PO_LANG ); ?></span>
39
+ <span class="label-inactive"><?php _e( 'Status: Inactive', PO_LANG ); ?></span>
40
+ </label>
41
+ </div>
42
+ </div>
43
+
44
+ <div class="preview-action">
45
+ <button type="button" class="preview button">
46
+ <i class="dashicons dashicons-visibility"></i>
47
+ <?php _e( 'Preview PopUp', PO_LANG ); ?>
48
+ </button>
49
+ </div>
50
+
51
+ <div class="clear"></div>
52
+ </div>
53
+ </div>
54
+
55
+ <?php /* *** Trash/Save/Activate *** */ ?>
56
+ <div id="major-publishing-actions" class="non-sticky">
57
+ <div class="delete-action">
58
+ <?php if ( current_user_can( 'delete_post', $post->ID ) ) : ?>
59
+ <a class="submitdelete deletion" href="<?php echo esc_url( $delete_url ); ?>">
60
+ <?php _e( 'Move to Trash', PO_LANG ); ?>
61
+ </a>
62
+ <?php endif; ?>
63
+ </div>
64
+
65
+ <div class="publishing-action">
66
+ <span class="spinner"></span>
67
+ <?php if ( ! empty( $popup->id ) ) : ?>
68
+ <a href="<?php echo esc_url( $duplicate_url ); ?>" class="do-duplicate">
69
+ <?php _e( 'Duplicate', PO_LANG ); ?>
70
+ </a>
71
+ <?php endif; ?>
72
+ <button class="button-primary" id="publish" name="po-action" value="save">
73
+ <?php _e( 'Save', PO_LANG ); ?>
74
+ </button>
75
+ </div>
76
+
77
+ <div class="clear"></div>
78
+ </div>
79
+
80
+ <?php /* *** Sticky form: Trash/Preview/Save/Activate *** */ ?>
81
+ <div class="sticky-actions" style="display:none">
82
+ <div class="delete-action">
83
+ <?php if ( current_user_can( 'delete_post', $post->ID ) ) : ?>
84
+ <a class="submitdelete deletion" href="<?php echo esc_url( $delete_url ); ?>">
85
+ <?php _e( 'Move to Trash', PO_LANG ); ?>
86
+ </a>
87
+ <?php endif; ?>
88
+ </div>
89
+
90
+ <div class="publishing-action">
91
+ <button class="button-primary" name="po-action" value="save">
92
+ <?php _e( 'Save', PO_LANG ); ?>
93
+ </button>
94
+ </div>
95
+
96
+ <div class="preview-action">
97
+ <button type="button" class="preview button">
98
+ <i class="dashicons dashicons-visibility"></i>
99
+ <?php _e( 'Preview PopUp', PO_LANG ); ?>
100
+ </button>
101
+ </div>
102
+
103
+ <div class="duplicate-action">
104
+ <span class="spinner"></span>
105
+ <?php if ( ! empty( $popup->id ) ) : ?>
106
+ <a href="<?php echo esc_url( $duplicate_url ); ?>" class="do-duplicate">
107
+ <?php _e( 'Duplicate', PO_LANG ); ?>
108
+ </a>
109
+ <?php endif; ?>
110
+ </div>
111
+
112
+ <div class="clear"></div>
113
+ </div>
114
+ </div>
views/network.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This page is only displayed when
4
+ * 1. PO_GLOBAL is true
5
+ * 2. The site is a Multisite network
6
+ * 3. User is in the Network-Dashboard
7
+ * 4. Any "PopUp" menuitem is opened (Edit PopUp, Create PopUp, ...)
8
+ */
9
+
10
+ switch_to_blog( BLOG_ID_CURRENT_SITE );
11
+ $main_url = admin_url( 'edit.php?post_type=' . IncPopupItem::POST_TYPE );
12
+ $blog_title = get_bloginfo( 'name' );
13
+ restore_current_blog();
14
+
15
+ $dismiss_url = add_query_arg( 'popup_network', 'hide' );
16
+
17
+ ?>
18
+ <style>
19
+ blockquote p {
20
+ font-size: 19px;
21
+ font-style: italic;
22
+ font-weight: 300;
23
+ background: #FAFAFA;
24
+ padding: 10px;
25
+ }
26
+ </style>
27
+ <div id="wpbody-content" tabindex="0">
28
+ <div class="wrap">
29
+ <h2><?php _e( 'Global PopUps', PO_LANG ); ?></h2>
30
+
31
+ <blockquote>
32
+ <p><?php printf(
33
+ __(
34
+ 'Please note:<br />We moved the global PopUp menu items ' .
35
+ 'to the <strong>Main Blog</strong> of your multisite ' .
36
+ 'network!<br />The Main Blog of this network is "%1$s" - ' .
37
+ '<a href="%2$s">Go to the Main Blog now</a>!', PO_LANG
38
+ ),
39
+ $blog_title,
40
+ esc_url( $main_url )
41
+ ); ?></p>
42
+ </blockquote>
43
+
44
+ <div>
45
+ <p><?php _e(
46
+ 'Because the "PopUp" menu items here on the ' .
47
+ '<strong>Network Admin</strong> are not used anymore ' .
48
+ 'you can <strong>hide them</strong> at any time:', PO_LANG
49
+ ); ?>
50
+ </p>
51
+ <p>
52
+ <a href="<?php echo esc_url( $dismiss_url ); ?>" class="button-primary">
53
+ <?php _e( 'Hide the menu items here!', PO_LANG ); ?>
54
+ </a>
55
+ </p>
56
+ </div>
57
+ </div>
58
+ <div class="clear"></div>
59
+ </div>
views/settings.php ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Display the popup settings page.
4
+ */
5
+
6
+ global $shortcode_tags;
7
+
8
+ $loading_methods = array();
9
+
10
+ $loading_methods[] = (object) array(
11
+ 'id' => 'footer',
12
+ 'label' => __( 'Page Footer', PO_LANG ),
13
+ 'info' => __(
14
+ 'Include PopUp as part of your site\'s HTML (no AJAX call).',
15
+ PO_LANG
16
+ ),
17
+ );
18
+
19
+ $loading_methods[] = (object) array(
20
+ 'id' => 'ajax',
21
+ 'label' => __( 'WordPress AJAX', PO_LANG ),
22
+ 'info' => __(
23
+ 'Load PopUp separately from the page via a WordPress AJAX call. ' .
24
+ 'This is the best option if you use caching.',
25
+ PO_LANG
26
+ ),
27
+ );
28
+
29
+ $loading_methods[] = (object) array(
30
+ 'id' => 'front',
31
+ 'label' => __( 'Custom AJAX', PO_LANG ),
32
+ 'info' => __(
33
+ 'Load PopUp separately from the page via a custom front-end AJAX call.',
34
+ PO_LANG
35
+ ),
36
+ );
37
+
38
+ /**
39
+ * Allow addons to register additional loading methods.
40
+ *
41
+ * @var array
42
+ */
43
+ $loading_methods = apply_filters( 'popup-settings-loading-method', $loading_methods );
44
+
45
+ $settings = IncPopupDatabase::get_settings();
46
+ $cur_method = @$settings['loadingmethod'];
47
+
48
+ $form_url = remove_query_arg( array( 'message', 'action', '_wpnonce' ) );
49
+
50
+ // Theme compatibility.
51
+ $theme_compat = IncPopupAddon_HeaderFooter::check();
52
+ $theme_class = $theme_compat->okay ? 'msg-ok' : 'msg-err';
53
+ $shortcodes = array();
54
+ // Add Admin-Shortcodes to the list.
55
+ foreach ( $shortcode_tags as $code => $handler ) {
56
+ @$shortcodes[ $code ] .= 'sc-admin ';
57
+ }
58
+ // Add Front-End Shortcodes to the list.
59
+ foreach ( $theme_compat->shortcodes as $code ) {
60
+ @$shortcodes[ $code ] .= 'sc-front ';
61
+ }
62
+
63
+ $rules = IncPopup::get_rules();
64
+ $rule_headers = array(
65
+ 'name' => 'Name',
66
+ 'desc' => 'Description',
67
+ 'rules' => 'Rules',
68
+ 'limit' => 'Limit',
69
+ );
70
+ $ordered_rules = array();
71
+
72
+ ?>
73
+ <div class="wrap nosubsub">
74
+
75
+ <h2><?php _e( 'PopUp Settings', PO_LANG ); ?></h2>
76
+
77
+ <div id="poststuff" class="metabox-holder m-settings">
78
+ <form method="post" action="<?php echo esc_url( $form_url ); ?>">
79
+
80
+ <input type="hidden" name="action" value="updatesettings" />
81
+
82
+ <?php wp_nonce_field( 'update-popup-settings' ); ?>
83
+
84
+ <div class="wpmui-box static">
85
+ <h3>
86
+ <span><?php _e( 'PopUp Loading Method', PO_LANG ); ?></span>
87
+ </h3>
88
+
89
+ <div class="inside">
90
+ <p><?php _e(
91
+ 'Select how you would like to load PopUp.', PO_LANG
92
+ ); ?></p>
93
+
94
+ <table class="form-table">
95
+ <tbody>
96
+
97
+ <?php /* === LOADING METHOD === */ ?>
98
+ <tr valign="top">
99
+ <th scope="row">
100
+ <?php _e( 'Load PopUp using', PO_LANG ); ?>
101
+ </th>
102
+ <td>
103
+ <select name="po_option[loadingmethod]" id="loadingmethod">
104
+ <?php foreach ( $loading_methods as $item ) : ?>
105
+ <option
106
+ value="<?php echo esc_attr( $item->id ); ?>"
107
+ <?php selected( $cur_method, $item->id ); ?>>
108
+ <?php _e( $item->label, PO_LANG ); ?>
109
+ </option>
110
+ <?php endforeach; ?>
111
+ </select>
112
+
113
+ <ul>
114
+ <?php foreach ( $loading_methods as $item ) : ?>
115
+ <li>
116
+ <?php if ( $cur_method == $item->id ) : ?>
117
+ <strong><i class="dashicons dashicons-yes"
118
+ style="margin-left:-20px">
119
+ </i><?php _e( $item->label, PO_LANG ); ?></strong>:
120
+ <?php else : ?>
121
+ <?php _e( $item->label, PO_LANG ); ?>:
122
+ <?php endif; ?>
123
+ <em><?php echo '' . $item->info; ?>
124
+ </em></li>
125
+ <?php endforeach; ?>
126
+ </ul>
127
+ </td>
128
+ </tr>
129
+ </tbody>
130
+ </table>
131
+ </div>
132
+ </div>
133
+
134
+ <?php if ( 'footer' == $cur_method ) : ?>
135
+ <div class="wpmui-box <?php echo esc_attr( $theme_compat->okay ? 'closed' : '' ); ?>">
136
+ <h3>
137
+ <a href="#" class="toggle" title="<?php _e( 'Click to toggle' ); ?>"><br></a>
138
+ <span><?php _e( 'Theme compatibility', PO_LANG ); ?></span>
139
+ </h3>
140
+
141
+ <div class="inside">
142
+ <?php _e(
143
+ 'Here you can see if your theme is compatible with the ' .
144
+ '"Page Footer" loading method.', PO_LANG
145
+ ); ?>
146
+ <div class="<?php echo esc_attr( $theme_class ); ?>">
147
+ <?php foreach ( $theme_compat->msg as $row ) {
148
+ echo '<p>' . $row . '</p>';
149
+ } ?>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ <?php endif; ?>
154
+
155
+ <div class="wpmui-box closed">
156
+ <h3>
157
+ <a href="#" class="toggle" title="<?php _e( 'Click to toggle' ); ?>"><br></a>
158
+ <span><?php _e( 'Supported Shortcodes', PO_LANG ); ?></span>
159
+ </h3>
160
+
161
+ <div class="inside">
162
+ <?php _e(
163
+ 'You can use all your shortcodes inside the PopUp contents, ' .
164
+ 'however some Plugins or Themes might provide shortcodes that ' .
165
+ 'only work with the loading method "Page Footer".<br /> ' .
166
+ 'This list explains which shortcodes can be used with each ' .
167
+ 'loading method:', PO_LANG
168
+ ); ?>
169
+ <?php if ( IncPopup::use_global() ) : ?>
170
+ <p><em>
171
+ <?php _e(
172
+ 'Important notice for shortcodes in <strong>Global ' .
173
+ 'PopUps</strong>:<br />' .
174
+ 'Shortcodes can be provided by a plugin or theme, so ' .
175
+ 'each blog can have a different list of shortcodes. The ' .
176
+ 'following list is valid for the current blog only!', PO_LANG
177
+ ); ?>
178
+ </em></p>
179
+ <?php endif; ?>
180
+ <table class="widefat tbl-shortcodes load-<?php echo esc_attr( $cur_method ); ?>">
181
+ <thead>
182
+ <tr>
183
+ <th width="40%">
184
+ <div>
185
+ <?php _e( 'Shortcode', PO_LANG ); ?>
186
+ </div>
187
+ </th>
188
+ <th class="flag load-footer">
189
+ <div data-tooltip="<?php _e( 'Loading method \'Page Footer\'', PO_LANG ); ?>">
190
+ <?php _e( 'Page Footer', PO_LANG ); ?>
191
+ </div>
192
+ </th>
193
+ <th class="flag load-ajax load-front">
194
+ <div data-tooltip="<?php _e( 'Loading method \'WordPress AJAX\' and \'Custom AJAX\'', PO_LANG ); ?>">
195
+ <?php _e( 'AJAX', PO_LANG ); ?>
196
+ </div>
197
+ </th>
198
+ <th class="flag">
199
+ <div data-tooltip="<?php _e( 'When opening a PopUp-Preview in the Editor', PO_LANG ); ?>">
200
+ <?php _e( 'Preview', PO_LANG ); ?>
201
+ </div>
202
+ </th>
203
+ </tr>
204
+ </thead>
205
+ <tbody>
206
+ <?php foreach ( $shortcodes as $code => $classes ) : ?>
207
+ <tr class="shortcode <?php echo esc_attr( $classes ); ?>">
208
+ <td><code>[<?php echo esc_html( $code ); ?>]</code></td>
209
+ <td class="flag sc-front load-footer"><i class="icon dashicons"></i></td>
210
+ <td class="flag sc-admin load-ajax load-front"><i class="icon dashicons"></i></td>
211
+ <td class="flag sc-admin"><i class="icon dashicons"></i></td>
212
+ </tr>
213
+ <?php endforeach; ?>
214
+ </tbody>
215
+ </table>
216
+ </div>
217
+ </div>
218
+
219
+ <p class="submit">
220
+ <button class="button-primary">
221
+ <?php _e( 'Save All Changes', PO_LANG ) ?>
222
+ </button>
223
+ </p>
224
+
225
+ <h2><?php _e( 'Available Conditions', PO_LANG ); ?></h2>
226
+
227
+ <?php /* === ACTIVE RULES === */ ?>
228
+ <table class="widefat tbl-addons">
229
+ <?php foreach ( array( 'thead', 'tfoot' ) as $tag ) : ?>
230
+ <<?php echo esc_attr( $tag ); ?>>
231
+ <tr>
232
+ <th class="manage-column column-cb check-column" id="cb" scope="col">
233
+ <input type="checkbox" />
234
+ </th>
235
+ <th class="manage-column column-name" scope="col">
236
+ <?php _e( 'Name', PO_LANG ); ?>
237
+ </th>
238
+ <th class="manage-column column-items" scope="col">
239
+ <?php _e( 'Activated Rules', PO_LANG ); ?>
240
+ </th>
241
+ </tr>
242
+ </<?php echo esc_attr( $tag ); ?>>
243
+ <?php endforeach; ?>
244
+
245
+ <?php foreach ( $rules as $rule ) {
246
+ $data = get_file_data(
247
+ PO_INC_DIR . 'rules/' . $rule,
248
+ $rule_headers,
249
+ 'popup-rule'
250
+ );
251
+ $is_active = ( in_array( $rule, $settings['rules'] ) );
252
+ if ( empty( $data['name'] ) ) { continue; }
253
+ $data['limit'] = explode( ',', @$data['limit'] );
254
+ $data['limit'] = array_map( 'trim', $data['limit'] );
255
+
256
+ $name = __( trim( $data['name'] ), PO_LANG );
257
+
258
+ $ordered_rules[ $name ] = $data;
259
+ $ordered_rules[ $name ]['key'] = $rule;
260
+ $ordered_rules[ $name ]['name'] = $name;
261
+ $ordered_rules[ $name ]['active'] = $is_active;
262
+ $ordered_rules[ $name ]['desc'] = __( trim( $data['desc'] ), PO_LANG );
263
+
264
+ if ( PO_VERSION != 'pro' && in_array( 'pro', $data['limit'] ) ) {
265
+ $ordered_rules[ $name ]['disabled'] = sprintf(
266
+ __( 'Available in the <a href="%s" target="_blank">PRO version</a>', PO_LANG ),
267
+ 'http://premium.wpmudev.org/project/the-pop-over-plugin/'
268
+ );
269
+ } else if ( IncPopup::use_global() && in_array( 'no global', $data['limit'] ) ) {
270
+ $ordered_rules[ $name ]['disabled'] = __( 'Not available for global PopUps', PO_LANG );
271
+ } else if ( ! IncPopup::use_global() && in_array( 'global', $data['limit'] ) ) {
272
+ $ordered_rules[ $name ]['disabled'] = true;
273
+ } else {
274
+ $ordered_rules[ $name ]['disabled'] = false;
275
+ }
276
+ } ?>
277
+ <?php ksort( $ordered_rules ); ?>
278
+
279
+ <?php foreach ( $ordered_rules as $data ) {
280
+ // Ignore Addons that have no name.
281
+ $data['rules'] = explode( ',', $data['rules'] );
282
+ $rule_id = 'po-rule-' . sanitize_html_class( $data['key'] );
283
+ if ( true === $data['disabled'] ) { continue; }
284
+ ?>
285
+ <tr valign="top" class="<?php echo esc_attr( $data['disabled'] ? 'locked' : '' ); ?>">
286
+ <th class="check-column" scope="row">
287
+ <?php if ( false == $data['disabled'] ) : ?>
288
+ <input type="checkbox"
289
+ id="<?php echo esc_attr( $rule_id ); ?>"
290
+ name="po_option[rules][<?php echo esc_attr( $data['key'] ); ?>]"
291
+ <?php checked( $data['active'] ); ?>
292
+ />
293
+ <?php endif; ?>
294
+ </th>
295
+ <td class="column-name">
296
+ <label for="<?php echo esc_attr( $rule_id ); ?>">
297
+ <strong><?php echo esc_html( $data['name'] ); ?></strong>
298
+ </label>
299
+ <div><em><?php echo '' . $data['desc']; ?></em></div>
300
+ <?php if ( $data['disabled'] ) : ?>
301
+ <div class="locked-msg">
302
+ <?php echo '' . $data['disabled']; ?>
303
+ </div>
304
+ <?php endif; ?>
305
+ </td>
306
+ <td class="column-items">
307
+ <?php foreach ( $data['rules'] as $rule_name ) : ?>
308
+ <?php $rule_name = trim( $rule_name ); ?>
309
+ <?php if ( empty( $rule_name ) ) { continue; } ?>
310
+ <code><?php _e( trim( $rule_name ), PO_LANG ); ?></code><br />
311
+ <?php endforeach; ?>
312
+ </td>
313
+ </tr>
314
+ <?php } ?>
315
+ </table>
316
+
317
+ <p class="submit">
318
+ <button class="button-primary">
319
+ <?php _e( 'Save All Changes', PO_LANG ) ?>
320
+ </button>
321
+ </p>
322
+
323
+ </form>
324
+ </div>
325
+
326
+ </div> <!-- wrap -->