• I have written a plugin which filters as follows:

    add_filter(‘the_content’, array($this, ‘number_text’));
    add_filter(‘the_title’, array($this, ‘number_text’));
    add_filter(‘widget_text’, array($this, ‘number_text’));
    add_filter(‘widget_title’, array($this, ‘number_text’));
    add_filter(‘bloginfo’, array($this, ‘number_text_in_bloginfo’), 10, 2);

    I would like also to be able to apply the filter function to text entered into 3rd party themes where they have text fields in theme support.

    For example, in the theme support for the freely available responsive theme, there are fields called headline, subheadline and content area. Is there a filter I can hook into that will apply the transformation in my filter to the text in those fields?

    Regards,
    Bruce/bugmagnet.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I don’t think you’re going to find any generic filter. Every theme will be doing its own thing and there’s no standard nomenclature for the fields in a theme’s options.

    Thread Starter bugmagnet

    (@bugmagnet)

    Hmmm … so at what point in the processing of a page does the theme’s options get evaluated? Does this content become part of the_content or does it fall into some other named bucket?

    at what point in the processing of a page does the theme’s options get evaluated

    Again – that’s going to be specific to the theme. Personally, I load all of the theme options as part of an initial setup function that is hooked into after_setup_theme but, again, there’s no best practice documentation on this so individual themes may vary.

    Thread Starter bugmagnet

    (@bugmagnet)

    Well, that’s at least given me an idea of where to go with the client’s theme. Thanks very much for your helpful advice.

    No problem ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Filtering text in theme support modules’ is closed to new replies.