Plugin Directory

Changeset 1300897


Ignore:
Timestamp:
12/04/2015 10:18:17 PM (10 years ago)
Author:
zonnix
Message:

push version 1.0.3

Location:
typed/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • typed/trunk/readme.txt

    r1297662 r1300897  
    3939= 1.0.2 =
    4040* Adding placeholder to style options.
     41
     42= 1.0.3 =
     43* Adding Blinking Effect to Cursor.
     44* Make the text wrape when it is too long.
  • typed/trunk/typed.php

    r1297662 r1300897  
    33  Plugin Name: Typed
    44  Description: Typed Plugin created based on "typed.js" a jQuery plugin that types. Enter in any string, and watch it type at the speed you've set, backspace what it's typed, and begin a new sentence for however many strings you've set.
    5   Version: 1.0.2
     5  Version: 1.0.3
    66  Author: zonnix
    77  Author URI: http://zonnix.net
     
    9393            ?>
    9494            <style>
    95                 .typed-cursor{
     95               
     96                <?php if (get_post_meta($post_id, 'blinking_cursor', true) == 'yes'): ?>
     97                .typed-div-<?php echo $post_id; ?> .typed-cursor{
    9698                    opacity: 1;
    97                     font-weight: 100;
    9899                    -webkit-animation: blink 0.7s infinite;
    99100                    -moz-animation: blink 0.7s infinite;
    100                     -ms-animation: blink 0.7s infinite;
    101                     -o-animation: blink 0.7s infinite;
    102                     animation: blink 0.7s infinite;                   
    103                 }
    104 
     101                    animation: blink 0.7s infinite;
     102                }
     103                @keyframes blink{
     104                    0% { opacity:1; }
     105                    50% { opacity:0; }
     106                    100% { opacity:1; }
     107                }
     108                @-webkit-keyframes blink{
     109                    0% { opacity:1; }
     110                    50% { opacity:0; }
     111                    100% { opacity:1; }
     112                }
     113                @-moz-keyframes blink{
     114                    0% { opacity:1; }
     115                    50% { opacity:0; }
     116                    100% { opacity:1; }
     117                }
     118                <?php endif; ?>
    105119                .typed-div-<?php echo $post_id; ?> {
    106120                    <?php if ($font_size): ?>font-size: <?php
     
    133147            </style>
    134148            <div class="typed-div-<?php echo $post_id; ?>">   
    135                 <span style="white-space:pre;" class="typed_perview_div" data-cursor-char="<?php echo get_post_meta($post_id, 'cursor_char', true); ?>" data-cursor="<?php echo get_post_meta($post_id, 'show_cursor', true); ?>" data-strings="<?php echo $strings; ?>" data-speed="<?php echo get_post_meta($post_id, 'type_speed', true); ?>" data-delay="<?php echo get_post_meta($post_id, 'start_delay', true); ?>" data-back-delay="<?php echo get_post_meta($post_id, 'back_delay', true); ?>" data-back-speed="<?php echo get_post_meta($post_id, 'back_speed', true); ?>" data-loop="<?php echo get_post_meta($post_id, 'typed_loop', true); ?>"></span>
     149                <span style="white-space:pre;word-wrap: break-word;line-height: 1;" class="typed_perview_div" data-cursor-char="<?php echo get_post_meta($post_id, 'cursor_char', true); ?>" data-cursor="<?php echo get_post_meta($post_id, 'show_cursor', true); ?>" data-strings="<?php echo $strings; ?>" data-speed="<?php echo get_post_meta($post_id, 'type_speed', true); ?>" data-delay="<?php echo get_post_meta($post_id, 'start_delay', true); ?>" data-back-delay="<?php echo get_post_meta($post_id, 'back_delay', true); ?>" data-back-speed="<?php echo get_post_meta($post_id, 'back_speed', true); ?>" data-loop="<?php echo get_post_meta($post_id, 'typed_loop', true); ?>"></span>
    136150            </div>
    137151            <br><pre class="update-nag shorCode">Generated Shortcode: [typed id='<?php echo $post_id; ?>']</pre>
     
    219233                        </td>
    220234                    </tr>
     235                    <tr>
     236                        <td>Blinking Cursor</td>
     237                        <td>
     238                            <input type="checkbox" value="yes" name="blinking_cursor" <?php if (get_post_meta($post_id, 'blinking_cursor', true) == 'yes'): ?>checked=""<?php endif; ?>/>
     239                            <br><span class="description">blinking cursor</span>
     240                        </td>
     241                    </tr>
    221242                </tbody>
    222243            </table>
     
    326347                    update_post_meta($post_id, 'show_cursor', 'no');
    327348
     349                if (isset($_POST['blinking_cursor']))
     350                    update_post_meta($post_id, 'blinking_cursor', $_POST['blinking_cursor']);
     351                else
     352                    update_post_meta($post_id, 'blinking_cursor', 'no');
     353               
    328354                if (isset($_POST['cursor_char']))
    329355                    update_post_meta($post_id, 'cursor_char', $_POST['cursor_char']);
     
    393419                            ?>
    394420                        }
     421                       
     422                        <?php if (get_post_meta($post_id, 'blinking_cursor', true) == 'yes'): ?>
     423                            .typed-div-<?php echo $post_id; ?> .typed-cursor{
     424                                opacity: 1;
     425                                -webkit-animation: blink 0.7s infinite;
     426                                -moz-animation: blink 0.7s infinite;
     427                                animation: blink 0.7s infinite;
     428                            }
     429                            @keyframes blink{
     430                                0% { opacity:1; }
     431                                50% { opacity:0; }
     432                                100% { opacity:1; }
     433                            }
     434                            @-webkit-keyframes blink{
     435                                0% { opacity:1; }
     436                                50% { opacity:0; }
     437                                100% { opacity:1; }
     438                            }
     439                            @-moz-keyframes blink{
     440                                0% { opacity:1; }
     441                                50% { opacity:0; }
     442                                100% { opacity:1; }
     443                            }
     444                        <?php endif; ?>
    395445                    </style>
    396446                    <div class="typed-div-<?php echo $post_id; ?>">                       
     
    413463   
    414464endif;
    415 
Note: See TracChangeset for help on using the changeset viewer.