Making WordPress.org

Changeset 1430


Ignore:
Timestamp:
03/19/2015 10:37:51 PM (9 years ago)
Author:
coffee2code
Message:

Handbook plugin: Add 'tutorial' shortcode. Fixes #955.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/callout-boxes.php

    r879 r1430  
    2727            'tip'     => __( 'Tip:',     'wporg' ),
    2828            'alert'   => __( 'Alert:',   'wporg' ),
     29            'tutorial' => __( 'Tutorial:', 'wporg' ),
    2930            'warning' => __( 'Warning:', 'wporg' )
    3031        );
     
    8485
    8586    /**
     87     * Output callback for the `[tutorial]` shortcode.
     88     *
     89     * @access public
     90     *
     91     * @param array  $atts    Shortcode attributes.
     92     * @param string $content Shortcode content.
     93     * @return string Shortcode output as HTML markup.
     94     */
     95    public function tutorial_shortcode( $atts, $content = '' ) {
     96        return $this->build_callout_output( $content, 'tutorial' );
     97    }
     98
     99    /**
    86100     * Output callback for the `[warning]` shortcode.
    87101     *
     
    133147
    134148$callouts = new WPorg_Handbook_Callout_Boxes();
    135 
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/stylesheets/callout-boxes.css

    r879 r1430  
    4141  color: #c7b200;
    4242}
     43.callout-tutorial {
     44  background: #EDE7F3;
     45  border: 1px solid #936FB7;
     46  border-bottom: 3px solid #663399;
     47}
     48.callout-tutorial .dashicons:before {
     49  content: "\f308";
     50  color: #663399;
     51}
    4352.callout-warning {
    4453  background: #ffd8d8;
     
    5059  color: #ff3f3f;
    5160}
    52 
Note: See TracChangeset for help on using the changeset viewer.