Changeset 1843666
- Timestamp:
- 03/20/2018 05:36:43 PM (8 years ago)
- Location:
- countdown-flipclock/trunk/FlipIncludes
- Files:
-
- 2 edited
-
FlipMetaboxes.php (modified) (3 diffs)
-
FlipShortcode.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
countdown-flipclock/trunk/FlipIncludes/FlipMetaboxes.php
r1837691 r1843666 55 55 56 56 $CDFC_sel_mode = isset( $CDFC_values['CDFC_meta_box_mode'] ) ? esc_attr( $CDFC_values['CDFC_meta_box_mode'][0] ) : ''; 57 58 $CDFC_end_code = isset( $CDFC_values['CDFC_meta_box_code'] ) ? esc_attr( $CDFC_values['CDFC_meta_box_code'][0] ) : ''; 57 59 58 60 $CDFC_check1 = isset( $CDFC_values['CDFC_meta_box_check1'] ) ? esc_attr( $CDFC_values['CDFC_meta_box_check1'][0] ) : ''; … … 136 138 <input type="checkbox" id="CDFC_meta_box_check4" name="CDFC_meta_box_check4" <?php checked( $CDFC_check4, 'on' ); ?> /> 137 139 </p> 140 141 <p class="code"> 142 <span> 143 <label for="CDFC_meta_box_code" style="vertical-align:top">Enter JS code:</label> 144 <label class="desc" for="CDFC_meta_box_code">(Executed after CountDown ends)</label> 145 </span> 146 147 <textarea type="text" name="CDFC_meta_box_code" id="CDFC_meta_box_code" rows="2" cols="60"> 148 <?php echo $CDFC_end_code; ?> 149 </textarea> 150 151 <span class="desc"> 152 Hint: Don't include functions, just the raw code. $ is acceped. 153 </span> 154 155 </p> 138 156 <?php 139 157 } … … 181 199 if( isset( $_POST['CDFC_meta_box_cold'] ) ) 182 200 update_post_meta( $post_id, 'CDFC_meta_box_cold', wp_kses( $_POST['CDFC_meta_box_cold'], array() ) ); 201 if( isset( $_POST['CDFC_meta_box_code'] ) ) 202 update_post_meta( $post_id, 'CDFC_meta_box_code', wp_kses( $_POST['CDFC_meta_box_code'], array() ) ); 183 203 if( isset( $_POST['CDFC_meta_box_select'] ) ) 184 204 update_post_meta( $post_id, 'CDFC_meta_box_select', esc_attr( $_POST['CDFC_meta_box_select'] ) ); -
countdown-flipclock/trunk/FlipIncludes/FlipShortcode.php
r1837691 r1843666 23 23 $CDFC_time = get_post_meta($id, "CDFC_meta_box_time", true); 24 24 $CDFC_date = get_post_meta($id, "CDFC_meta_box_text", true); 25 $CDFC_code = get_post_meta($id, "CDFC_meta_box_code", true); 25 26 $CDFC_label1 = get_post_meta($id, "CDFC_meta_box_check1", true); 26 27 $CDFC_label2 = get_post_meta($id, "CDFC_meta_box_check2", true); … … 83 84 // Instantiate a coutdown FlipClock 84 85 $(".clock").each(function() { 85 $(".clock'.$CDFC_random_ID.'").FlipClock(diff, {86 var cdfc = $(".clock'.$CDFC_random_ID.'").FlipClock(diff, { 86 87 clockFace: "'.$CDFC_mode.'", 87 countdown: true 88 countdown: true, 89 callbacks: { 90 stop: function() { 91 $(".clock'.$CDFC_random_ID.'").html(""); 92 '.$CDFC_code.' 93 } 94 } 88 95 }); 89 96 }); … … 96 103 } 97 104 else { 98 $msg = "Please don't waste your time in this fruitless pursuit. Buy the premium version for $10 and get all the featur s of this plugin. :)";105 $msg = "Please don't waste your time in this fruitless pursuit. Buy the premium version for $10 and get all the features of this plugin. :)"; 99 106 return $msg; 100 107 }
Note: See TracChangeset
for help on using the changeset viewer.