-1
我正在嘗試使用簡碼創建一個非常簡單的插件,並且希望獲得此簡碼的標識。獲取簡碼wp插件的編號
我簡單的代碼是:
<?php
/*
Plugin Name: DEMO
Plugin URI: http://www.mydemo.com
Description: DEMO
Version: 0.1 BETA
Author: Paul McKnight
Author URI: http://www.mydemo.com
*/
function demol_handler() {
$demolph_output = demoplug_function();
return $demolph_output;
}
function demoplug_function() {
$demolp_output = "Hello Your Shortcode id is:"; Here i want to display my shortcodes Id
return $demolp_output;
}
add_shortcode("my_plugin", "demo_handler");
?>
這個簡單的插件,簡碼是[my_plugin][/my_plugin]
所以我想這個ID [my_plugin id=9876][/my_plugin]