'primary', 'title'=>__("Button",'philosophy'), 'url'=>'', ); $button_attributes = shortcode_atts($default,$attributes); return sprintf( '%s', $button_attributes['type'], $button_attributes['url'], $button_attributes['title'] ); } add_shortcode( 'button', 'philosophy_button' ); function philosophy_button2( $attributes, $content='' ) { $default = array( 'type'=>'primary', 'title'=>__("Button",'philosophy'), 'url'=>'', ); $button_attributes = shortcode_atts($default,$attributes); return sprintf( '%s', $button_attributes['type'], $button_attributes['url'], do_shortcode($content) ); } add_shortcode( 'button2', 'philosophy_button2' ); function philosophy_uppercase($attributes, $content=''){ return strtoupper(do_shortcode($content)); } add_shortcode('uc','philosophy_uppercase'); function philosophy_google_map($attributes){ $default = array( 'place'=>'Dhaka Museum', 'width'=>'800', 'height'=>'500', 'zoom'=>'14' ); $params = shortcode_atts($default,$attributes); $map = <<
EOD; return $map; } add_shortcode('gmap','philosophy_google_map');