Changeset 881987
- Timestamp:
- 03/25/2014 10:04:32 PM (12 years ago)
- Location:
- optin-forms
- Files:
-
- 89 added
- 3 edited
-
tags/1.1.1 (added)
-
tags/1.1.1/css (added)
-
tags/1.1.1/css/optinforms-admin.css (added)
-
tags/1.1.1/css/optinforms.css (added)
-
tags/1.1.1/images (added)
-
tags/1.1.1/images/bullet-toggle.png (added)
-
tags/1.1.1/images/close.png (added)
-
tags/1.1.1/images/form3-border-top.gif (added)
-
tags/1.1.1/images/icon-check.png (added)
-
tags/1.1.1/images/icon-email-01.png (added)
-
tags/1.1.1/images/icon-user-01.png (added)
-
tags/1.1.1/images/icon.png (added)
-
tags/1.1.1/images/logo.png (added)
-
tags/1.1.1/images/slider-next.png (added)
-
tags/1.1.1/images/slider-previous.png (added)
-
tags/1.1.1/images/support-aweber-001.png (added)
-
tags/1.1.1/images/support-aweber-002.png (added)
-
tags/1.1.1/images/support-aweber-003.png (added)
-
tags/1.1.1/images/support-aweber-004.png (added)
-
tags/1.1.1/images/support-getresponse-001.png (added)
-
tags/1.1.1/images/support-getresponse-002.png (added)
-
tags/1.1.1/images/support-getresponse-003.png (added)
-
tags/1.1.1/images/support-getresponse-005.png (added)
-
tags/1.1.1/images/support-getresponse-006.png (added)
-
tags/1.1.1/images/support-icontact-001.png (added)
-
tags/1.1.1/images/support-icontact-002.png (added)
-
tags/1.1.1/images/support-icontact-003.png (added)
-
tags/1.1.1/images/support-icontact-004.png (added)
-
tags/1.1.1/images/support-icontact-005.png (added)
-
tags/1.1.1/images/support-icontact-006.png (added)
-
tags/1.1.1/images/support-icontact-007.png (added)
-
tags/1.1.1/images/support-icontact-008.png (added)
-
tags/1.1.1/images/support-icontact-009.png (added)
-
tags/1.1.1/images/support-interspire-001.png (added)
-
tags/1.1.1/images/support-interspire-002.png (added)
-
tags/1.1.1/images/support-interspire-003.png (added)
-
tags/1.1.1/images/support-interspire-004.png (added)
-
tags/1.1.1/images/support-interspire-005.png (added)
-
tags/1.1.1/images/support-interspire-006.png (added)
-
tags/1.1.1/images/support-interspire-007.png (added)
-
tags/1.1.1/images/support-interspire-008.png (added)
-
tags/1.1.1/images/support-interspire-009.png (added)
-
tags/1.1.1/images/support-interspire-010.png (added)
-
tags/1.1.1/images/support-interspire-011.png (added)
-
tags/1.1.1/images/support-madmimi-001.png (added)
-
tags/1.1.1/images/support-madmimi-002.png (added)
-
tags/1.1.1/images/support-madmimi-003.png (added)
-
tags/1.1.1/images/support-madmimi-004.png (added)
-
tags/1.1.1/images/support-madmimi-005.png (added)
-
tags/1.1.1/images/support-madmimi-006.png (added)
-
tags/1.1.1/images/support-madmimi-007.png (added)
-
tags/1.1.1/images/support-mailchimp-001.png (added)
-
tags/1.1.1/images/support-mailchimp-002.png (added)
-
tags/1.1.1/images/support-mailchimp-003.png (added)
-
tags/1.1.1/images/support-mailchimp-004.png (added)
-
tags/1.1.1/images/support-mailchimp-005.png (added)
-
tags/1.1.1/images/support-mailchimp-006.png (added)
-
tags/1.1.1/includes (added)
-
tags/1.1.1/includes/functions-form-1.php (added)
-
tags/1.1.1/includes/functions-form-2.php (added)
-
tags/1.1.1/includes/functions-form-3.php (added)
-
tags/1.1.1/includes/functions-form-4.php (added)
-
tags/1.1.1/includes/functions-form-5.php (added)
-
tags/1.1.1/includes/functions-forms.php (added)
-
tags/1.1.1/includes/functions.php (added)
-
tags/1.1.1/includes/options-email-solution.php (added)
-
tags/1.1.1/includes/options-form-1.php (added)
-
tags/1.1.1/includes/options-form-2.php (added)
-
tags/1.1.1/includes/options-form-3.php (added)
-
tags/1.1.1/includes/options-form-4.php (added)
-
tags/1.1.1/includes/options-form-5.php (added)
-
tags/1.1.1/includes/options-form-placement.php (added)
-
tags/1.1.1/includes/preview-form-1.php (added)
-
tags/1.1.1/includes/preview-form-2.php (added)
-
tags/1.1.1/includes/preview-form-3.php (added)
-
tags/1.1.1/includes/preview-form-4.php (added)
-
tags/1.1.1/includes/preview-form-5.php (added)
-
tags/1.1.1/includes/register-settings.php (added)
-
tags/1.1.1/includes/sidebar.php (added)
-
tags/1.1.1/js (added)
-
tags/1.1.1/js/custom.js (added)
-
tags/1.1.1/js/optinforms-color.js (added)
-
tags/1.1.1/js/placeholder.js (added)
-
tags/1.1.1/js/slider-control.js (added)
-
tags/1.1.1/js/tabcontent.js (added)
-
tags/1.1.1/js/tinybox.js (added)
-
tags/1.1.1/languages (added)
-
tags/1.1.1/optin-forms.php (added)
-
tags/1.1.1/readme.txt (added)
-
trunk/includes/functions-forms.php (modified) (8 diffs)
-
trunk/optin-forms.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
optin-forms/trunk/includes/functions-forms.php
r877905 r881987 1 1 <?php 2 3 // Get excluded posts and create an array 4 function optinforms_get_excluded_posts() { 5 global $optinforms_form_exclude_posts; 6 if(empty($optinforms_form_exclude_posts)) { 7 $optinforms_get_excluded_posts = '0'; 8 } 9 if(!is_string($optinforms_form_exclude_posts)) { 10 $optinforms_get_excluded_posts = '0'; 11 } 12 else { 13 $optinforms_get_excluded_posts = explode(',', $optinforms_form_exclude_posts); 14 } 15 return $optinforms_get_excluded_posts; 16 } 17 18 // Get excluded pages and create an array 19 function optinforms_get_excluded_pages() { 20 global $optinforms_form_exclude_pages; 21 if(empty($optinforms_form_exclude_pages)) { 22 $optinforms_get_excluded_pages = '0'; 23 } 24 if(!is_string($optinforms_form_exclude_pages)) { 25 $optinforms_get_excluded_pages = '0'; 26 } 27 else { 28 $optinforms_get_excluded_pages = explode(',', $optinforms_form_exclude_pages); 29 } 30 return $optinforms_get_excluded_pages; 31 } 2 32 3 33 // Insert form on post, after first paragraph … … 6 36 function optinform_insert_form_first_paragraph_post($content) { 7 37 global $optinforms_form_placement_post, $optinforms_form_exclude_posts; 38 $optinforms_get_excluded_posts = optinforms_get_excluded_posts(); // THIS ONE IS NEW !!! 8 39 if($optinforms_form_placement_post == '1'){ 9 40 $ad_code = optinforms_create_form(); 10 $optinforms_form_exclude_posts = explode(',', $optinforms_form_exclude_posts); 11 if(is_single()) { 12 if(is_single($optinforms_form_exclude_posts)) { 41 if(empty($optinforms_form_exclude_posts) && is_single()) { 42 return optinform_insert_form_after_paragraph($ad_code, 1, $content); 43 } 44 elseif (!empty($optinforms_form_exclude_posts) && is_single()) { 45 if(is_single($optinforms_get_excluded_posts)) { 13 46 // do nothing 14 47 } … … 28 61 29 62 function optinform_insert_form_first_paragraph_page($content) { 30 global $optinforms_form_placement_page, $optinforms_form_exclude_pages; 63 global $optinforms_form_placement_page; 64 $optinforms_get_excluded_pages = optinforms_get_excluded_pages(); // THIS ONE IS NEW !!! 31 65 if($optinforms_form_placement_page == '1'){ 32 66 $ad_code = optinforms_create_form(); 33 $optinforms_form_exclude_pages = explode(',', $optinforms_form_exclude_pages);34 67 if(is_page()) { 35 if(is_page($optinforms_ form_exclude_pages)) {68 if(is_page($optinforms_get_excluded_pages)) { 36 69 // do nothing 37 70 } … … 51 84 52 85 function optinform_insert_form_second_paragraph_post($content) { 53 global $optinforms_form_placement_post, $optinforms_form_exclude_posts; 86 global $optinforms_form_placement_post; 87 $optinforms_get_excluded_posts = optinforms_get_excluded_posts(); // THIS ONE IS NEW !!! 54 88 if($optinforms_form_placement_post == '2'){ 55 89 $ad_code = optinforms_create_form(); 56 $optinforms_form_exclude_posts = explode(',', $optinforms_form_exclude_posts);57 90 if(is_single()) { 58 if(is_single($optinforms_ form_exclude_posts)) {91 if(is_single($optinforms_get_excluded_posts)) { 59 92 // do nothing 60 93 } … … 74 107 75 108 function optinform_insert_form_second_paragraph_page($content) { 76 global $optinforms_form_placement_page, $optinforms_form_exclude_pages; 109 global $optinforms_form_placement_page; 110 $optinforms_get_excluded_pages = optinforms_get_excluded_pages(); // THIS ONE IS NEW !!! 77 111 if($optinforms_form_placement_page == '2'){ 78 112 $ad_code = optinforms_create_form(); 79 $optinforms_form_exclude_pages = explode(',', $optinforms_form_exclude_pages);80 113 if(is_page()) { 81 if(is_page($optinforms_ form_exclude_pages)) {114 if(is_page($optinforms_get_excluded_pages)) { 82 115 // do nothing 83 116 } … … 113 146 function optinforms_insert_form_after_post($content) { 114 147 global $optinforms_form_placement_post, $optinforms_form_exclude_posts; 148 $optinforms_get_excluded_posts = optinforms_get_excluded_posts(); // THIS ONE IS NEW !!! 115 149 if($optinforms_form_placement_post == '3' || empty($optinforms_form_placement_post)) { 116 $optinforms_form_exclude_posts = explode(',', $optinforms_form_exclude_posts); 117 if(is_single()) { 118 if(is_single($optinforms_form_exclude_posts)) { 150 151 if(empty($optinforms_form_exclude_posts) && is_single()) { 152 $content .= optinforms_create_form(); 153 } 154 elseif (!empty($optinforms_form_exclude_posts) && is_single()) { 155 if(is_single($optinforms_get_excluded_posts)) { 119 156 // do nothing 120 157 } … … 123 160 } 124 161 } 162 125 163 } 126 164 return $content; … … 132 170 function optinforms_insert_form_after_page($content) { 133 171 global $optinforms_form_placement_page, $optinforms_form_exclude_pages; 172 $optinforms_get_excluded_pages = optinforms_get_excluded_pages(); // THIS ONE IS NEW !!! 134 173 if($optinforms_form_placement_page == '3' || empty($optinforms_form_placement_page)) { 135 $optinforms_form_exclude_pages = explode(',', $optinforms_form_exclude_pages);136 174 if(is_page()) { 137 if(is_page($optinforms_ form_exclude_pages)) {175 if(is_page($optinforms_get_excluded_pages)) { 138 176 // do nothing 139 177 } -
optin-forms/trunk/optin-forms.php
r877905 r881987 5 5 Description: Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click. 6 6 Author: Codeleon 7 Version: 1.1 7 Version: 1.1.1 8 8 Author URI: http://www.codeleon.com 9 License: Free10 9 Text Domain: optinforms 11 10 Domain Path: /languages/ 11 License: 12 Copyright 2014 codeleon.com 13 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License, version 2, as 16 published by the Free Software Foundation. 17 18 This program is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with this program; if not, write to the Free Software 25 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 12 26 */ 13 27 … … 92 106 <div id="icon-optinforms" class="icon32"> 93 107 </div><!--icon-32--> 94 95 108 <h2 class="title"><?php echo optinforms_menu_tabs(); ?></h2> 96 109 </div><!--wrap--> -
optin-forms/trunk/readme.txt
r877905 r881987 4 4 Requires at least: 3.2 5 5 Tested up to: 3.8.1 6 Stable tag: 1.1 6 Stable tag: 1.1.1 7 7 8 8 Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click. … … 49 49 == Changelog == 50 50 51 = 1.1.1 = 52 * Fixed exclude function. 53 51 54 = 1.1 = 52 55 * Added exclude options. … … 61 64 == Upgrade Notice == 62 65 66 = 1.1.1 = 67 Fixed exclude function that caused warnings on certain installations. 68 63 69 = 1.1 = 64 70 New display options, exclude your optin form on specific posts and pages, and add your form with a shortcode!
Note: See TracChangeset
for help on using the changeset viewer.