Changeset 1574482
- Timestamp:
- 01/14/2017 06:45:43 AM (9 years ago)
- Location:
- simple-popup-content
- Files:
-
- 5 edited
- 14 copied
-
assets/screenshot-1.png (modified) (previous)
-
tags/1.0 (copied) (copied from simple-popup-content/trunk)
-
tags/1.0/README.txt (copied) (copied from simple-popup-content/trunk/README.txt)
-
tags/1.0/css (copied) (copied from simple-popup-content/trunk/css)
-
tags/1.0/gateway.php (copied) (copied from simple-popup-content/trunk/gateway.php)
-
tags/1.0/js (copied) (copied from simple-popup-content/trunk/js)
-
tags/1.0/lib (copied) (copied from simple-popup-content/trunk/lib)
-
tags/1.0/simple-popup-content.php (copied) (copied from simple-popup-content/trunk/simple-popup-content.php) (1 diff)
-
tags/1.2 (copied) (copied from simple-popup-content/trunk)
-
tags/1.2/README.txt (copied) (copied from simple-popup-content/trunk/README.txt) (3 diffs)
-
tags/1.2/css (copied) (copied from simple-popup-content/trunk/css)
-
tags/1.2/gateway.php (copied) (copied from simple-popup-content/trunk/gateway.php) (1 diff)
-
tags/1.2/js (copied) (copied from simple-popup-content/trunk/js)
-
tags/1.2/js/simple-popup-content.js (modified) (4 diffs)
-
tags/1.2/lib (copied) (copied from simple-popup-content/trunk/lib)
-
tags/1.2/simple-popup-content.php (copied) (copied from simple-popup-content/trunk/simple-popup-content.php) (2 diffs)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/js/simple-popup-content.js (modified) (4 diffs)
-
trunk/simple-popup-content.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-popup-content/tags/1.0/simple-popup-content.php
r1555855 r1574482 1 1 <?php 2 2 /* 3 Plugin Name: Popup Page3 Plugin Name: Simple Popup Content 4 4 Plugin URI: https://richiedmedia.com 5 5 Description: Create a popup page. -
simple-popup-content/tags/1.2/README.txt
r1555865 r1574482 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 Create a simple popup and have it popup on any page you want .10 Create a simple popup and have it popup on any page you want using a shortcode. 11 11 12 12 == Description == 13 13 14 Create a simple Popup . Put whatever you want in it. Whatever you put in a page or post can be put into the popup. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup.14 Create a simple Popup, and put many different kinds of content in it: pictures, text, and even shortcode! The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup. Please note: <strong>not all shortcodes can execute in the popup</strong>. Gravity Forms shortcodes will work, but Ninja Forms shortcode will not. Place content in the popups at your own risk! 15 15 16 16 == Installation == … … 20 20 <li>Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly (don't forget to zip the plugin folder before uploading the plugin using this method!).</li> 21 21 <li>Activate the plugin through the 'Plugins' screen in WordPress</li> 22 <li>Use the Settings -> Webpage Popup screen to add content to your popup page.</li> 23 <li>Specify where you want the popup to appear.</li> 22 <li>Add a Popup in the WordPress Dashboard area menu under Simple Popups -> Add New Popup Item</li> 23 <li>Add content to the popup</li> 24 <li>Copy the popup's shortcode and paste it at the bottom of the page or post where you want it to appear.</li> 24 25 </ul> 25 26 … … 29 30 = What can this plugin do? = 30 31 31 Create a normal WordPress page/post and have it popup on any page you want. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup.32 Create a popup and have it popup on any page you want by placing its shortcode on that page. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup. 32 33 33 34 == Screenshots == 34 35 35 1. Back end settings for Simple Popup Content. Just add content to the content editor and specify which page you want it to appear on.36 1. Back end creator for the popups. The back end creator uses the same WordPress editor that you're familiar with! Just add content to the content editor, publish the popup, copy the shortcode, and paste it at the bottom of any page or post where you want it to appear. 36 37 2. Appearance of Simple Popup Content in action. 37 38 38 39 == Changelog == 39 40 40 = 1.0 = 41 * 41 = [1.2] 2017-01-14 = 42 43 * 1.2 is a "major" update. It is now possible to create multiple popups. Also, in order to display a popup on a post or page, you must copy its shortcode and paste it at the bottom of the post or page where you want it to appear. 44 45 = [1.0] 42 46 43 47 == Upgrade Notice == -
simple-popup-content/tags/1.2/gateway.php
r1555855 r1574482 1 <?php2 foreach (glob(dirname(__FILE__) . '/lib/classes/*.php') as $classfilename) {3 include_once $classfilename;4 }5 6 $DRM_SPC_SimplePopupContent = new DRM_SPC_Simple_Popup_Content();7 8 class DRM_SPC_Simple_Popup_Content {9 private static $cache = array();10 11 private static $pluginBasename;12 13 private static $pluginUrl;14 15 public function __construct()16 {17 self::$pluginBasename = dirname( plugin_basename( __FILE__ ) );18 self::$pluginUrl = plugin_dir_url(__FILE__);19 }20 21 22 public static function manageScripts()23 {24 if (!isset(self::$cache['manageScripts'])) {25 self::$cache['manageScripts'] = new DRM_SPC_ManageScripts(self::$pluginUrl);26 }27 return self::$cache['manageScripts'];28 }29 30 public static function ajaxFunctions()31 {32 if (!isset(self::$cache['ajaxFunctions'])) {33 self::$cache['ajaxFunctions'] = new DRM_SPC_AjaxFunctions();34 }35 return self::$cache['ajaxFunctions'];36 }37 38 public static function mySettingsPage()39 {40 if (!isset(self::$cache['mySettingsPage'])) {41 self::$cache['mySettingsPage'] = new DRM_SPC_MySettingsPage();42 }43 return self::$cache['mySettingsPage'];44 }45 46 } -
simple-popup-content/tags/1.2/js/simple-popup-content.js
r1555855 r1574482 25 25 |*| 26 26 \*/ 27 28 27 var docCookies = { 29 28 getItem: function (sKey) { … … 71 70 72 71 72 var popup_cookie_name = 'disable_popup_' + spc_ajax.popup_post_id; 73 73 74 if (docCookies.hasItem( "disable_popup")) {74 if (docCookies.hasItem(popup_cookie_name)) { 75 75 return; 76 76 } … … 84 84 data_for_user['action'] = 'return_simple_popup_content_results'; 85 85 data_for_user['tag'] = 'get_content'; 86 data_for_user['popup_post_id'] = spc_ajax.popup_post_id; 86 87 87 88 jQuery.ajax({ … … 99 100 ], 100 101 afterOpen: function() { 102 var popup_cookie_name = 'disable_popup_' + spc_ajax.popup_post_id; 101 103 // Send request for do not show session 102 104 jQuery("#disable_popup").change(function(){ 103 setCookie( 'disable_popup',jQuery(this).prop('checked') );105 setCookie( jQuery(this).prop('checked') ); 104 106 }); 105 107 106 function setCookie( tag, param){107 if ( param) {108 docCookies.setItem( "disable_popup", "Popup Disabled", '"Wed, 19 Feb 2127 01:04:55 EST"', '/', null, false);108 function setCookie( checked ){ 109 if (checked) { 110 docCookies.setItem(popup_cookie_name, "Popup Disabled", '"Wed, 19 Feb 2127 01:04:55 EST"', '/', null, false); 109 111 } else { 110 docCookies.removeItem( "disable_popup", "/", null);112 docCookies.removeItem(popup_cookie_name, "/", null); 111 113 } 112 114 } -
simple-popup-content/tags/1.2/simple-popup-content.php
r1555855 r1574482 1 1 <?php 2 2 /* 3 Plugin Name: Popup Page3 Plugin Name: Simple Popup Content 4 4 Plugin URI: https://richiedmedia.com 5 Description: Create a popup page.6 Version: 1. 05 Description: Create a popup and display it anywhere using a shortcode. 6 Version: 1.2 7 7 Author: David Richied 8 8 Author URI: https://richiedmedia.com … … 13 13 14 14 15 require_once 'gateway.php'; 15 16 require_once 'lib/Richied/Main.php'; 17 18 //Register the custom post type 19 add_action('init', array(Richied__Main::registerEntities(), 'registerPostTypes')); 20 21 add_action('wp_enqueue_scripts', array(Richied__Main::manageScripts(), 'enqueue_simple_popup_content')); 22 23 // Setup Shortcodes 24 add_action( 'plugins_loaded', array( Richied__Main::addShortcode(), 'hook' ) ); 16 25 17 26 18 add_action('wp_enqueue_scripts', array(DRM_SPC_Simple_Popup_Content::manageScripts(), 'enqueue_simple_popup_content'));19 20 27 if (is_admin()) { 21 add_action( 'admin_menu', array( DRM_SPC_Simple_Popup_Content::mySettingsPage(), 'add_plugin_page' ) ); 22 add_action( 'admin_init', array( DRM_SPC_Simple_Popup_Content::mySettingsPage(), 'page_init' ) ); 28 add_action('admin_menu', array(Richied__Main::mySettingsPage(), 'addMenuEntry')); 23 29 } 24 30 25 add_action('wp_ajax_return_simple_popup_content_results', array( DRM_SPC_Simple_Popup_Content::ajaxFunctions(), 'returnSearchResults'));26 add_action('wp_ajax_nopriv_return_simple_popup_content_results', array( DRM_SPC_Simple_Popup_Content::ajaxFunctions(), 'returnSearchResults'));31 add_action('wp_ajax_return_simple_popup_content_results', array(Richied__Main::ajaxFunctions(), 'returnSearchResults')); 32 add_action('wp_ajax_nopriv_return_simple_popup_content_results', array(Richied__Main::ajaxFunctions(), 'returnSearchResults')); -
simple-popup-content/trunk/README.txt
r1555865 r1574482 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 Create a simple popup and have it popup on any page you want .10 Create a simple popup and have it popup on any page you want using a shortcode. 11 11 12 12 == Description == 13 13 14 Create a simple Popup . Put whatever you want in it. Whatever you put in a page or post can be put into the popup. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup.14 Create a simple Popup, and put many different kinds of content in it: pictures, text, and even shortcode! The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup. Please note: <strong>not all shortcodes can execute in the popup</strong>. Gravity Forms shortcodes will work, but Ninja Forms shortcode will not. Place content in the popups at your own risk! 15 15 16 16 == Installation == … … 20 20 <li>Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly (don't forget to zip the plugin folder before uploading the plugin using this method!).</li> 21 21 <li>Activate the plugin through the 'Plugins' screen in WordPress</li> 22 <li>Use the Settings -> Webpage Popup screen to add content to your popup page.</li> 23 <li>Specify where you want the popup to appear.</li> 22 <li>Add a Popup in the WordPress Dashboard area menu under Simple Popups -> Add New Popup Item</li> 23 <li>Add content to the popup</li> 24 <li>Copy the popup's shortcode and paste it at the bottom of the page or post where you want it to appear.</li> 24 25 </ul> 25 26 … … 29 30 = What can this plugin do? = 30 31 31 Create a normal WordPress page/post and have it popup on any page you want. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup.32 Create a popup and have it popup on any page you want by placing its shortcode on that page. The possibilities are endless. When someone visits the page that you want the popup to appear on, they will see the popup. 32 33 33 34 == Screenshots == 34 35 35 1. Back end settings for Simple Popup Content. Just add content to the content editor and specify which page you want it to appear on.36 1. Back end creator for the popups. The back end creator uses the same WordPress editor that you're familiar with! Just add content to the content editor, publish the popup, copy the shortcode, and paste it at the bottom of any page or post where you want it to appear. 36 37 2. Appearance of Simple Popup Content in action. 37 38 38 39 == Changelog == 39 40 40 = 1.0 = 41 * 41 = [1.2] 2017-01-14 = 42 43 * 1.2 is a "major" update. It is now possible to create multiple popups. Also, in order to display a popup on a post or page, you must copy its shortcode and paste it at the bottom of the post or page where you want it to appear. 44 45 = [1.0] 42 46 43 47 == Upgrade Notice == -
simple-popup-content/trunk/js/simple-popup-content.js
r1555855 r1574482 25 25 |*| 26 26 \*/ 27 28 27 var docCookies = { 29 28 getItem: function (sKey) { … … 71 70 72 71 72 var popup_cookie_name = 'disable_popup_' + spc_ajax.popup_post_id; 73 73 74 if (docCookies.hasItem( "disable_popup")) {74 if (docCookies.hasItem(popup_cookie_name)) { 75 75 return; 76 76 } … … 84 84 data_for_user['action'] = 'return_simple_popup_content_results'; 85 85 data_for_user['tag'] = 'get_content'; 86 data_for_user['popup_post_id'] = spc_ajax.popup_post_id; 86 87 87 88 jQuery.ajax({ … … 99 100 ], 100 101 afterOpen: function() { 102 var popup_cookie_name = 'disable_popup_' + spc_ajax.popup_post_id; 101 103 // Send request for do not show session 102 104 jQuery("#disable_popup").change(function(){ 103 setCookie( 'disable_popup',jQuery(this).prop('checked') );105 setCookie( jQuery(this).prop('checked') ); 104 106 }); 105 107 106 function setCookie( tag, param){107 if ( param) {108 docCookies.setItem( "disable_popup", "Popup Disabled", '"Wed, 19 Feb 2127 01:04:55 EST"', '/', null, false);108 function setCookie( checked ){ 109 if (checked) { 110 docCookies.setItem(popup_cookie_name, "Popup Disabled", '"Wed, 19 Feb 2127 01:04:55 EST"', '/', null, false); 109 111 } else { 110 docCookies.removeItem( "disable_popup", "/", null);112 docCookies.removeItem(popup_cookie_name, "/", null); 111 113 } 112 114 } -
simple-popup-content/trunk/simple-popup-content.php
r1555855 r1574482 1 1 <?php 2 2 /* 3 Plugin Name: Popup Page3 Plugin Name: Simple Popup Content 4 4 Plugin URI: https://richiedmedia.com 5 Description: Create a popup page.6 Version: 1. 05 Description: Create a popup and display it anywhere using a shortcode. 6 Version: 1.2 7 7 Author: David Richied 8 8 Author URI: https://richiedmedia.com … … 13 13 14 14 15 require_once 'gateway.php'; 15 16 require_once 'lib/Richied/Main.php'; 17 18 //Register the custom post type 19 add_action('init', array(Richied__Main::registerEntities(), 'registerPostTypes')); 20 21 add_action('wp_enqueue_scripts', array(Richied__Main::manageScripts(), 'enqueue_simple_popup_content')); 22 23 // Setup Shortcodes 24 add_action( 'plugins_loaded', array( Richied__Main::addShortcode(), 'hook' ) ); 16 25 17 26 18 add_action('wp_enqueue_scripts', array(DRM_SPC_Simple_Popup_Content::manageScripts(), 'enqueue_simple_popup_content'));19 20 27 if (is_admin()) { 21 add_action( 'admin_menu', array( DRM_SPC_Simple_Popup_Content::mySettingsPage(), 'add_plugin_page' ) ); 22 add_action( 'admin_init', array( DRM_SPC_Simple_Popup_Content::mySettingsPage(), 'page_init' ) ); 28 add_action('admin_menu', array(Richied__Main::mySettingsPage(), 'addMenuEntry')); 23 29 } 24 30 25 add_action('wp_ajax_return_simple_popup_content_results', array( DRM_SPC_Simple_Popup_Content::ajaxFunctions(), 'returnSearchResults'));26 add_action('wp_ajax_nopriv_return_simple_popup_content_results', array( DRM_SPC_Simple_Popup_Content::ajaxFunctions(), 'returnSearchResults'));31 add_action('wp_ajax_return_simple_popup_content_results', array(Richied__Main::ajaxFunctions(), 'returnSearchResults')); 32 add_action('wp_ajax_nopriv_return_simple_popup_content_results', array(Richied__Main::ajaxFunctions(), 'returnSearchResults'));
Note: See TracChangeset
for help on using the changeset viewer.