Skip to content

Commit 54ab86e

Browse files
Remove shortcodes from content and excerpt (#62)
* Remove shortcodes from content and excerpt * Prepare for v4.0.6 --------- Co-authored-by: irshadahmad21 <[email protected]>
1 parent e083e47 commit 54ab86e

File tree

9 files changed

+29
-8
lines changed

9 files changed

+29
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
**Requires at least:** 5.8
66
**Requires PHP:** 7.2
77
**Tested up to:** 6.1.1
8-
**Stable tag:** 4.0.5
8+
**Stable tag:** 4.0.6
99
**License:** GPLv2 or later
1010
**License URI:** [http://www.gnu.org/licenses/gpl-2.0.html](http://www.gnu.org/licenses/gpl-2.0.html)
1111

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project are documented in this file.
44

55
## Unreleased
66

7+
## [4.0.6 - 2023-03-2](https://github.com/wpsocio/wptelegram/releases/tag/v4.0.6)
8+
9+
### Bug fixes
10+
11+
- Fixed the issue of shortcodes being sent to Telegram
12+
713
## [4.0.5 - 2023-03-2](https://github.com/wpsocio/wptelegram/releases/tag/v4.0.5)
814

915
### Bug fixes

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wptelegram/core",
3-
"version": "4.0.5",
3+
"version": "4.0.6",
44
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
55
"require-dev": {
66
"wp-coding-standards/wpcs": "*"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wptelegram",
33
"title": "WP Telegram",
4-
"version": "4.0.5",
4+
"version": "4.0.6",
55
"description": "Integrate your WordPress site perfectly with Telegram with full control.",
66
"repository": {
77
"type": "git",

src/README.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: telegram, notifications, posts, channel, group
55
Requires at least: 5.8
66
Requires PHP: 7.2
77
Tested up to: 6.1.1
8-
Stable tag: 4.0.5
8+
Stable tag: 4.0.6
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -205,6 +205,9 @@ Yes, all you need to do is to setup **Private Notifications** module and use the
205205

206206
== Changelog ==
207207

208+
= 4.0.6 =
209+
- Fixed the issue of shortcodes being sent to Telegram
210+
208211
= 4.0.5 =
209212
- Fixed the unintended newlines in Post Excerpt and Post Content
210213

src/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project are documented in this file.
44

55
## Unreleased
66

7+
## [4.0.6 - 2023-03-2](https://github.com/wpsocio/wptelegram/releases/tag/v4.0.6)
8+
9+
### Bug fixes
10+
11+
- Fixed the issue of shortcodes being sent to Telegram
12+
713
## [4.0.5 - 2023-03-2](https://github.com/wpsocio/wptelegram/releases/tag/v4.0.5)
814

915
### Bug fixes

src/languages/wptelegram.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ msgid ""
44
msgstr ""
55
"Project-Id-Version: \n"
66
"Report-Msgid-Bugs-To: https://github.com/wpsocio/wptelegram\n"
7-
"POT-Creation-Date: 2023-03-02 04:15:11+00:00\n"
7+
"POT-Creation-Date: 2023-03-02 16:18:32+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"
11-
"PO-Revision-Date: 2023-03-2 4:150\n"
11+
"PO-Revision-Date: 2023-03-2 16:180\n"
1212
"Last-Translator: WP Telegram\n"
1313
"Language-Team: WP Telegram\n"
1414
"Language: en_US\n"

src/modules/p2tg/PostData.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public function get_field_value( $field, $options = [] ) {
178178
self::restore_autoembed_filter();
179179
}
180180

181+
// Remove shortcodes.
182+
$excerpt = trim( strip_shortcodes( $excerpt ) );
183+
181184
$value = Utils::prepare_content(
182185
$excerpt,
183186
[
@@ -207,6 +210,9 @@ public function get_field_value( $field, $options = [] ) {
207210
$content = apply_filters( 'the_content', $content );
208211
self::restore_autoembed_filter();
209212

213+
// Remove shortcodes.
214+
$content = trim( strip_shortcodes( $content ) );
215+
210216
$value = Utils::prepare_content(
211217
$content,
212218
[

src/wptelegram.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: WP Telegram
1111
* Plugin URI: https://t.me/WPTelegram
1212
* Description: Integrate your WordPress website perfectly with Telegram. Send posts automatically to Telegram when published or updated, whether to a Telegram Channel, Group or private chat, with full control. Get your email notifications on Telegram.
13-
* Version: 4.0.5
13+
* Version: 4.0.6
1414
* Requires at least: 5.8
1515
* Requires PHP: 7.2
1616
* Author: WP Socio
@@ -26,7 +26,7 @@
2626
die;
2727
}
2828

29-
define( 'WPTELEGRAM_VER', '4.0.5' );
29+
define( 'WPTELEGRAM_VER', '4.0.6' );
3030

3131
defined( 'WPTELEGRAM_MAIN_FILE' ) || define( 'WPTELEGRAM_MAIN_FILE', __FILE__ );
3232

0 commit comments

Comments
 (0)