Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aldolat committed Nov 21, 2020
2 parents 613502b + f176c00 commit a10a0bd
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [6.3.1] - 2020-11-21
### Added
* Added new link to plugin line in the WordPress plugins management page.
### Updated
* Updated compatibility to WordPress 5.6.

## [6.3] - 2020-03-01
### Added
* Added support for user IDs in recipient option.
Expand Down Expand Up @@ -118,6 +124,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* First release of the plugin.

[Unreleased]: https://github.com/aldolat/private-content/commits/develop
[6.3.1]: https://github.com/aldolat/private-content/compare/6.3...6.3.1
[6.3]: https://github.com/aldolat/private-content/compare/6.2...6.3
[6.2]: https://github.com/aldolat/private-content/compare/6.1...6.2
[6.1]: https://github.com/aldolat/private-content/compare/6.0...6.1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
**Donate link:** <https://dev.aldolat.it/projects/private-content/>
**Tags:** content, private, shortcode
**Requires at least:** 3.0
**Tested up to:** 5.5
**Stable tag:** 6.3
**Tested up to:** 5.6
**Stable tag:** 6.3.1
**License:** GPLv3 or later
**License URI:** <https://www.gnu.org/licenses/gpl-3.0.html>

Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 6.3.1 =

* Added new link to plugin line in the WordPress plugins management page.
* Updated compatibility to WordPress 5.6.

= 6.3 =

* Added support for user IDs in recipient option.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ubn-private.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class UBN_Private {
*/
public function __construct() {
// Define the plugin version.
$this->plugin_version = '6.3';
$this->plugin_version = '6.3.1';
}

/**
Expand Down
20 changes: 18 additions & 2 deletions languages/private-content.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the Private content plugin.
msgid ""
msgstr ""
"Project-Id-Version: Private content 6.3\n"
"Project-Id-Version: Private content 6.3.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/private-content\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-03-01T15:36:25+01:00\n"
"POT-Creation-Date: 2020-11-21T18:02:06+01:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: private-content\n"
Expand All @@ -33,3 +33,19 @@ msgstr ""
#. Author URI of the plugin
msgid "https://www.aldolat.it/"
msgstr ""

#: private-content.php:124
msgid "Changelog"
msgstr ""

#: private-content.php:128
msgid "Documentation"
msgstr ""

#: private-content.php:132
msgid "PDF Documentation"
msgstr ""

#: private-content.php:136
msgid "Rate this plugin"
msgstr ""
71 changes: 66 additions & 5 deletions private-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Plugin URI: https://dev.aldolat.it/projects/private-content/
* Author: Aldo Latino
* Author URI: https://www.aldolat.it/
* Version: 6.3
* Version: 6.3.1
* License: GPLv3 or later
* Text Domain: private-content
* Domain Path: /languages/
Expand Down Expand Up @@ -59,11 +59,46 @@
}

/**
* Include the class.
* Launch Private Content.
*
* @since 5.1
* @since 1.0
*/
add_action( 'plugins_loaded', 'private_content_setup' );

/**
* Setup the plugin and fire the necessary files.
*
* @since 6.4
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-ubn-private.php';
function private_content_setup() {
/**
* Load the translation.
*
* @since 6.4
*/
load_plugin_textdomain( 'private-content', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );

/**
* Include the class.
*
* @since 5.1
*/
require_once plugin_dir_path( __FILE__ ) . 'includes/class-ubn-private.php';

/**
* Add links to plugins list line.
*
* @since 6.4
*/
add_filter( 'plugin_row_meta', 'private_content_add_links', 10, 2 );

/**
* Run the plugin.
*
* @since 6.4 Moved from root to the setup function.
*/
ubn_private_run();
}

/**
* Instantiate the object and run the plugin.
Expand All @@ -75,7 +110,33 @@ function ubn_private_run() {
$ubn_private->run();
}

ubn_private_run();
/**
* Add links to plugins list line.
*
* @param array $links The array containing links.
* @param string $file The path to the current file.
* @since 6.4
*/
function private_content_add_links( $links, $file ) {
if ( plugin_basename( __FILE__ ) === $file ) {
// Changelog.
$changelog_url = 'https://github.com/aldolat/private-content/blob/master/CHANGELOG.md';
$links[] = '<a target="_blank" href="' . $changelog_url . '">' . esc_html__( 'Changelog', 'private-content' ) . '</a>';

// Documentation.
$doc_url = 'https://github.com/aldolat/private-content/wiki';
$links[] = '<a target="_blank" href="' . $doc_url . '">' . esc_html__( 'Documentation', 'private-content' ) . '</a>';

// PDF Documentation.
$doc_url = 'https://github.com/aldolat/private-content/raw/master/documentation/private-content.pdf';
$links[] = '<a target="_blank" href="' . $doc_url . '">' . esc_html__( 'PDF Documentation', 'private-content' ) . '</a>';

// Reviews.
$rate_url = 'https://wordpress.org/support/plugin/' . basename( dirname( __FILE__ ) ) . '/reviews/#new-post';
$links[] = '<a target="_blank" href="' . $rate_url . '">' . esc_html__( 'Rate this plugin', 'private-content' ) . '</a>';
}
return $links;
}

/*
* CODE IS POETRY
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: aldolat, specialk, thewanderingbrit
Donate link: https://dev.aldolat.it/projects/private-content/
Tags: content, private, shortcode
Requires at least: 3.0
Tested up to: 5.5
Stable tag: 6.3
Tested up to: 5.6
Stable tag: 6.3.1
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down

0 comments on commit a10a0bd

Please sign in to comment.