Changeset 1015408
- Timestamp:
- 10/28/2014 05:54:58 PM (11 years ago)
- Location:
- because/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
admin/includes/voting_box.php (modified) (4 diffs)
-
social-polling.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
because/trunk/README.txt
r1012941 r1015408 7 7 Tested up to: 4.0 8 8 <<<<<<< .mine 9 Stable tag: 1.4. 09 Stable tag: 1.4.1 10 10 ======= 11 Stable tag: 1.4. 011 Stable tag: 1.4.1 12 12 >>>>>>> .r969865 13 13 License: GPLv2 or later -
because/trunk/admin/includes/voting_box.php
r937351 r1015408 55 55 */ 56 56 57 global $wpdb; 58 57 59 // Check if our nonce is set. 58 60 if ( ! isset( $_POST['myplugin_inner_custom_box_nonce'] ) ) … … 86 88 $social_polling_active_field = sanitize_text_field( $_POST['social_polling_active_field'] ); 87 89 // Update the meta field. 88 update_post_meta( $post_id, 'social_polling_active_field', $social_polling_active_field ); 90 update_post_meta( $post_id, 'social_polling_active_field', $social_polling_active_field ); 91 92 // check to see if social polling fields were already populated 93 $old_social_polling_answer_one_field = get_post_meta( $post_id , '_social_polling_answer_one_field', true); 94 $old_social_polling_answer_two_field = get_post_meta( $post_id , '_social_polling_answer_two_field', true); 95 $update_table = $wpdb->prefix . "social_polling"; 89 96 90 97 … … 103 110 // Update the meta field. 104 111 update_post_meta( $post_id, 'social_polling_answer_one_image_id', $social_polling_answer_one_image_id ); 112 113 if ($old_social_polling_answer_one_field){ 114 $wpdb->update( $update_table, 115 array( 116 'vote_value' => sanitize_title($social_polling_answer_one_field) 117 ), 118 array( 119 'poll_id' => $post_id, 120 'vote_value' => $old_social_polling_answer_one_field 121 ) 122 ); 123 } 105 124 106 125 … … 114 133 // Update the meta field. 115 134 update_post_meta( $post_id, 'social_polling_answer_two_image_id', $social_polling_answer_two_image_id ); 135 136 if ($old_social_polling_answer_two_field){ 137 $wpdb->update( $update_table, 138 array( 139 'vote_value' => sanitize_title($social_polling_answer_two_field) 140 ), 141 array( 142 'poll_id' => $post_id, 143 'vote_value' => $old_social_polling_answer_two_field 144 ) 145 ); 146 } 116 147 117 148 -
because/trunk/social-polling.php
r1012941 r1015408 34 34 35 35 <<<<<<< .mine 36 * Version: 1.4. 036 * Version: 1.4.1 37 37 ======= 38 * Version: 1.4. 038 * Version: 1.4.1 39 39 >>>>>>> .r969865 40 40
Note: See TracChangeset
for help on using the changeset viewer.