diff --git a/README.md b/README.md new file mode 100644 index 0000000..810e19c --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# Widget Subtitles # +Add a customizable subtitle to your widgets + +[![WordPress Plugin version](https://img.shields.io/wordpress/plugin/v/widget-subtitles.svg?style=flat)](https://wordpress.org/plugins/widget-subtitles/) +[![WordPress Plugin WP tested version](https://img.shields.io/wordpress/v/widget-subtitles.svg?style=flat)](https://wordpress.org/plugins/widget-subtitles/) +[![WordPress Plugin downloads](https://img.shields.io/wordpress/plugin/dt/widget-subtitles.svg?style=flat)](https://wordpress.org/plugins/widget-subtitles/) +[![WordPress Plugin rating](https://img.shields.io/wordpress/plugin/r/widget-subtitles.svg?style=flat)](https://wordpress.org/plugins/widget-subtitles/) +[![Travis](https://secure.travis-ci.org/JoryHogeveen/widget-subtitles.png?branch=master)](http://travis-ci.org/JoryHogeveen/widget-subtitles) +[![License](https://img.shields.io/badge/license-GPL--2.0%2B-green.svg)](https://github.com/JoryHogeveen/widget-subtitles/blob/master/license.txt) +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YGPLMLU7XQ9E8&lc=NL&item_name=Widget%20Subtitles&item_number=JWPP%2dWS¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest) + +## Description + +This plugin adds a subtitle input field to all your widgets. You can also change the location of the subtitle and even use filters to change the subtitle output. + +### Filters + +#### `widget_subtitles_element` +Allows you to change the HTML element for the subtitle + +* **Default:** span +* **Parameters:** + * string (default) + * string (widget id) + * string (sidebar id) + * array (widget data) + +#### `widget_subtitles_classes` +Allows you to change the HTML element for the subtitle + +* **Default:** `array( 'widget-subtitle', 'widgetsubtitle', 'subtitle-LOCATION' );` Where LOCATION stands for your selected location +* **Parameters:** + * array (default classes) + * string (widget id) + * string (sidebar id) + * array (widget data) + +## Installation + +1. Upload `/widget-subtitles` to the `/wp-content/plugins/` directory +2. Activate the plugin through the *Plugins* menu in WordPress +3. Go to *Appearance* > *Widgets* menu and fill out your subtitles diff --git a/readme.txt b/readme.txt index 3759479..06a9fb1 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: keraweb Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YGPLMLU7XQ9E8&lc=NL&item_name=Widget%20Subtitles&item_number=JWPP%2dWS¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest Tags: widget, widget subtitle, subtitle, subtitles, sub title, sidebar Requires at least: 3.0 -Tested up to: 4.6 -Stable tag: 1.0.1 +Tested up to: 4.7 +Stable tag: 1.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -18,13 +18,21 @@ This plugin adds a subtitle input field to all your widgets. You can also change Allows you to change the HTML element for the subtitle * **Default:** span -* **Parameters:** string (default), int (widget id) +* **Parameters:** + * string (default) + * string (widget id) + * string (sidebar id) + * array (widget data) = Filter: `widget_subtitles_classes` = Allows you to change the HTML element for the subtitle * **Default:** `array( 'widget-subtitle', 'widgetsubtitle', 'subtitle-LOCATION' );` Where LOCATION stands for your selected location -* **Parameters:** array (default classes), int (widget id) +* **Parameters:** + * array (default classes) + * string (widget id) + * string (sidebar id) + * array (widget data) == Installation == @@ -34,6 +42,9 @@ Allows you to change the HTML element for the subtitle == Changelog == += 1.1 = +* Add extra parameters to the filter hooks + = 1.0.1 = * Update textdomain hook diff --git a/widget-subtitles.php b/widget-subtitles.php index 80b3722..94226e6 100644 --- a/widget-subtitles.php +++ b/widget-subtitles.php @@ -2,13 +2,13 @@ /** * Plugin Name: Widget Subtitles * Description: Add a customizable subtitle to your widgets - * Plugin URI: http://github.com/JoryHogeveen/widget-subtitles - * Version: 1.0.1 - * Author: Jory Hogeveen - * Author URI: http://www.keraweb.nl + * Plugin URI: http://github.com/JoryHogeveen/widget-subtitles + * Version: 1.1 + * Author: Jory Hogeveen + * Author URI: http://www.keraweb.nl * Text Domain: widget-subtitles * Domain Path: /languages - * License: GNU General Public License v2 or later + * License: GNU General Public License v2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html */ @@ -111,7 +111,7 @@ function in_widget_form( $widget, $return, $instance ) {
-