Filter
- widget_text (for the text)
- widget_title (for the title)
Example
function add_smiley($content) {
$new_content="";
$new_content.= $content . ':)';
return $new_content;
}
add_filter('widget_text', 'add_smiley');
Note that this works only for the content so not if you have a widget with only a title.
Reference
Related Posts:
- Customizer: widget-synced triggers twice
- Hook called before text widget save
- Create Widget or Enable Shortcodes in Sidebar
- Set widget icon in Customizer?
- Objective Best Practices for Plugin Development? [closed]
- How do i best handle custom plugin page actions?
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Plugin Form Submission Best Practice
- Best way to abort plugin in case of insufficient PHP version?
- Update widget form after drag-and-drop (WP save bug)
- Custom Widget function in Plugin not working?
- How can I configure Docker for developing and deploying a custom theme?
- What do you think about custom designed plugin/theme options UIs?
- No Error Log File, no debug info
- Adding Widget form fields dynamically
- Where to put third party PHP library?
- Is the new WordPress 3.1 admin bar pluggable and how can I extend it?
- How to use PanelColorSettings in custom Gutenberg block?
- Getting a peer review for my new plugin?
- What is the correct way to build a widget using OOP
- Optimize shortcode callbacks
- Widget development – Drop down options won’t save
- How to integrate a PHP webmail script into the backend of WordPress?
- Calling the widget id of a mult-instance widget from inside the widget?
- Using filters and actions for plugin API?
- How to Change the Entire WordPress Admin panel Look and Feel?
- How to log plugin errors to plugin error_log file
- Which to use to execute code during the saving of a plugin settings page?
- Allowing for multiple template views on the Gallery Settings page when using the Visual Editor
- Add content to widget title in admin area within the widget?
- Has anyone managed to integrate the wp_editor inside a widget?
- Using Primary Color in Plugin Block
- When is it appropriate to put functions on page template vs. functions.php?
- Custom theme sufficient or custom plugin neccessary for this feature set?
- Help adding image upload functionality to widget
- Using preg_replace to clean widget output HTML
- Edit the output of wp_widget_rss_output()
- When to check if a function exists
- Script to remove all inactive widgets?
- How to create custom home page via plugin?
- Adding callback function for wp_ajax_ has no effect
- Sessions not creating correctly in custom function
- Possible to preset a widget’s contents via a plugin script?
- Featured Image not showing in admin
- Multiple entries in get_option results? or why is _multiwidget set to 1?
- How to use wp_set_password in a plugin?
- How to add multiple copies of a widget from “available widgets”
- Install widget on plugin activation
- Using Ajax call in jQuery doesn’t work in widget
- WordPress select dropdown list in widget
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- Created Widget Not Showing up on Admin Panel
- Using $wpdb object in a widget
- Nuance in adding CPT and TAX to a submenu
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- Delete a specific item menu when I deactivate my plugin
- Dynamic content in a widget
- How to pass custom options from widget form to widget update callback?
- Broken markup when using the_excerpt() in a widget?
- Are we allowed to use the Allman (BSD) indent style when coding WordPress plugins and themes?
- Tips for targeting widget dragable for WP Pointer on widgets.php page
- How to create custom field in worpdress default widgets?
- PHP 7 – Class Method Compatibility Issue
- Widget Admin – Form Submit Event?
- Get the password key when using the wp_new_user_notification_email filter
- How to save WP widget instances and options
- Order properties should not be accessed directly
- Can I individually style items in the backend widget list?
- Sidebar widget to show popular post not working?
- Widget update function not saving values
- How to deal with equal & similar arguments for a function?
- Executing a function upon webhook calling wordpress
- Add custom element ID depending where the widget place is, sidebar or footer
- WordPress not working on localhost
- Adding functions to hooks from within a class
- how to use hook deleted_user into custom function to delete user from custom table
- Disable The Events Calendar plugin from loading its scripts
- Where to store the name of a custom table?
- Applying OO patterns and principles to plugin development
- WordPress is automatically linking plain text email addresses
- Is Using WordPress Supplied WYSIWYG Advisable?
- ServerSideRender and Media Object: attributes passing image data object to php renderer even though it’s not set
- Plugin translations not installed but… strings are translated!
- Add a class to a dynamic sidebar’s wrapper
- Is it possible to change a term slug before being saved to the database?
- Widget is to be compatible with all themes
- Maximum lifetime for nonce
- Clearing caches on plugin uninstall
- How to use a hook to override an update_post_meta call in a plugin?
- Add code inside specific wordpress standard function
- Custom Taxonomy to dropdown box on adminside wordpress
- Create a free scripts and styles template within a plugin
- Extending the WP_Widget_Text class
- How to modify the comments to be displayed in a post?
- How can I turn a custom wordpress page into a product page?