Skip to content

Commit

Permalink
Version bumped to 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chwnam committed Dec 3, 2021
1 parent a8cf13a commit addc9bb
Show file tree
Hide file tree
Showing 15 changed files with 176 additions and 102 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.4.1
-----
2021-12-03
- New service added: Pocket
- Fix fatal error when using shortcode 'nss' without any parameters.
- Minor code fixes.
- README update.


0.4.0
-----
2021-11-29
Expand Down
209 changes: 142 additions & 67 deletions README.md

Large diffs are not rendered by default.

Binary file modified assets/img/nss-logo.xcf
Binary file not shown.
Binary file added assets/img/pocket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/js/front.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
window.PinUtils.pinAny();
}
},
pocket(s) {
this.openPopup('https://widgets.getpocket.com/v1/popup?url=' + encodeURIComponent(s.permalink));
},
telegram(s) {
this.openPopup('https://t.me/share/url?url=' + encodeURIComponent(s.permalink) + '&text=' + encodeURIComponent(s.title))
},
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"php": "^7.4",
"ext-json": "*"
},
"version": "0.4.0",
"version": "0.4.1",
"require-dev": {
"phpunit/phpunit": "^7"
},
Expand Down
2 changes: 2 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function nss_get_available_services(): array {
'linkedIn' => __( 'LinkedIn', 'nss' ),
'naverBlog' => __( 'Naver Blog', 'nss' ),
'pinterest' => __( 'Pinterest', 'nss' ),
'pocket' => __( 'Pocket', 'nss' ),
'telegram' => __( 'Telegram', 'nss' ),
'twitter' => __( 'Twitter', 'nss' ),
] );
Expand All @@ -47,6 +48,7 @@ function nss_get_icon_sets(): array {
'linkedIn' => $img_url . 'linked-in.png',
'naverBlog' => $img_url . 'naver-blog.png',
'pinterest' => $img_url . 'pinterest.png',
'pocket' => $img_url . 'pocket.png',
'telegram' => $img_url . 'telegram.png',
'twitter' => $img_url . 'twitter.png',
],
Expand Down
4 changes: 2 additions & 2 deletions includes/modules/class-nss-front.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ public function is_sharable(): bool {
*
* @callback
*
* @param array|string $atts
* @param array|string $atts An empty string when the shortcode is used without parameters.
*
* @return string
* @see NSS_Register_Shortcode::get_items()
*/
public function handle_shortcode( $atts ): string {
return is_singular() ? $this->render_buttons( $atts ) : '';
return $this->render_buttons( $atts ?: [] );
}

/**
Expand Down
2 changes: 0 additions & 2 deletions includes/modules/class-nss-registers.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* @property-read NSS_Register_Script $script
* @property-read NSS_Register_Shortcode $shortcode
* @property-read NSS_Register_Style $style
* @property-read NSS_Register_Uninstall $uninstall
*/
class NSS_Registers implements NSS_Module {
use NSS_Submodule_Impl;
Expand All @@ -33,7 +32,6 @@ public function __construct() {
'script' => NSS_Register_Script::class,
'shortcode' => NSS_Register_Shortcode::class,
'style' => NSS_Register_Style::class,
'uninstall' => function () { return new NSS_Register_Uninstall(); },
]
);
}
Expand Down
2 changes: 1 addition & 1 deletion includes/modules/class-nss-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function ( string $item ) {
$output['post_types'] = array_unique(
array_filter(
array_map(
function ( $v ) { return sanitize_key( $v ); },
'sanitize_key',
(array) ( $_POST[ $option_name ]['post_types'] ?? [] )
)
)
Expand Down
21 changes: 0 additions & 21 deletions includes/registers/class-nss-register-uninstall.php

This file was deleted.

4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Naran Social Share
* Plugin URI: https://github.com/chwnam/naran-social-share
* Description: Share your posts to social media, and so on.
* Version: 0.4.0
* Version: 0.4.1
* Requires at least: 4.4.0
* Requires PHP: 7.4
* Author: changwoo
Expand All @@ -23,7 +23,7 @@
require_once __DIR__ . '/vendor/autoload.php';

const NSS_MAIN_FILE = __FILE__;
const NSS_VERSION = '0.4.0';
const NSS_VERSION = '0.4.1';
const NSS_PRIORITY = 885;

nss();
Binary file modified languages/nss-ko_KR.mo
Binary file not shown.
10 changes: 7 additions & 3 deletions languages/nss-ko_KR.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Project-Id-Version: Naran Social Share 0.1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/naran-social-"
"share\n"
"POT-Creation-Date: 2021-11-29T11:24:32+09:00\n"
"PO-Revision-Date: 2021-11-29 11:25+0900\n"
"POT-Creation-Date: 2021-12-03T15:47:41+09:00\n"
"PO-Revision-Date: 2021-12-03 15:48+0900\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ko_KR\n"
Expand Down Expand Up @@ -85,10 +85,14 @@ msgid "Pinterest"
msgstr "핀터레스트"

#: includes/functions.php:24
msgid "Pocket"
msgstr "포켓"

#: includes/functions.php:25
msgid "Telegram"
msgstr "텔레그램"

#: includes/functions.php:25
#: includes/functions.php:26
msgid "Twitter"
msgstr "트위터"

Expand Down
10 changes: 7 additions & 3 deletions languages/nss.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPL v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Naran Social Share 0.3.0\n"
"Project-Id-Version: Naran Social Share 0.4.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/naran-social-share\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2021-11-29T11:24:32+09:00\n"
"POT-Creation-Date: 2021-12-03T15:47:41+09:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Domain: nss\n"
Expand Down Expand Up @@ -82,10 +82,14 @@ msgid "Pinterest"
msgstr ""

#: includes/functions.php:24
msgid "Telegram"
msgid "Pocket"
msgstr ""

#: includes/functions.php:25
msgid "Telegram"
msgstr ""

#: includes/functions.php:26
msgid "Twitter"
msgstr ""

Expand Down

0 comments on commit addc9bb

Please sign in to comment.