WordPress plugin intelligence profile

Duplicate Widget

A widget that can act as a duplicate of another widget (for synchronized use in another sidebar)

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 3.4
Current version1.0.2
WordPress coverageTested up to WordPress 3.4
Minimum stackWP 3.1 · PHP —
Directory statusactive
Last directory update28 Nov 20178y ago
Active installations1K+Adoption metric — not a quality score
WordPress.org rating4.3 / 5 from 12 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Duplicate Widget version 1.0.2 as active, updated 8y ago and tested up to WordPress 3.4.

Overview

About this plugin

A widget that can act as a duplicate of another widget (for synchronized use in another sidebar)

Define a widget once, use it in multiple sidebars. This saves you from having to manually configure each copy of the widget and later having to worry about keeping them in sync should you ever need to make any changes. Particularly useful for those who define logic in their themes to conditionally include different versions of a sidebar depending on what template is being shown.

Depending on use, it is an alternative to plugins that introduce in-widget logic to determine when widgets should be visible (Widget Logic, Section Widget, Conditional Widgets, etc).

Quick overview of what this plugin does:

  • Adds a widget called “Duplicate”. The widget’s only setting is a dropdown listing all active widgets. The selected widget will be the widget duplicated by the duplicate widget.
  • A duplicate widget shows the same title and content as its source widget, even if those values later get changed in the source widget.
  • A widget can be duplicated any number of times and can appear multiple times within the same page. (Yes, even within the same sidebar, though why would you do that?)
  • A duplicate widget will abide by the configuration of the sidebar it is placed in, not the configuration of the sidebar containing the source widget. So it uses ‘before_widget’, ‘after_widget’, ‘before_title’, ‘after_title’ values of its own sidebar.
  • Widgets that are duplicated will have “[D]” prepended to their name in the widget titlebar in the admin to denote they have duplicates. Also, at the bottom of the widget’s configuration form (when the widget is expanded), a short blurb also explains that the widget has duplicate(s) and a count of how many duplicates it has.
  • If a widget is deactivated or deleted, if it has any duplicates, they get deleted as well.
  • The widget id and widget type of the source widget are included as HTML classes in the duplicate widget’s markup.

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Filters

The plugin exposes four actions for hooking. php file, or used by another plugin.

c2c_before_duplicate_widget (action)

The ‘c2c_before_duplicate_widget’ hook allows you to output text, or perform some sort of action, just before the output of the duplicate widget.

Arguments:

  • $instance (array): The settings for the widget instance (namely: title and widget_to_duplicate)
  • $args (array): The configuration for the widget and sidebar

Example:

// Output an opening <div> before duplicate widget content add_action( 'c2c_before_duplicate_widget', 'my_c2c_before_duplicate_widget', 10, 2 ); function my_c2c_before_duplicate_widget( $instance, $args ) { echo '<div class="a_duplicate_widget">; }

c2c_after_duplicate_widget (action)

The ‘c2c_after_duplicate_widget’ hook allows you to output text, or perform some sort of action, just after the output of the duplicate widget.

Arguments:

  • $instance (array): The settings for the widget instance (namely: title and widget_to_duplicate)
  • $args (array): The configuration for the widget and sidebar

Example:

// Output an closing </div> after duplicate widget content add_action( 'c2c_after_duplicate_widget', 'my_c2c_after_duplicate_widget', 10, 2 ); function my_c2c_after_duplicate_widget( $instance, $args ) { echo '</div>; }

c2c_before_duplicate_widget_form (action)

The ‘c2c_before_duplicate_widget_form’ hook allows you to output text, or perform some sort of action, just before the output of the duplicate widget’s configuration form (in the WP admin).

Arguments:

  • $instance (array): The settings for the widget instance (namely: title and widget_to_duplicate)

Example:

</p>'; }

c2c_after_duplicate_widget_form (action)

The ‘c2c_after_duplicate_widget_form’ hook allows you to output text, or perform some sort of action, just after the output of the duplicate widget’s configuration form (in the WP admin).

Arguments:

  • $instance (array): The settings for the widget instance (namely: title and widget_to_duplicate)

Example:

</p>'; }

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • coffee2code
  • duplicate
  • sidebar
  • widget
  • widgets
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 3.4

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 3.4.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to3.4
Minimum requirementsWordPress 3.1 · PHP not listed
Update activity28 Nov 20178y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.