Plugin Directory

Changeset 1306886


Ignore:
Timestamp:
12/12/2015 01:34:22 PM (10 years ago)
Author:
barzik
Message:

Develop version including the automatic tests

Location:
wp-notice/branches/develop
Files:
2 edited
30 copied

Legend:

Unmodified
Added
Removed
  • wp-notice/branches/develop/README.md

    r1253593 r1306886  
    1 [![Build Status](https://travis-ci.org/barzik/wp-notice.svg)](https://travis-ci.org/barzik/wp-notice)
    2 
    3 https://travis-ci.org/barzik/wp-notice.svg
     1[![Build Status](https://travis-ci.org/barzik/wp-notice.svg?branch=master)](https://travis-ci.org/barzik/wp-notice)
    42
    53# WP Notice
    64
    7 WP Notice plugin enable every admin to post animated announcement or messages on top of posts based on tags, categories or date.
     5WP Notice plugin enable every admin to post animated announcement or messages in posts based on tags, categories or date.
    86You can assign several messages for the several posts. There are several custom designs based on BootStrap styles.
    97Along with the styles, you can also add to every message one of hundreds icons based on Font Awesome repository and
    10 also choose animation type, duration and number of repetition.
     8also choose animation type, duration and number of repetition. You can choose the position of the notices.
    119
    1210# Installation and other information
  • wp-notice/branches/develop/README.txt

    r1254423 r1306886  
    22Contributors: barzik
    33Tags: notification, posts, obsolete, notice, messages, notice based on category, animation, font awesome
    4 Requires at least: 3.7
    5 Tested up to: 4.3.1
     4Requires at least: 3.8
     5Tested up to: 4.4
    66Stable tag: trunk
    77License: GPLv2 or later
     
    1212== Description ==
    1313
    14 WP Notice plugin enable every website manager to display animated announcement or messages on top of posts based on tags, categories or date.
    15 You can assign several messages for the several posts. There are several custom designs based on Twitter BootStrap styles.
     14WP Notice plugin enable every admin to post animated announcement or messages in posts based on tags, categories or date.
     15You can assign several messages for the several posts. There are several custom designs based on BootStrap styles.
    1616Along with the styles, you can also add to every message one of hundreds icons based on Font Awesome repository and
    17 also choose animation type, duration and number of repetition. You can preview the message with the animation before saving it.
     17also choose animation type, duration and number of repetition. You can choose the position of the notices.
    1818
    1919Ideal for technical sites that need to post deprecated notice on old posts and any other sites that need to show
     
    5959
    6060== Changelog ==
     61
     62= 1.3.4 =
     63* Adding Position choice: before content, after content or both.
     64* Added PHPUnit test case.
     65* Removed tests from production to testing.
    6166
    6267= 1.3.2 =
     
    104109== Upgrade Notice ==
    105110
     111= 1.3.4 =
     112* Adding Position choice: before content, after content or both.
     113* Added PHPUnit test case.
     114* Removed tests from production to testing.
     115
    106116= 1.3.2 =
    107117Fix for issue with link being inserted to message and got malformed.
  • wp-notice/branches/develop/admin/assets/css/admin.css

    r1252797 r1306886  
    4545}
    4646
     47fieldset.wp_notice > div.wp_notice_position > label {
     48    display: inline;
     49}
     50
    4751.wp_notice_animation.form-group > span {
    4852    display: inline-block;
  • wp-notice/branches/develop/admin/class-wp-notice-admin.php

    r1254423 r1306886  
    306306                $wp_notice_options_raw['animation'][ $i ]['repeat'] = '';
    307307            }
     308            if ( isset( $wp_notice_options_raw['position'][ $i ] ) ) {
     309                $wp_notice_options[ $i ]['position'] = sanitize_text_field( $wp_notice_options_raw['position'][ $i ] );
     310            } else {
     311                $wp_notice_options[ $i ]['position'] = 'before';
     312            }
    308313        }
    309314        return $wp_notice_options;
     
    391396                $key, $wp_notice_option['tag'], $wp_notice_option['cat'],
    392397                $wp_notice_option['wp_notice_time'], $wp_notice_option['wp_notice_text'], $wp_notice_option['style'],
    393                 $wp_notice_option['font'], $wp_notice_option['animation']
     398                $wp_notice_option['font'], $wp_notice_option['animation'], $wp_notice_option['position']
    394399            );
    395400        }
     
    417422            $category_list .= "<option $all value='0'>".__( 'Do not use categories', $this->plugin_slug ).'</option>';
    418423            foreach ( $categories as $cat ) {
    419                 if ( is_array( $selected_category ) && ! empty( $selected_category ) && in_array( $cat->term_id, $selected_category ) ) {
     424                if ( is_array( $selected_category ) && ! empty( $selected_category ) && in_array( $cat->term_id, $selected_category, true ) ) {
    420425                    $selected = $cat->term_id;
    421426                } else {
     
    449454            foreach ( $tags as $tag ) {
    450455                $selected = '';
    451                 if ( is_array( $selected_tag ) && ! empty( $selected_tag ) && in_array( $tag->term_id, $selected_tag ) ) {
     456                if ( is_array( $selected_tag ) && ! empty( $selected_tag ) && in_array( $tag->term_id, $selected_tag, true ) ) {
    452457                    $selected = $tag->term_id;
    453458                }
     
    499504
    500505        return $font_list;
     506    }
     507
     508    /**
     509     *
     510     * Generating the position list for the fieldset in the admin options menu
     511     *
     512     * @param int    $number The serial ID of the fieldset.
     513     * @param string $selected_position The position for the notice.
     514     * @return string
     515     */
     516    private function generate_position( $number = 0, $selected_position = 'befote' ) {
     517
     518        $position_list = '';
     519        $position_list .= "<label for='position_{$number}'>" . __( 'Select position for the notice : ', $this->plugin_slug ) . '</label>';
     520        $position_list .= "<select id='position_{$number}' name='position[{$number}]' class='wp_notice_position'>";
     521        $position_list .= '<option ' . selected( $selected_position, 'before', false ) . ' value="before">'. __( 'Before', $this->plugin_slug ) . '</option>';
     522        $position_list .= '<option ' . selected( $selected_position, 'after', false ) . ' value="after">'. __( 'After', $this->plugin_slug ) . '</option>';
     523        $position_list .= '<option ' . selected( $selected_position, 'both', false ) . ' value="both">'. __( 'Both', $this->plugin_slug ) . '</option>';
     524        $position_list .= '</select> ';
     525
     526        return $position_list;
    501527    }
    502528
     
    553579     * @param string $selected_font  The font string for fontAwsome.
    554580     * @param array  $selected_animation  Array for fonts.
     581     * @param string $selected_position - The position of the notice.
    555582     * @return string
    556583     */
    557584    private function build_fieldset( $number = 0, $selected_tag = array(), $selected_category = array(), $time = null,
    558         $text = '', $selected_style = 'wp-notice-regular', $selected_font = 'none', $selected_animation = array() ) {
    559 
    560         $category_list = $this->generate_category_list( $number, $selected_category );
    561         $tag_list = $this->generate_tag_list( $number, $selected_tag );
    562         $style_list = $this->generate_style_list( $number, $selected_style );
    563         $fonts_list = $this->generate_fonts_list( $number, $selected_font );
    564         $animation = $this->generate_animation( $number, $selected_animation );
    565         $text_label = __( 'The Notice', $this->plugin_slug );
    566         $time_label = __( 'Show in all posts that were created before:', $this->plugin_slug );
    567         $text_place_holder = __( 'Insert the text of the notice here. It can be HTML or text string', $this->plugin_slug );
    568         $time_place_holder = __( 'DD/MM/YYYY', $this->plugin_slug );
    569         $fieldset = <<<EOD
     585        $text = '', $selected_style = 'wp-notice-regular', $selected_font = 'none', $selected_animation = array(),
     586        $selected_position = 'before' ) {
     587
     588            $category_list = $this->generate_category_list( $number, $selected_category );
     589            $tag_list = $this->generate_tag_list( $number, $selected_tag );
     590            $style_list = $this->generate_style_list( $number, $selected_style );
     591            $fonts_list = $this->generate_fonts_list( $number, $selected_font );
     592            $animation = $this->generate_animation( $number, $selected_animation );
     593            $position = $this->generate_position( $number, $selected_position );
     594            $text_label = __( 'The Notice', $this->plugin_slug );
     595            $time_label = __( 'Show in all posts that were created before:', $this->plugin_slug );
     596            $text_place_holder = __( 'Insert the text of the notice here. It can be HTML or text string', $this->plugin_slug );
     597            $time_place_holder = __( 'DD/MM/YYYY', $this->plugin_slug );
     598            $fieldset = <<<EOD
    570599<fieldset class="wp_notice" rel="$number">
    571600        <div class="form-group">
     
    586615                        $animation
    587616        </div>
     617        <div class="wp_notice_position form-group">
     618                        $position
     619        </div>
    588620        <div class="wp_notice_mock_example">
    589621            <div class="wp_notice_message" id="wp_notice_message-$number"></div>
     
    593625EOD;
    594626
    595         return $fieldset;
     627            return $fieldset;
    596628    }
    597629
  • wp-notice/branches/develop/languages/wp-notice-he_IL.po

    r1252797 r1306886  
    55"Project-Id-Version: wp-notice 1\n"
    66"Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
    7 "POT-Creation-Date: 2015-09-19 13:32+0200\n"
    8 "PO-Revision-Date: 2015-09-24 18:50+0200\n"
     7"POT-Creation-Date: 2015-12-12 14:49+0200\n"
     8"PO-Revision-Date: 2015-12-12 14:52+0200\n"
    99"Last-Translator: Ran Bar-Zik <[email protected]>\n"
    1010"Language-Team:  <[email protected]>\n"
     
    2121"X-Poedit-SearchPath-0: .\n"
    2222
    23 #: admin/class-wp-notice-admin.php:79 admin/class-wp-notice-admin.php:90
    24 #: public/class-wp-notice.php:82 public/class-wp-notice.php:93
     23#: admin/class-wp-notice-admin.php:115 admin/class-wp-notice-admin.php:126
     24#: public/class-wp-notice.php:98 public/class-wp-notice.php:109
    2525msgid "Cheatin&#8217; huh?"
    26 msgstr ""
     26msgstr "לרמות זה לא יפה."
    2727
    28 #: admin/class-wp-notice-admin.php:152
     28#: admin/class-wp-notice-admin.php:175
    2929msgid "Done"
    3030msgstr "בוצע"
    3131
    32 #: admin/class-wp-notice-admin.php:153
     32#: admin/class-wp-notice-admin.php:176
    3333msgid "Today"
    3434msgstr "היום"
    3535
    36 #: admin/class-wp-notice-admin.php:156
     36#: admin/class-wp-notice-admin.php:179
    3737msgid "Show a different month"
    3838msgstr "הראה חודש אחר"
    3939
    40 #: admin/class-wp-notice-admin.php:184
     40#: admin/class-wp-notice-admin.php:204
    4141msgid "WP Notice Setting page"
    4242msgstr "מסך ההגדרות של WP Notice"
    4343
    44 #: admin/class-wp-notice-admin.php:200
     44#: admin/class-wp-notice-admin.php:205
     45msgid "WP Notice"
     46msgstr "הודעות וורדפרס"
     47
     48#: admin/class-wp-notice-admin.php:224
    4549msgid "Insert the notice and the conditions"
    4650msgstr "הכניסו את ההודעה ואת התנאים"
    4751
    48 #: admin/class-wp-notice-admin.php:331
     52#: admin/class-wp-notice-admin.php:374
    4953msgid "WP Notice Settings Updated"
    5054msgstr "ההגדרות של WP Notice עודכנו"
    5155
    52 #: admin/class-wp-notice-admin.php:333
     56#: admin/class-wp-notice-admin.php:376
    5357#, fuzzy
    5458msgid "WP Notice Error! You did change the form, right? please try again."
    5559msgstr "שגיאה ב Wp Notice אנא נסו שוב."
    5660
    57 #: admin/class-wp-notice-admin.php:371 admin/class-wp-notice-admin.php:400
     61#: admin/class-wp-notice-admin.php:420 admin/class-wp-notice-admin.php:451
    5862msgid "Show in all posts that belongs to : "
    5963msgstr "הראה בכל הפוסטים ששייכים אל:"
    6064
    61 #: admin/class-wp-notice-admin.php:373
     65#: admin/class-wp-notice-admin.php:422
    6266msgid "Do not use categories"
    6367msgstr "אל תשתמש בקטגוריות"
    6468
    65 #: admin/class-wp-notice-admin.php:402
     69#: admin/class-wp-notice-admin.php:453
    6670msgid "Do not use tags"
    6771msgstr "אל תשתמש בתגיות"
    6872
    69 #: admin/class-wp-notice-admin.php:427
     73#: admin/class-wp-notice-admin.php:477
    7074msgid "Select the style of the notice : "
    7175msgstr "בחרו את עיצוב ההודעה : "
    7276
    73 #: admin/class-wp-notice-admin.php:455
     77#: admin/class-wp-notice-admin.php:497
     78msgid "Select icon for the notice : "
     79msgstr "בחרו אייקון שיופיע בהודעה"
     80
     81#: admin/class-wp-notice-admin.php:499
     82#, fuzzy
     83msgid "Do not use font"
     84msgstr "אל תשתמש בתגיות"
     85
     86#: admin/class-wp-notice-admin.php:519
     87#, fuzzy
     88msgid "Select position for the notice : "
     89msgstr "בחרו אייקון שיופיע בהודעה"
     90
     91#: admin/class-wp-notice-admin.php:521
     92msgid "Before"
     93msgstr "לפני"
     94
     95#: admin/class-wp-notice-admin.php:522
     96msgid "After"
     97msgstr "אחרי"
     98
     99#: admin/class-wp-notice-admin.php:523
     100msgid "Both"
     101msgstr "גם וגם"
     102
     103#: admin/class-wp-notice-admin.php:550
     104msgid "Select animation type : "
     105msgstr "בחרו את סוג האנימציה"
     106
     107#: admin/class-wp-notice-admin.php:552
     108msgid "None"
     109msgstr "ללא"
     110
     111#: admin/class-wp-notice-admin.php:559
     112msgid "Select animation duration (seconds) : "
     113msgstr "משך האנימציה בשניות"
     114
     115#: admin/class-wp-notice-admin.php:563
     116msgid "Select animation repetition, -1 for infinite : "
     117msgstr "מספר החזרות. -1 עבור אינסוף"
     118
     119#: admin/class-wp-notice-admin.php:594
    74120msgid "The Notice"
    75121msgstr "ההודעה"
    76122
    77 #: admin/class-wp-notice-admin.php:456
     123#: admin/class-wp-notice-admin.php:595
    78124msgid "Show in all posts that were created before:"
    79125msgstr "הצג בכל הפוסטים שנוצרו לפני:"
    80126
    81 #: admin/class-wp-notice-admin.php:457
     127#: admin/class-wp-notice-admin.php:596
    82128msgid "Insert the text of the notice here. It can be HTML or text string"
    83129msgstr "הכנס את הטקסט של ההודעה כאן. הטקסט יכול להיות HTML"
    84130
    85 #: admin/class-wp-notice-admin.php:458
     131#: admin/class-wp-notice-admin.php:597
    86132#, fuzzy
    87133msgid "DD/MM/YYYY"
    88134msgstr "DD/MM/YY"
    89135
    90 #: admin/class-wp-notice-admin.php:489
     136#: admin/class-wp-notice-admin.php:639
    91137msgid "Settings"
    92138msgstr "הגדרות"
    93139
    94 #: admin/views/admin.php:26
     140#: admin/views/admin.php:30
    95141msgid ""
    96142"Please fill in the notice text and the proper conditions that need to be "
     
    98144msgstr "אנא מלאו את ההודעה ואת התנאים שצריכים להתקיים על מנת שהיא תופיע"
    99145
    100 #: admin/views/admin.php:27
     146#: admin/views/admin.php:31
    101147msgid "You can combine several conditions and create several notices"
    102148msgstr "אפשר לשלב מספר תנאים וליצור מספר הודעות"
    103149
    104 #: admin/views/admin.php:32
     150#: admin/views/admin.php:41
    105151msgid "Submit"
    106152msgstr "שלח"
     
    109155msgstr "תוסף להצגת הודעות ומסרים בפוסטים שונים"
    110156
    111 msgid "Select icon for the notice : "
    112 msgstr "בחרו אייקון שיופיע בהודעה"
    113 
    114 msgid "Select animation type : "
    115 msgstr "בחרו את סוג האנימציה"
    116 
    117 msgid "None"
    118 msgstr "ללא"
    119 
    120 msgid "Select animation duration (seconds) : "
    121 msgstr "משך האנימציה בשניות"
    122 
    123 msgid "Select animation repetition, -1 for infinite : "
    124 msgstr "מספר החזרות. -1 עבור אינסוף"
    125 
    126 #. Author of the plugin/theme
    127157msgid "Ran Bar-Zik <[email protected]>"
    128158msgstr "רן בר-זיק <[email protected]>"
    129 
    130 #. Plugin name
    131 msgid "WP Notice"
    132 msgstr "הודעות וורדפרס"
  • wp-notice/branches/develop/public/class-wp-notice.php

    r1254423 r1306886  
    182182        foreach ( $messages_array as $key => $message ) {
    183183            $messages_html .= $this->create_message_block( $message['text'], $key, $message['style'], $message['font'], $message['animation'] );
    184         }
    185         $content = $messages_html.$content;
     184            switch ( $message['position'] ) {
     185                case 'after':
     186                    $content = $content.$messages_html;
     187                    break;
     188                case 'both':
     189                    $content = $messages_html.$content.$messages_html;
     190                    break;
     191                default:
     192                    $content = $messages_html.$content;
     193                    break;
     194            }
     195        }
     196
    186197        return $content;
    187198    }
     
    243254            if ( isset( $sort_option['tag'] ) && ! empty( $sort_option['tag'] ) ) {
    244255                foreach ( $sort_option['tag'] as $tag ) {
    245                     if ( in_array( $tag, $current_tags ) ) {
    246                         $messages[] = array(
     256                    if ( in_array( $tag, $current_tags, true ) ) {
     257                        $temp_message = array(
    247258                            'text' => $sort_option['wp_notice_text'],
    248259                            'style' => $sort_option['style'],
     
    250261                            'animation' => $sort_option['animation'],
    251262                        );
     263                        if ( isset( $sort_option['position'] ) ) {
     264                            $temp_message['position'] = $sort_option['position'];
     265                        } else {
     266                            $temp_message['position'] = 'before';
     267                        }
     268                        $messages[] = $temp_message;
    252269                        $found = true;
    253270                        break;
     
    262279            if ( isset( $sort_option['cat'] ) && ! empty( $sort_option['cat'] ) ) {
    263280                foreach ( $sort_option['cat'] as $cat ) {
    264                     if ( in_array( $cat, $current_categories ) ) {
    265                         $messages[] = array(
     281                    if ( in_array( $cat, $current_categories, true ) ) {
     282                        $temp_message = array(
    266283                            'text' => $sort_option['wp_notice_text'],
    267284                            'style' => $sort_option['style'],
     
    269286                            'animation' => $sort_option['animation'],
    270287                        );
     288                        if ( isset( $sort_option['position'] ) ) {
     289                            $temp_message['position'] = $sort_option['position'];
     290                        } else {
     291                            $temp_message['position'] = 'before';
     292                        }
     293                        $messages[] = $temp_message;
    271294                        $found = true;
    272295                        break;
     
    283306                $ts = $dt->getTimestamp();
    284307                if ( $ts > get_the_time( 'U' ) ) {
    285                     $messages[] = array(
     308                    $temp_message = array(
    286309                        'text' => $sort_option['wp_notice_text'],
    287310                        'style' => $sort_option['style'],
     
    289312                        'animation' => $sort_option['animation'],
    290313                    );
     314                    if ( isset( $sort_option['position'] ) ) {
     315                        $temp_message['position'] = $sort_option['position'];
     316                    } else {
     317                        $temp_message['position'] = 'before';
     318                    }
     319                    $messages[] = $temp_message;
    291320                }
    292321            }
  • wp-notice/branches/develop/tests/bin/install-wp-tests.sh

    r1249165 r1306886  
    164164}
    165165
     166run_phpcs() {
     167  pear config-set auto_discover 1
     168  pear install PHP_CodeSniffer
     169  git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $(pear config-get php_dir)/PHP/CodeSniffer/Standards/WordPress
     170  phpenv rehash
     171  npm install -g jshint
     172  phpcs --config-set installed_paths $(pear config-get php_dir)/PHP/CodeSniffer/Standards/WordPress
     173  phpcs -i
     174  local FOLDER_PATH=$(dirname $DIR)
     175  cd $FOLDER_PATH
     176  npm install
     177  grunt lint
     178}
     179
    166180install_wp
    167181install_test_suite
     
    171185# install_rspec_requirements
    172186start_server
     187run_phpcs
  • wp-notice/branches/develop/tests/bin/router.php

    r1244882 r1306886  
    11<?php
    2 /*
     2/**
     3 * Router.php
     4 *
    35 * This is router for built-in php server. It is designed to use only for testing
    46 * This frees us from installing apache or nginx in travis
  • wp-notice/branches/develop/tests/test_wp_notice_plugin_tests.php

    r1254423 r1306886  
    412412    }
    413413
     414    /**
     415     * @group toextend
     416     */
     417
     418    function test_plugin_submit_notice_with_position() {
     419        //Lets create some notice with date and assign to it animation
     420        $user = new WP_User( $this->factory->user->create( array( 'role' => 'administrator' ) ) );
     421        wp_set_current_user( $user->ID );
     422        // fetching options, validate it is empty
     423        $wp_notice_settings = get_option( 'wp_notice_settings_information', array() );
     424
     425        $this->assertEmpty( $wp_notice_settings );
     426
     427        $i = 0;
     428        $cat_id = $this->generate_category();
     429        // generate $_POST data
     430        $this->create_valid_post_data( $i, $cat_id, NULL, NULL , 'wp-notice-regular', 'none', array('duration' => '', 'repeat' => '', 'type' => 'none'), 'after' );
     431
     432        // checking the admin page with $_POST - should insert it to the options
     433        $this->plugin_admin->display_plugin_admin_page();
     434
     435        // fetching options, now it is not empty
     436        $wp_notice_settings = get_option( 'wp_notice_settings_information', array() );
     437
     438        $this->assertNotEmpty( $wp_notice_settings );
     439
     440        $options_data = unserialize( $wp_notice_settings );
     441        $this->assertInternalType( 'array', $options_data[ $i ] );
     442        $this->assertEmpty( $options_data[ $i ]['wp_notice_time']);
     443        $this->assertEmpty( $options_data[ $i ]['tag']);
     444        $this->assertEquals( $options_data[ $i ]['position'], 'after');
     445
     446        $this->assertEquals( $options_data[ $i ]['wp_notice_text'], 'This is <a href="http://www.google.com">notice</a> #'.$i.' message' );
     447        $this->assertEquals( $options_data[ $i ]['style'], 'wp-notice-regular' );
     448        $this->assertEquals( $options_data[ $i ]['font'], 'none' );
     449        $this->assertEquals( $options_data[ $i ]['position'], 'after' );
     450
     451        // now test it with real post - it should not contain message and not errors
     452        // notice, warnings and errors will drop tests - added convertErrorsToExceptions   = "true"
     453        //convertNoticesToExceptions  = "true"
     454        //convertWarningsToExceptions = "true"
     455        // in phpunit.xml
     456        // create one post
     457        $post_id = $this->factory->post->create( array( 'post_type' => 'post', 'post_status' => 'publish', 'post_title' => 'POST1', 'post_content' => 'POST CONTENT', 'post_excerpt'=> 'POST CONTENT', 'post_date' => date( 'Y-m-d H:i:s', time() ) ) );
     458
     459        // go to this post
     460        $this->go_to( get_permalink( $post_id ) );
     461        // fetch the content
     462        $post_content_with_notice = get_echo( 'the_content' );
     463
     464    }
     465
    414466
    415467    function test_plugin_delete_all_options() {
     
    494546
    495547
    496     function create_valid_post_data( $i = 0, $cat_id = 0, $term_id = 0, $date = '', $style = 'wp-notice-regular', $font = 'none', $animation = array('duration' => '', 'repeat' => '', 'type' => 'none') ) {
     548    function create_valid_post_data( $i = 0, $cat_id = 0, $term_id = 0, $date = '', $style = 'wp-notice-regular', $font = 'none', $animation = array('duration' => '', 'repeat' => '', 'type' => 'none'), $position = 'before' ) {
    497549            global $_POST;
    498550
     
    517569            $_POST['animation'][ $i ] = $animation;
    518570
     571            $_POST['position'][ $i ] = $position;
     572
    519573    }
    520574
  • wp-notice/branches/develop/wp-notice.php

    r1254423 r1306886  
    1313 * Plugin URI:        http://internet-israel.com
    1414 * Description:       WP Notice Plugin enables admin to put custom animated announcements in the beginning of posts based on date, categories or tags.
    15  * Version:           1.3.2
     15 * Version:           1.3.4
    1616 * Author:            Ran Bar-Zik <[email protected]>
    1717 * Author URI:        http://internet-israel.com
Note: See TracChangeset for help on using the changeset viewer.