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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dk129’s picture

  • Denes.Szabo committed 0d09848 on 7.x-2.x authored by dk129
    Issue #2272031 by dk129: Ctools plugins approach for shortcode types
    
Denes.Szabo’s picture

Status: Active » Fixed

@dk129 thx!

Denes.Szabo’s picture

Status: Fixed » Closed (fixed)