Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Wordpress shortcode
- function rusho_alert_shortcode($atts, $content = null){
- extract(shortcode_atts(array(
- 'city' => ''
- ),$atts));
- if($city == 'Dhaka'){
- $message = ''.esc_html($city).' is the most populated city';
- }elseif ($city == 'Sylhet'){
- $message = ''.esc_html($city).' is the most beautiful city';
- }elseif ($city == 'Barishal'){
- $message = ''.esc_html($city).' is the city of river';
- }else {
- $message = 'You didn\'t mention the city';
- }
- return $message;
- }
- add_shortcode('alert','rusho_alert_shortcode');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement