Hi,
It would be good if we have each shortcode to be a ctools plugin, which is easier to control and extend, I have made one module to have this structure: https://drupal.org/sandbox/dk129/2244035
My approach in that module will be a filter with cache = false but still reuse shortcode module utility api like shortcode tag processing.
Main difference is I have a central class to invoke process callback and tips callback which are defined in the ctools plugin
Problem is to have my module functions correctly I have to comment out this line of code:
//shortcode.module:85
if ($enabled && !empty($shortcodes[$name]['tips callback']) && is_string($shortcodes[$name]['tips callback']) && function_exists($shortcodes[$name]['tips callback']))
to be
//shortcode.module:85
if ($enabled && !empty($shortcodes[$name]['tips callback']))
Reason is the two conditions of checking function as a string and existed blocks the extensibility of other php callable
Can you please make this to shortcode core, i believe this will let the other module extend your module much easier (ctools plugins based),
Tks
Comment | File | Size | Author |
---|---|---|---|
#1 | shortcode-2272031-php-callable-possibility.patch | 967 bytes | dk129 |
Comments
Comment #1
dk129 CreditAttribution: dk129 commentedComment #3
Denes.Szabo CreditAttribution: Denes.Szabo commented@dk129 thx!
Comment #4
Denes.Szabo CreditAttribution: Denes.Szabo commented