From 44e731a10cd1dd0a0ae44cc00500f025e5fd6148 Mon Sep 17 00:00:00 2001 From: Matthew Spencer Date: Tue, 4 Nov 2014 12:48:39 -0500 Subject: [PATCH 1/2] Add filters for returned values --- sranalytics.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sranalytics.php b/sranalytics.php index cb8526c..959e40e 100644 --- a/sranalytics.php +++ b/sranalytics.php @@ -161,12 +161,12 @@ function sranalytics_insert_js() { 'version' => SRANALYTICS_PLUGIN_VERSION, 'pid' => esc_js( $sranalytics_pid ), 'iframe' => esc_js( $sranalytics_disable_iframe_loading ), - 'title' => esc_js( $title ), - 'url' => esc_js( $canonical_url ), - 'date' => esc_js( $published_date ), - 'channels' => array_map( 'esc_js', $channels ), - 'tags' => array_map( 'esc_js', $tags ), - 'authors' => array_map( 'esc_js', $authors ), + 'title' => esc_js( apply_filters( 'sranalytics_title', $title ) ), + 'url' => esc_js( apply_filters( 'sranalytics_url', $canonical_url ) ), + 'date' => esc_js( apply_filters( 'sranalytics_date', $published_date ) ), + 'channels' => array_map( 'esc_js', apply_filters( 'sranalytics_channels', $channels ) ), + 'tags' => array_map( 'esc_js', apply_filters( 'sranalytics_tags', $tags ) ), + 'authors' => array_map( 'esc_js', apply_filters( 'sranalytics_authors', $authors ) ), ); // Get the JS ready to go From 5e5508ebad1c262faf47af13c3a4ebc5d6b06da0 Mon Sep 17 00:00:00 2001 From: Matthew Spencer Date: Tue, 4 Nov 2014 12:48:55 -0500 Subject: [PATCH 2/2] Bump version --- readme.txt | 5 ++++- sranalytics.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 896c724..1ad97b3 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Plugin Name: SimpleReach Analytics Plugin URI: https://github.com/simplereach/sranalytics_wordpress Requires at least: 3.0 Tested up to: 4.0.0-beta-2 -Stable tag: 0.1.3 +Stable tag: 0.1.4 SimpleReach Analytics finds trending articles and gives publishers deep insights into their social traffic. @@ -17,6 +17,9 @@ SimpleReach Analytics finds trending articles and gives publishers deep insights == Changelog == += 0.1.4 = +* Add filters for values: title, url, date, channels, tags, and authors + = 0.1.3 = * Updates for compatibility with WordPress VIP diff --git a/sranalytics.php b/sranalytics.php index 959e40e..7eb830d 100644 --- a/sranalytics.php +++ b/sranalytics.php @@ -4,7 +4,7 @@ Plugin URI: http://www.simplereach.com/docs/wordpress-plugin/ Text Domain: sranalytics Description: After installation, you must click 'Settings → SimpleReach Analytics' to turn on the Analytics. - Version: 0.1.2 + Version: 0.1.4 Author: SimpleReach Author URI: https://www.simplereach.com */ @@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -define( 'SRANALYTICS_PLUGIN_VERSION', '0.1.3' ); +define( 'SRANALYTICS_PLUGIN_VERSION', '0.1.4' ); /** * Insert analytics code onto the post page