Skip to content

Instantly share code, notes, and snippets.

@hasinhayder
Created July 29, 2018 16:35
Show Gist options
  • Save hasinhayder/256969fb0ddacb50a454cc647eeb2ad9 to your computer and use it in GitHub Desktop.
Save hasinhayder/256969fb0ddacb50a454cc647eeb2ad9 to your computer and use it in GitHub Desktop.
শর্টকোডের UI বিল্ডার এবং ওয়ার্ডপ্রেসের এডিটরের মাঝেই শর্টকোডের ভিজ্যুয়াল আউটপুট দেখা
<?php
function philosophy_google_map_ui() {
$fields = array(
array(
'label'=>__('Place','philosophy'),
'attr'=>'place',
'type'=>'text',
'meta'=>array(
'placeholder'=>__('Place','philosophy')
)
),array(
'label'=>__('Width','philosophy'),
'attr'=>'width',
'type'=>'text',
),array(
'label'=>__('Height','philosophy'),
'attr'=>'height',
'type'=>'text',
),array(
'label'=>__('Zoom','philosophy'),
'attr'=>'zoom',
'type'=>'text',
)
);
$settings = array(
'label'=>__('Google Map','philosophy'),
'listItemImage'=>'dashicons-admin-site',
'post_type'=>array('post','page'),
'attrs'=>$fields
);
shortcode_ui_register_for_shortcode('gmap',$settings);
}
add_action( 'register_shortcode_ui', 'philosophy_google_map_ui' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment