Ocean Social Sharing - Version 1.0.3

Version Description

  • Register translation string.
Download this release

Release Info

Developer oceanwp
Plugin Icon 128x128 Ocean Social Sharing
Version 1.0.3
Comparing to
See all releases

Code changes from version 1.0.2 to 1.0.3

ocean-social-sharing.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Ocean Social Sharing
4
  * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/
5
  * Description: A simple plugin to add social share buttons to your posts.
6
- * Version: 1.0.2
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
@@ -86,12 +86,14 @@ final class Ocean_Social_Sharing {
86
  $this->token = 'ocean-social-sharing';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
- $this->version = '1.0.2';
90
 
91
  register_activation_hook( __FILE__, array( $this, 'install' ) );
92
 
93
  add_action( 'init', array( $this, 'oss_load_plugin_textdomain' ) );
94
 
 
 
95
  add_action( 'init', array( $this, 'oss_setup' ) );
96
  }
97
 
@@ -161,6 +163,17 @@ final class Ocean_Social_Sharing {
161
  update_option( $this->token . '-version', $this->version );
162
  }
163
 
 
 
 
 
 
 
 
 
 
 
 
164
  /**
165
  * Setup all the things.
166
  * Only executes if OceanWP or a child theme using OceanWP as a parent is active and the extension specific filter returns true.
@@ -391,4 +404,4 @@ final class Ocean_Social_Sharing {
391
 
392
  }
393
 
394
- } // End Class
3
  * Plugin Name: Ocean Social Sharing
4
  * Plugin URI: https://oceanwp.org/extension/ocean-social-sharing/
5
  * Description: A simple plugin to add social share buttons to your posts.
6
+ * Version: 1.0.3
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.0.0
86
  $this->token = 'ocean-social-sharing';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
+ $this->version = '1.0.3';
90
 
91
  register_activation_hook( __FILE__, array( $this, 'install' ) );
92
 
93
  add_action( 'init', array( $this, 'oss_load_plugin_textdomain' ) );
94
 
95
+ add_filter( 'ocean_register_tm_strings', array( $this, 'register_tm_strings' ) );
96
+
97
  add_action( 'init', array( $this, 'oss_setup' ) );
98
  }
99
 
163
  update_option( $this->token . '-version', $this->version );
164
  }
165
 
166
+ /**
167
+ * Register translation strings
168
+ */
169
+ public static function register_tm_strings( $strings ) {
170
+
171
+ $strings['oss_social_share_heading'] = 'Please Share This';
172
+
173
+ return $strings;
174
+
175
+ }
176
+
177
  /**
178
  * Setup all the things.
179
  * Only executes if OceanWP or a child theme using OceanWP as a parent is active and the extension specific filter returns true.
404
 
405
  }
406
 
407
+ } // End Class
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: oceanwp
3
  Tags: social, social sharing, social share, share, oceanwp
4
  Requires at least: 3.5
5
  Tested up to: 4.7.2
6
- Stable tag: 1.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,6 +11,7 @@ A simple plugin to add social share buttons to your posts.
11
 
12
  == Description ==
13
 
 
14
  This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed.
15
 
16
  == Installation ==
@@ -31,6 +32,9 @@ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
31
 
32
  == Changelog ==
33
 
 
 
 
34
  = 1.0.2 =
35
  - Multicheck field replaced by sortable control, now you can change positioning of the social buttons.
36
  - Support OceanWP 1.1.
3
  Tags: social, social sharing, social share, share, oceanwp
4
  Requires at least: 3.5
5
  Tested up to: 4.7.2
6
+ Stable tag: 1.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ A simple plugin to add social share buttons to your posts.
15
  This plugin requires the [OceanWP](https://oceanwp.org/) theme to be installed.
16
 
17
  == Installation ==
32
 
33
  == Changelog ==
34
 
35
+ = 1.0.3 =
36
+ - Register translation string.
37
+
38
  = 1.0.2 =
39
  - Multicheck field replaced by sortable control, now you can change positioning of the social buttons.
40
  - Support OceanWP 1.1.
template/social-share.php CHANGED
@@ -24,8 +24,7 @@ if ( empty( $sites ) ) {
24
  }
25
 
26
  // Declare main vars
27
- $heading = get_theme_mod( 'oss_social_share_heading' );
28
- $heading = $heading ? $heading : esc_html__( 'Please Share This', 'ocean-social-sharing' );
29
  $post_id = get_the_ID();
30
  $url = apply_filters( 'oss_social_share_url', get_permalink( $post_id ) );
31
  $title = get_the_title(); ?>
24
  }
25
 
26
  // Declare main vars
27
+ $heading = oceanwp_tm_translation( 'oss_social_share_heading', get_theme_mod( 'oss_social_share_heading', 'Please Share This' ) );
 
28
  $post_id = get_the_ID();
29
  $url = apply_filters( 'oss_social_share_url', get_permalink( $post_id ) );
30
  $title = get_the_title(); ?>