وضاحت
The plugin take all of the data registered and created a multi-dimensional
array in an option called ‘_shortcodes’. Existing shortcodes that WP is away of
are also stored here with just their name and callback.
A few static methods for checking on shortcode info are provided.
GetShortcodeAtts($shortcode_name)
ShortcodeInPost($shortcode_name, $post_id)
Creating a new media button in the editor is easy with the add_media_button()
method. Just pass your shortcode name, attributes, a page title, introductory
text, and an icon image url.
انسٽاليشن
- Upload
wp-shortcodes-api.phpto the/wp-content/plugins/directory - Activate the plugin through the ‘Plugins’ menu in WordPress
-
example implementation:
if (class_exists('WP_Shortcodes_API')) { WP_Shortcodes_API::GetInstance()-> add_shortcode($shortcode_name, $callback)-> add_att($att_name)-> add_att($att_name2)-> add_media_button(array( 'shortcode' => $shortcode_name, 'title' => $thickbox_title, 'icon_url' => $button_icon_url, 'intro' => $introduction_to_form, 'input_atts' => WP_Shortcodes_API::GetShortcodeAtts($shortcode_name) )); } else { // fallback if the plugin is unavailable. add_shortcode($shorcode_name, $callback); }
جائزا
ھن پلگ ان لاءِ ڪي به رايا ناھن.
تعاون ڪندڙ & ڊولپرز
“WP Shortcodes API” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو آھي.
تعاون ڪندڙترجمو ڪريو “WP Shortcodes API” توهان جي ٻولي ۾.
ڊولپمينٽ ۾ دلچسپي؟
ڪوڊ براؤز ڪريو، چيڪ ڪريو SVN مخزن، يا رڪنيت حاصل ڪريو ڊولپمينٽ لاگ پاران RSS.
لاگ تبدیل ڪريو
0.1
Initial release.
