Simple Image Widget
[resolved] Filter or another way to change the title of the widget in admin (2 posts)

  1. suzt808
    Posted 2 years ago #

    I'd like to change the name "Image" that is shown in the admin widget area.
    This change is to make it more obvious for the client's usecase.
    Is there a filter available to change that ? Or is there another recommended method that will allow for updates ?



  2. Brady Vercher
    Plugin Author

    Posted 2 years ago #

    Hi there. A filter doesn't exist for changing the widget title, but you can easily create your own custom widget by extending this widget. Something like this might work (untested):

    if ( class_exists( 'Simple_Image_Widget' ) ) {
    	function myprefix_widgets_init() {
    			// Register the widget.
    			register_widget( 'My_Image_Widget' );
    	add_action( 'widgets_init', 'myprefix_widgets_init' );
    	class My_Image_Widget extends Simple_Image_Widget {
    		function __construct() {
    			$widget_options = array( 'classname' => 'widget_my_image', 'description' => 'Not yours.' );
    			parent::__construct( 'my-image', 'My Image Widget', $widget_options );

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Image Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic