Skip to content

Commit

Permalink
Version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldhuereca committed Mar 26, 2023
1 parent 5637c52 commit 5120eda
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions highlight-and-share.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin URI: https://has.dlxplugins.com
* Description: Select text, inline highlight, or use a Click to Share block and show social networks.
* Author: DLX Plugins
* Version: 4.2.4
* Version: 4.3.0
* Requires at least: 5.1
* Requires PHP: 7.2
* Author URI: https://dlxplugins.com
Expand All @@ -17,7 +17,7 @@

namespace DLXPlugins\HAS;

define( 'HIGHLIGHT_AND_SHARE_VERSION', '4.2.4' );
define( 'HIGHLIGHT_AND_SHARE_VERSION', '4.3.0' );
define( 'HIGHLIGHT_AND_SHARE_FILE', __FILE__ );

// Support for site-level autoloading.
Expand Down
6 changes: 4 additions & 2 deletions php/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,16 +468,18 @@ public function frontend( $attributes, $content ) {
public function get_legacy_frontend( $attributes ) {
ob_start();
global $post;
$share_content = wp_strip_all_tags( $attributes['shareText'] );
$share_content_trimmed = preg_replace( '/\n+/', "\n\n", trim( $share_content ) ); // Replace newline chars with single newline.
?>
<div class='has-click-to-share' style="padding: <?php echo esc_attr( $attributes['padding'] ); ?>px; border: <?php echo esc_attr( $attributes['border'] . 'px solid ' . $attributes['borderColor'] ); ?>; border-radius: <?php echo esc_attr( $attributes['borderRadius'] ); ?>px; background-color: <?php echo esc_attr( $attributes['backgroundColor'] ); ?>; color: <?php echo esc_attr( $attributes['textColor'] ); ?>; max-width: <?php echo esc_attr( $attributes['maxWidth'] ); ?>%; margin-left: <?php echo esc_attr( $attributes['marginLeft'] ); ?>px; margin-right: <?php echo esc_attr( $attributes['marginRight'] ); ?>px; margin-bottom: <?php echo esc_attr( $attributes['marginBottom'] ); ?>px; margin-Top: <?php echo esc_attr( $attributes['marginTop'] ); ?>px; <?php echo 'center' === $attributes['alignment'] ? 'margin: ' . esc_attr( $attributes['marginTop'] ) . 'px auto ' . esc_attr( $attributes['marginBottom'] ) . 'px auto;' : ''; ?><?php echo 'left' === $attributes['alignment'] ? 'float: left;' : ''; ?><?php echo 'right' === $attributes['alignment'] ? 'float: right;' : ''; ?>">
<div class="has-click-to-share-wrapper">
<div class="has-click-to-share-text" style="color: <?php echo esc_attr( $attributes['textColor'] ); ?>; font-size: <?php echo esc_attr( $attributes['fontSize'] ); ?>px; font-weight: <?php echo esc_attr( $attributes['fontWeight'] ); ?>">
<div class="has-click-to-share-text" style="color: <?php echo esc_attr( $attributes['textColor'] ); ?>; font-size: <?php echo esc_attr( $attributes['fontSize'] ); ?>px; font-weight: <?php echo esc_attr( $attributes['fontWeight'] ); ?>" data-text-full="<?php echo esc_attr( $share_content_trimmed ); ?>">
<?php echo wp_kses_post( $attributes['shareText'] ); ?>
</div>
<div class='has-click-to-share-cta' style="font-size: <?php echo esc_attr( $attributes['clickShareFontSize'] ); ?>px; color: <?php echo esc_attr( $attributes['textColor'] ); ?>">
<?php echo wp_kses_post( $attributes['clickText'] ); ?> <svg width="<?php echo esc_attr( $attributes['clickShareFontSize'] ); ?>px" height="<?php echo esc_attr( $attributes['clickShareFontSize'] ); ?>px" class="has-cts-block-icon"><use xlink:href="#has-share-icon"></use></svg>
</div>
<a class="has-click-prompt" href="#" data-title="<?php echo esc_attr( $post->post_title ); ?>" data-url="<?php echo esc_url( get_permalink( $post->ID ) ); ?>">
<a class="has-click-prompt" href="#" data-title="<?php echo esc_attr( $post->post_title ); ?>" data-url="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" data-text-full="<?php echo esc_attr( $share_content_trimmed ); ?>">
</a>
</div>
</div>
Expand Down
18 changes: 14 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
=== Highlight and Share - Inline Highlighting and Click to Share ===
=== Highlight and Share ===
Contributors: ronalfy
Tags: highlight, social sharing, click to tweet, sharing, highlight text
Requires at least: 5.1
Tested up to: 6.2
Stable tag: 4.2.4
Stable tag: 4.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://github.com/sponsors/DLXPlugins
Expand All @@ -14,6 +14,8 @@ Easily Show Social Networks When Users Interact With Your Site's Text

Meet your readers at your content.

> <a href="https://app.instawp.io/launch?t=highlight-and-share&d=v1">View a Fully Featured Demo via InstaWP</a>

Show social network options when users interact with your text (<a href="https://docs.dlxplugins.com/v/highlight-and-share/getting-started/how-highlight-and-share-works">find out how Highlight and Share works</a>).

Highlight and Share has the following major features:
Expand Down Expand Up @@ -108,6 +110,14 @@ So far, the latest versions of Chrome, Firefox, Safari, Edge, and IE9+.

== Changelog ==

= 4.3.0 =
* Released 2023-03-26
* New Feature: Set tooltips for inline highlighting, including the ability to customize the label, bakground color, and text color.
* New Feature: Customize the email subject, email body, and modal title when sending emails.
* New Feature: Customize the share text using a new toolbar option in the Click to Share block.
* Bug fix: Legacy Click to Share output was returning null or empty on the frontend.
* Bug fix: The Click to Share block was not showing the share text.

= 4.2.2 =
* Released 2023-03-21
* New Feature: Can set the wrapper CSS classes to avoid layout issues.
Expand Down Expand Up @@ -436,5 +446,5 @@ So far, the latest versions of Chrome, Firefox, Safari, Edge, and IE9+.

== Upgrade Notice ==

= 4.2.2 =
New Feature: Can set the wrapper CSS classes to avoid layout issues.
= 4.3.0 =
Version 4.3.0 was released on March 26, 2023, and includes new features such as the ability to set tooltips for inline highlighting with customization options for label, background color, and text color, as well as the ability to customize the email subject, body, and modal title when sending emails. Another new feature is the ability to customize the share text using a toolbar option in the Click to Share block. This version also includes bug fixes for the legacy Click to Share output returning null or empty on the frontend and the Click to Share block not showing the share text.

0 comments on commit 5120eda

Please sign in to comment.