tags around shortcodes. * * @since 1.0.0 * * @param string $content HTML content. * * @return string Updated content. */ function trestle_shortcode_empty_paragraph_fix( $content ) { $array = array ( '

[' => '[', ']

' => ']', ']
' => ']' ); $content = strtr( $content, $array ); return $content; } add_shortcode( 'col', 'trestle_column' ); /** * Columns. * * Example: * [col class="one-half first no-list-margin"] Contents [/col] * * Classes: * - width (one-half, one-third, etc - uses native Genesis column classes in style.css) * - first (used to specify the first column in a row) * - no-list-margin (will cause contained list elements to collapse as one on mobile sizes) * * @param array $atts Shortcode attributes. * * @return string Shortcode output. */ function trestle_column( $atts, $content = null ) { extract( shortcode_atts( array( 'class' => '', ), $atts ) ); return '
' . do_shortcode( $content ) . '
'; } add_shortcode( 'button', 'trestle_button' ); /** * Button. * * Example: [button href="url" title="title" target="target" class="class"]Text[/button] * * @param array $atts Shortcode attributes. * * @return string Shortcode output. */ function trestle_button( $atts, $content = null ) { extract( shortcode_atts( array( 'href' => '#', 'target' => '', 'title' => '', 'class' => '', ), $atts ) ); return '' . do_shortcode( $content ) . ''; } add_shortcode( 'date', 'trestle_date' ); /** * Date. * * Example: [date format="M d, Y"] * * @param array $atts Shortcode attributes. * * @return string Shortcode output. */ function trestle_date( $atts ) { extract( shortcode_atts( array( 'format' => 'M d, Y', ), $atts ) ); if ( ! $format ) { $format = 'M d, Y'; } return date( $format ); } add_shortcode( 'blockquote', 'trestle_blockquote_shortcode' ); /** * Blockquote. * * Example: [blockquote citation=""]Content[/blockquote] * * @since 1.2.0 * * @param array $atts Shortcode attributes. * * @return string Shortcode output. */ function trestle_blockquote_shortcode( $atts, $content = null ) { $atts = shortcode_atts( array( 'citation' => '', ), $atts ); ob_start(); ?>
-