Plugin Directory

Changeset 1123786


Ignore:
Timestamp:
03/30/2015 05:34:11 PM (11 years ago)
Author:
mardojai
Message:

New Version 1.1

Location:
simple-alert-boxes
Files:
43 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • simple-alert-boxes/trunk/plugin.php

    r1119048 r1123786  
    44 * Plugin URI: http://www.rafael.mardojai.com/simple-alert-boxes-plugin
    55 * Description: Use responsives alert boxes with shortcodes.
    6  * Version: 1.0
     6 * Version: 1.1
    77 * Author: Rafael Mardojai C.M.
    88 * Author URI: http://www.rafael.mardojai.com
     
    2828<?php
    2929function wpsab_scripts() {
    30     wp_enqueue_style( 'simple-alert-boxes', plugins_url( 'css/style.css', __FILE__ )  );   
     30    wp_enqueue_style( 'simple-alert-boxes', plugins_url( 'css/simple-alert-boxes.css', __FILE__ )  );   
    3131    wp_enqueue_style( 'simple-alert-boxes-icons', plugins_url( 'css/font-awesome.min.css', __FILE__ )  );   
    3232}
    3333add_action( 'wp_enqueue_scripts', 'wpsab_scripts' );
    34 function random_alert($atts) {
    35    extract(shortcode_atts(array(
    36       'type' => '',
    37       'text' => '',
    38    ), $atts));
    39 return '<div class="alert ' . $type . '"><p>' . $text . '</p></div>';
     34add_shortcode( 'alert', 'alert_output' );
     35function alert_output( $atts, $content ) {
     36    $atts = shortcode_atts( array(
     37        'type' => '',
     38        'text' => ''
     39    ), $atts );
     40    return '<div class="alert ' . $atts['type'] . '"><p>' . $atts['text'] . '' . $content . '</p></div>';
    4041}
    41 add_shortcode('alert', 'random_alert');
     42function my_admin_notice() {
     43    ?>
     44    <div class="updated">
     45        <h2><strong>Simple Alert Boxes Updated!</strong></h2>
     46        <p><strong></strong><?php _e( 'Welcome to de New version!', 'my-text-domain' ); ?></p>
     47    </div>
     48    <?php
     49}
     50add_action( 'admin_notices', 'my_admin_notice' );
    4251?>
  • simple-alert-boxes/trunk/readme.txt

    r1119053 r1123786  
    11=== Simple Alert Boxes ===
    22Contributors: mardojai
    3 Tags: shortcodes, alert, boxes
     3Tags: shortcodes, alert, boxes, mensajes, alertas, mensagges
    44Requires at least: 3.0.1
    55Tested up to: 4.1.1
     
    1616Is easy, only use the shortcodes.
    1717
    18 Example: Use [alert type="success" text="Your text heer"] for a success mensagge. Use [alert type="info" text="Your text heer"] for a info mensagge. Use [alert type="warning" text="Your text heer"] for a warning mensagge. Use [alert type="danger" text="Your text heer"] for a danger mensagge.
     18Example: For a success mensagge use: [alert type="success"]Your text here[/alert], for a info mensagge: [alert type="info"]Your text here[/alert], for a warning mensagge: [alert type="warning"]Your text here[/alert] and for a danger mensagge: [alert type="danger"]Your text here[/alert].
     19
     20(For version 1.0 you must use: [alert type="success" text="Your text heer"]).
     21
     22DEMO HERE: http://www.rafael.mardojai.com/simple-alert-boxes-plugin/
     23GITHUB REPOSITORY: https://github.com/mardojai/Simple-Alert-Boxes-Wordpress-Plugin
    1924
    2025
     
    3439* Responsive Design
    3540* Shortcodes
     41
     42= 1.1 =
     43* Optimized Shortcodes
     44* Support bold, italic, links and more
Note: See TracChangeset for help on using the changeset viewer.