Skip to content

Commit

Permalink
v1.1.3 - Merge pull request #9 from JoryHogeveen/dev
Browse files Browse the repository at this point in the history
v1.1.3
  • Loading branch information
JoryHogeveen authored Nov 13, 2017
2 parents 2dba143 + 74f93f3 commit 2cfc2a6
Show file tree
Hide file tree
Showing 14 changed files with 268 additions and 53 deletions.
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

# WordPress Coding Standards
# http://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
# end_of_line = crlf
indent_style = tab
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
# spaces_around_operators = true
# spaces_around_brackets = both

[*.txt]
trim_trailing_whitespace = false

[*.yml]
indent_style = space
indent_size = 2
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@keraweb.nl. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
32 changes: 32 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contribute to Widget Subtitles

Community made patches, localizations, bug reports, and contributions are always welcome and are crucial to ensure that this plugin remains alive and strong.

When contributing please ensure you follow the guidelines below so that we can keep on top of things.

## Getting Started

* Submit a ticket for your issue, assuming one does not already exist.
* https://github.com/JoryHogeveen/widget-subtitles/issues
* Clearly describe the issue including steps to reproduce the bug.
* Make sure you fill in the earliest version that you know has the issue as well as the version of WordPress you're using.

## Making Changes

* Fork the repository on GitHub
* Create a new branch, named with a issue prefix (if present) and some keywords on what is changed.
* Example: `#123-what-is-changed`.
* Make the changes to your forked repository's code
* When committing, reference your issue (if present) and include a note about the fix.
* Ensure you stick to the [WordPress Coding Standards](http://codex.wordpress.org/WordPress_Coding_Standards)
* This repository contains all files needed to properly configure your IDE with the correct coding standards and code style configuration.
* [PHP MD](https://github.com/JoryHogeveen/widget-subtitles/blob/master/tests/phpmd.xml)
* [PHP CS](https://github.com/JoryHogeveen/widget-subtitles/blob/master/tests/phpcs.xml)
* If the changes are a new feature make sure you add PHP Unit tests or at least contribute in creating tests.
* Push the changes to the branch you created and submit a pull request for the `dev` branch.

At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.

# Additional Resources
* [General GitHub documentation](http://help.github.com/)
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Expected Behavior


## Actual Behavior


## Steps to Reproduce the Problem

1.
1.
1.

## Specifications

- Plugin Version:
- WordPress Version:
- Other plugins installed:
- Theme:
- Browser:
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Fixes #

## Proposed Changes

-
-
-
32 changes: 24 additions & 8 deletions README.md → .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Add a customizable subtitle to your widgets
[![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&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest)

![Widget Subtitles](https://raw.githubusercontent.com/JoryHogeveen/widget-subtitles/master/.github/assets/banner-1544x500.jpg)

## 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.
Expand All @@ -22,10 +24,11 @@ Since 1.0

* **Default:** `span`
* **Parameters:**
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `WP_Widget` The widget type class. (since 1.1.3)
* **Return:** `string` A valid HTML element.

#### `widget_subtitles_classes`
Expand All @@ -34,10 +37,11 @@ Since 1.0

* **Default:** `array( 'widget-subtitle', 'widgetsubtitle', 'subtitle-{LOCATION}' );` *Where {LOCATION} stands for your selected location*.
* **Parameters:**
* `array` Default classes.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `WP_Widget` The widget type class. (since 1.1.3)
* **Return:** `array` An array of CSS classes.

#### `widget_subtitles_default_location`
Expand All @@ -58,6 +62,18 @@ Since 1.1.2

You can use these filters inside your theme functions.php file or in a plugin.

#### `widget_subtitles_available_locations`
Overwrites the available locations for a widget.
NOTE: You can currently only remove locations. New locations are not possible (yet).
Since 1.1.3

* **Default:** `after-inside`, `after-outside`, `before-inside`, `before-outside`.
* **Parameters:**
* `array` The array of available locations.
* `WP_Widget` The widget type class.
* `array` The widget instance.
* **Return:** `array` Filtered list of available locations for this widget.

## Installation

1. Upload `/widget-subtitles` to the `/wp-content/plugins/` directory
Expand Down
Binary file added .github/assets/banner-1544x500.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/banner-772x250.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/screenshot-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/screenshot-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 41 additions & 17 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ 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&currency_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.8
Stable tag: 1.1.2
Tested up to: 4.9
Requires PHP: 5.2.4
Stable tag: 1.1.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -20,10 +21,11 @@ Since 1.0

* **Default:** `span`
* **Parameters:**
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `WP_Widget` The widget type class. (since 1.1.3)
* **Return:** `string` A valid HTML element.

= Filter: `widget_subtitles_classes` =
Expand All @@ -32,10 +34,11 @@ Since 1.0

* **Default:** `array( 'widget-subtitle', 'widgetsubtitle', 'subtitle-{LOCATION}' );` *Where {LOCATION} stands for your selected location*.
* **Parameters:**
* `array` Default classes.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `string` Default element.
* `string` Widget ID, widget name + instance number.
* `string` Sidebar ID where this widget is located. (since 1.1)
* `array` All widget data. (since 1.1)
* `WP_Widget` The widget type class. (since 1.1.3)
* **Return:** `array` An array of CSS classes.

= Filter: `widget_subtitles_default_location` =
Expand All @@ -54,6 +57,18 @@ Since 1.1.2
* **Parameters:** `string` The default capability.
* **Return:** `string` The new capability.

= Filter: `widget_subtitles_available_locations` =
Overwrites the available locations for a widget.
NOTE: You can currently only remove locations. New locations are not possible (yet).
Since 1.1.3

* **Default:** `after-inside`, `after-outside`, `before-inside`, `before-outside`.
* **Parameters:**
* `array` The array of available locations.
* `WP_Widget` The widget type class.
* `array` The widget instance.
* **Return:** `array` Filtered list of available locations for this widget.

You can use these filters inside your theme functions.php file or in a plugin.

== Installation ==
Expand All @@ -72,27 +87,36 @@ Or search for "Widget Subtitles" via your plugins menu.

== Changelog ==

= 1.1.3 =

* **Feature:** new filter `widget_subtitles_available_locations`. Overwrites the available locations for a widget.
* **Enhancement:** Add fourth `WP_Widget` object parameter to the `widget_subtitles_element` and `widget_subtitles_classes` filters.
* **Enhancement:** JavaScript improvements.
* **Compatibility:** Tested with WordPress 4.9.

Detailed info: [PR on GitHub](https://github.com/JoryHogeveen/widget-subtitles/pull/9)

= 1.1.2 =

* Feature: new filter `widget_subtitles_default_location`. Sets the default location for subtitles.
* Feature: new filter `widget_subtitles_edit_location_capability`. Change the capability required to modify subtitle locations. [#8](https://github.com/JoryHogeveen/widget-subtitles/issues/8)
* Enhancement: Fix CodeClimate coding standards issues.
* **Feature:** new filter `widget_subtitles_default_location`. Sets the default location for subtitles.
* **Feature:** new filter `widget_subtitles_edit_location_capability`. Change the capability required to modify subtitle locations. [#8](https://github.com/JoryHogeveen/widget-subtitles/issues/8)
* **Enhancement:** Fix CodeClimate coding standards issues.
* Screenshots added

Detailed info: [PR on GitHub](https://github.com/JoryHogeveen/widget-subtitles/pull/7)

= 1.1.1 =

* Fixed code inspections from CodeClimate.
* Tested with WordPress 4.8.
* **Enhancement:** Fixed code inspections from CodeClimate.
* **Compatibility:** Tested with WordPress 4.8.

Detailed info: [PR on GitHub](https://github.com/JoryHogeveen/widget-subtitles/pull/5)

= 1.1 =
* Add extra parameters to the filter hooks.
* **Enhancement:** Add extra parameters to the filter hooks.

= 1.0.1 =
* Update textdomain hook.
* **Enhancement:** Update textdomain hook.

= 1.0 =
* First version.
Expand Down
Loading

0 comments on commit 2cfc2a6

Please sign in to comment.