Changeset 568404
- Timestamp:
- 07/06/2012 06:50:28 PM (14 years ago)
- Location:
- navayan-subscribe/trunk
- Files:
-
- 2 edited
-
ny-subscribe.php (modified) (21 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
navayan-subscribe/trunk/ny-subscribe.php
r568140 r568404 3 3 Plugin Name: Navayan Subscribe 4 4 Description: <strong>Navayan Subscribe</strong> allows your website/blog visitor to easily and quickly register to your website/blog using email, name and additional field. Send subscribe notification to admin and new post notification to subscribers. 5 Version: 1.1.7 5 Version: 1.1.7.1 6 6 Usage: Paste this single line code within PHP tag in your template: if ( function_exists('navayan_subscribe') ){ echo navayan_subscribe(); } or put shortcode [navayan_subscribe] in post/page 7 7 Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=amolnw2778@gmail.com&item_name=NavayanSubscribe … … 112 112 113 113 //if (has_filter('publish_post') ){ 114 $a ction_based_post= array(114 $ar_publish = array( 115 115 array( 116 116 'slug' => 'ny_subscribe_field_notify_published_post', … … 123 123 //} 124 124 //if (has_filter('new_to_publish') ){ 125 $a ction_based_post .= array(125 $ar_new = array( 126 126 array( 127 127 'slug' => 'ny_subscribe_field_notify_new_post', … … 134 134 //} 135 135 //if (has_filter('draft_to_publish') ){ 136 $a ction_based_post .= array(136 $ar_draft = array( 137 137 array( 138 138 'slug' => 'ny_subscribe_field_notify_draft_post', … … 145 145 //} 146 146 //if (has_filter('pending_to_publish') ){ 147 $a ction_based_post .= array(147 $ar_pending = array( 148 148 array( 149 149 'slug' => 'ny_subscribe_field_notify_pending_post', … … 156 156 //} 157 157 //if (has_filter('publish_future_post') ){ 158 $a ction_based_post .= array(158 $ar_future = array( 159 159 array( 160 160 'slug' => 'ny_subscribe_field_notify_future_post', … … 167 167 //} 168 168 //if (has_filter('private_to_publish') ){ 169 $a ction_based_post .= array(169 $ar_private = array( 170 170 array( 171 171 'slug' => 'ny_subscribe_field_notify_private_post', … … 178 178 //} 179 179 //if (has_filter('xmlrpc_publish_post') ){ 180 $a ction_based_post .= array(180 $ar_xmlrpc = array( 181 181 array( 182 182 'slug' => 'ny_subscribe_field_notify_xmlrpc_post', … … 189 189 //} 190 190 191 $admin_fields = array_merge ( $admin_fields, $a ction_based_post);191 $admin_fields = array_merge ( $admin_fields, $ar_publish, $ar_new, $ar_draft, $ar_pending, $ar_future, $ar_private, $ar_xmlrpc ); 192 192 193 193 … … 202 202 /************************ GLOBAL VARS **************************/ 203 203 $init_global = array(); 204 $init_global['form_heading'] = get_option( 'ny_subscribe_field_form_heading' ) ? get_option( 'ny_subscribe_field_form_heading') : __('Subscribe');205 $init_global['submit_label'] = get_option( 'ny_subscribe_field_label' ) ? get_option( 'ny_subscribe_field_label') : __('Subscribe');204 $init_global['form_heading'] = get_option( 'ny_subscribe_field_form_heading' ) ? stripslashes( get_option( 'ny_subscribe_field_form_heading' ) ) : __('Subscribe'); 205 $init_global['submit_label'] = get_option( 'ny_subscribe_field_label' ) ? stripslashes( get_option( 'ny_subscribe_field_label' ) ) : __('Subscribe'); 206 206 $init_global['show_name'] = get_option( 'ny_subscribe_field_show_name' ); 207 207 $init_global['show_custom'] = get_option( 'ny_subscribe_field_custom' ); 208 $init_global['email_error'] = get_option( 'ny_subscribe_field_email_invalid' ) ? get_option( 'ny_subscribe_field_email_invalid') : __('Invalid Email');209 $init_global['email_exist'] = get_option( 'ny_subscribe_field_email_exist' ) ? get_option( 'ny_subscribe_field_email_exist') : __('This Email already registered');210 $init_global['msg_success'] = get_option( 'ny_subscribe_field_success' ) ? get_option( 'ny_subscribe_field_success') : __('Thank you for subscribing!');208 $init_global['email_error'] = get_option( 'ny_subscribe_field_email_invalid' ) ? stripslashes( get_option( 'ny_subscribe_field_email_invalid' ) ) : __('Invalid Email'); 209 $init_global['email_exist'] = get_option( 'ny_subscribe_field_email_exist' ) ? stripslashes( get_option( 'ny_subscribe_field_email_exist' ) ) : __('This Email already registered'); 210 $init_global['msg_success'] = get_option( 'ny_subscribe_field_success' ) ? stripslashes( get_option( 'ny_subscribe_field_success' ) ) : __('Thank you for subscribing!'); 211 211 $init_global['send_email'] = get_option( 'ny_subscribe_field_send_email' ); 212 212 $init_global['notify_published_post'] = get_option( 'ny_subscribe_field_notify_published_post' ); … … 217 217 $init_global['notify_private_post'] = get_option( 'ny_subscribe_field_notify_private_post' ); 218 218 $init_global['notify_xmlrpc_post'] = get_option( 'ny_subscribe_field_notify_xmlrpc_post' ); 219 $init_global['ny_unsubscribe_message'] = get_option( 'ny_unsubscribe_message' ) ? get_option( 'ny_unsubscribe_message') : __('You are successfully unsubscribed!');220 $init_global['ny_subscribe_logged_in_msg'] = get_option( 'ny_subscribe_logged_in_msg' ) ? get_option( 'ny_subscribe_logged_in_msg') : __('You are already joined us!');219 $init_global['ny_unsubscribe_message'] = get_option( 'ny_unsubscribe_message' ) ? stripslashes( get_option( 'ny_unsubscribe_message' ) ) : __('You are successfully unsubscribed!'); 220 $init_global['ny_subscribe_logged_in_msg'] = get_option( 'ny_subscribe_logged_in_msg' ) ? stripslashes( get_option( 'ny_subscribe_logged_in_msg' ) ) : __('You are already joined us!'); 221 221 222 222 $val_name=''; $val_email=''; $val_custom=''; … … 230 230 echo "<p> 231 231 <label for='ny_name'>".__('Name')."</label> 232 <input type='text' name='ny_name' id='ny_name' value='". $val_name."' />232 <input type='text' name='ny_name' id='ny_name' value='". stripslashes( $val_name ) ."' /> 233 233 </p>"; 234 234 } … … 236 236 echo "<p> 237 237 <label for='ny_email'>".__('Email')."</label> 238 <input type='text' name='ny_email' id='ny_email' value='". $val_email."' />238 <input type='text' name='ny_email' id='ny_email' value='". stripslashes( $val_email ) ."' /> 239 239 </p>"; 240 240 … … 242 242 echo "<p> 243 243 <label for='ny_custom'>". __( $init_global['show_custom'] ) ."</label> 244 <input type='text' name='ny_custom' id='ny_custom' value='". $val_custom."' />244 <input type='text' name='ny_custom' id='ny_custom' value='". stripslashes( $val_custom ) ."' /> 245 245 </p>"; 246 246 } … … 323 323 <table cellpadding='0' cellspacing='0' border='0'> 324 324 <tr> 325 <td>".__('Hi ') . $uname."!</td>325 <td>".__('Hi ') . stripslashes( $uname ) ."!</td> 326 326 </tr> 327 327 <tr> … … 431 431 432 432 $return['err'] = false; 433 $return['msg'] = $add == true ? __('Subscriber added!') : $init_global['msg_success'];433 $return['msg'] = $add == true ? __('Subscriber added!') : stripslashes( $init_global['msg_success'] ); 434 434 } 435 435 } … … 516 516 echo '<p>'; 517 517 echo '<label for="'. $admin_fields[$i]['slug'] .'" style="vertical-align:top">'. __( $admin_fields[$i]['label'] ) .'</label>'; 518 echo '<textarea name="'. $admin_fields[$i]['slug'] .'" id="'. $admin_fields[$i]['slug'] .'">'. get_option( $admin_fields[$i]['slug']) .'</textarea>';518 echo '<textarea name="'. $admin_fields[$i]['slug'] .'" id="'. $admin_fields[$i]['slug'] .'">'. stripslashes( get_option( $admin_fields[$i]['slug'] ) ) .'</textarea>'; 519 519 echo '</p>'; 520 520 }else{ 521 521 echo '<p>'; 522 522 echo '<label for="'. $admin_fields[$i]['slug'] .'">'. __( $admin_fields[$i]['label'] ) .'</label>'; 523 echo '<input '. $checked .' type="'. $admin_fields[$i]['type'] .'" name="'. $admin_fields[$i]['slug'] .'" id="'. $admin_fields[$i]['slug'] .'" value="'. get_option( $admin_fields[$i]['slug']) .'" />';523 echo '<input '. $checked .' type="'. $admin_fields[$i]['type'] .'" name="'. $admin_fields[$i]['slug'] .'" id="'. $admin_fields[$i]['slug'] .'" value="'. stripslashes( get_option( $admin_fields[$i]['slug'] ) ) .'" />'; 524 524 echo '</p>'; 525 525 } … … 585 585 586 586 echo "<form name='ny_subscribe_form' id='ny_subscribe_form' method='post' action='#". $wrapper_id ."'>"; 587 echo "<h3>". $init_global['form_heading']."</h3>";587 echo "<h3>". stripslashes( $init_global['form_heading'] ) ."</h3>"; 588 588 589 589 ny_subscribe_form_fields(); … … 591 591 echo "<p> 592 592 <label> </label> 593 <input type='submit' value='". $init_global['submit_label']."' name='ny_subscribe_submit' id='ny_subscribe_submit' />593 <input type='submit' value='". stripslashes( $init_global['submit_label'] ) ."' name='ny_subscribe_submit' id='ny_subscribe_submit' /> 594 594 </p> 595 595 </form> … … 597 597 }else{ 598 598 echo "<div id='userloggedin' class='widget'>"; 599 _e( "<h2 class='title'>". $init_global['form_heading']."</h2>" );600 _e( "<h4>". $init_global['ny_subscribe_logged_in_msg']."</h4>" );599 _e( "<h2 class='title'>". stripslashes( $init_global['form_heading'] ) ."</h2>" ); 600 _e( "<h4>". stripslashes( $init_global['ny_subscribe_logged_in_msg'] ) ."</h4>" ); 601 601 echo '</div>'; 602 602 } … … 641 641 '', 642 642 array( 643 'name' => __( $init_global['form_heading']), # FORM HEADING = WIDGET HEADING643 'name' => __( stripslashes( $init_global['form_heading'] ) ), # FORM HEADING = WIDGET HEADING 644 644 'description' => __('Displays Navayan Subscribe form as a widget in your sidebar', 'nysubscribe') 645 645 ) -
navayan-subscribe/trunk/readme.txt
r568144 r568404 4 4 Requires at least: 3+ 5 5 Tested up to: 3.4.1 6 Stable tag: 1.1.7 6 Stable tag: 1.1.7.1 7 7 Donate Link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=amolnw2778@gmail.com&item_name=NavayanSubscribe 8 8 … … 98 98 == Changelog == 99 99 100 = 1.1.7.1 (20120707) = 101 * FIX: PHP warning 102 100 103 = 1.1.7 (20120706) = 101 104 * FIX: Avoided various filters
Note: See TracChangeset
for help on using the changeset viewer.