• I need to modify widget titles ($options[‘title’]) using a plugin.

    Where should I add such a filter or action to?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The plugin itself has no filter or actions at this time, I’m sorry. I can’t understand why you need to modify that title by actions or filters, by the way, but feel free to open an enhancement ticket for Gengo.

    Bests.

    Thread Starter LostInNetwork

    (@lostinnetwork)

    Oh, sorry. I wasn’t clear enough…

    I meant all the widgets in general: The pages, categories, archives, blogroll, meta, text widgets, Wp-polls widget, Event Calendar 3 widgets, all of these.

    When I customize the name of a widget, then its new name is fixed and thus in one language only.

    If I choose finnish titles for the sidebar widgets, then no english speaking will understand them. If I choose english names, then the site looks really ugly as it comprises two languages in some mixture. And then I need to throw swedish in, too…

    Making a multilingual site really means translating the whole user interface…

    Hence I am looking for some place in WordPress itself to do this.

    I allready tried to use gengo_snippet(‘$title’); in the description, but the result is: gengo_snippet(\\\’$title\\\’);

    ps. Should I just hack include/wp-widgets.php to remove that escaping?

    I though that widget titles were localized, but I can’t say it for sure. If not, probably you’ll have to hack them directly. I’ll have a look at it sooner or later, but actually I can’t help you, sorry.

    Thread Starter LostInNetwork

    (@lostinnetwork)

    Yes, widget titles are localized – until you edit them in the admin panel. If you want a custom title, then that is no longer localized.

    I want to rename “Categories” to “Posts”, or maybe something else.

    My WordPress installation serves static pages and the blog is only used as an information channel for upcoming events. Hence, “categories” does not really mean anything to the reader. Posts/Announcements/Events/… means.

    Ok, but to make this change you just need to have a different translation file for WordPress, and Gengo can’t do nothing for you ??

    https://codex.www.ads-software.com/Translating_WordPress

    Just get the .pot file, change to what you like, and deploy your own language. That’s all.

    My reasons for wanting a hook are different from yours, but the Widget Logic plugin gave me exactly what I needed with its optional widget_content filter.

    (In my case, I need to do some different styling on the first word of the widget title, so I used the filter to parse and wrap in the appropriate class.)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Where to add a filter/action to modify widget titles?’ is closed to new replies.