Callback functionality to better handle full html output
-
Dear Gagan
greetings from the land of the Tamils.
I hope this message finds you well. I wanted to share with you some development I did on your plugin….
I wanted a little more flexibility in using your new Shortcode menu item which is very user friendly but limited when needing more functionality to implement full html output.
So I decided to add a similar menu item as yours based on PHP Callback functionality.
You can find a copy of my changes in GitHub which I can labelled v2.1-callback.
Feel free to use if you think this is a good idea ??
Usage is very simple: you add the following text to the description field:
Callback=my_function
key1=value1
key2=value2
key3=value3and this will call a function:
my_function($nav_label, $title, $link_target, $args){ //do something }
where the
$nav_label
is the Navigation Label fileld value, the$title
is the Title field value, and$link_target
is thetarget
attribute value for the<a>
link element.$args
is array with key/value pairs passed in the description, namely `(‘key1’=>’value1′,’key2’=>’value2′,’key3’=>’value3’) as given above.
- The topic ‘Callback functionality to better handle full html output’ is closed to new replies.