Plugin Directory

Changeset 1843666


Ignore:
Timestamp:
03/20/2018 05:36:43 PM (8 years ago)
Author:
bluelevel
Message:

2.7.2 update

Location:
countdown-flipclock/trunk/FlipIncludes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • countdown-flipclock/trunk/FlipIncludes/FlipMetaboxes.php

    r1837691 r1843666  
    5555   
    5656    $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] ) : '';
    5759   
    5860    $CDFC_check1 = isset( $CDFC_values['CDFC_meta_box_check1'] ) ? esc_attr( $CDFC_values['CDFC_meta_box_check1'][0] ) : '';
     
    136138        <input type="checkbox" id="CDFC_meta_box_check4" name="CDFC_meta_box_check4" <?php checked( $CDFC_check4, 'on' ); ?> />
    137139    </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>
    138156    <?php   
    139157}
     
    181199    if( isset( $_POST['CDFC_meta_box_cold'] ) )
    182200        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() ) );
    183203    if( isset( $_POST['CDFC_meta_box_select'] ) )
    184204        update_post_meta( $post_id, 'CDFC_meta_box_select', esc_attr( $_POST['CDFC_meta_box_select'] ) );
  • countdown-flipclock/trunk/FlipIncludes/FlipShortcode.php

    r1837691 r1843666  
    2323    $CDFC_time = get_post_meta($id, "CDFC_meta_box_time", true);
    2424    $CDFC_date = get_post_meta($id, "CDFC_meta_box_text", true);
     25    $CDFC_code = get_post_meta($id, "CDFC_meta_box_code", true);
    2526    $CDFC_label1 = get_post_meta($id, "CDFC_meta_box_check1", true);
    2627    $CDFC_label2 = get_post_meta($id, "CDFC_meta_box_check2", true);
     
    8384                    // Instantiate a coutdown FlipClock
    8485                    $(".clock").each(function() {
    85                         $(".clock'.$CDFC_random_ID.'").FlipClock(diff, {
     86                        var cdfc = $(".clock'.$CDFC_random_ID.'").FlipClock(diff, {
    8687                            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                            }
    8895                        });
    8996                    });
     
    96103    }
    97104    else {
    98         $msg = "Please don't waste your time in this fruitless pursuit. Buy the premium version for $10 and get all the featurs 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. :)";
    99106        return $msg;
    100107    }
Note: See TracChangeset for help on using the changeset viewer.