Skip to content

Commit

Permalink
Merge pull request #51 from Codeinwp/remove_track
Browse files Browse the repository at this point in the history
* Added new SDK features.
* Fixed some edge case issues on image parsing.
  • Loading branch information
selul authored May 29, 2017
2 parents 15b82da + c63d9a5 commit 9d38c60
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 132 deletions.
2 changes: 1 addition & 1 deletion css/feedzy-rss-feeds.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* feedzy-rss-feeds.css
* Feedzy RSS Feed
* Copyright: (c) 2016 Themeisle, themeisle.com
* Version: 3.1.2
* Version: 3.1.3
* Plugin Name: FEEDZY RSS Feeds
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
* Author: Themeisle
Expand Down
2 changes: 1 addition & 1 deletion feedzy-rss-feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: Feedzy RSS Feeds Lite
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
* Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
* Version: 3.1.2
* Version: 3.1.3
* Author: Themeisle
* Author URI: http://themeisle.com
* License: GPL-2.0+
Expand Down
2 changes: 1 addition & 1 deletion includes/abstract/feedzy-rss-feeds-admin-abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -681,13 +681,13 @@ public function feedzy_retrieve_image( $item ) {
if ( empty( $theThumbnail ) ) {
$feedDescription = $item->get_content();
$theThumbnail = $this->feedzy_return_image( $feedDescription );

}
// Description image
if ( empty( $theThumbnail ) ) {
$feedDescription = $item->get_description();
$theThumbnail = $this->feedzy_return_image( $feedDescription );
}

return $theThumbnail;
}

Expand Down
85 changes: 2 additions & 83 deletions includes/admin/feedzy-rss-feeds-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,66 +98,6 @@ public function enqueue_scripts() {

}

/**
* Ajax endpoint for url tracking.
*
* @since 3.0.12
* @access public
*/
public function track_url() {
check_admin_referer( 'feedzy-track', 'nonce' );
$status = $_POST['status'];
if ( $status == 'yes' ) {
update_option( 'feedzy_logger_flag', 'yes' );
} else {
update_option( 'feedzy_logger_flag', 'no' );
}
wp_send_json_success( array(
'status' => $status,
) );
}

/**
* Adds tracking box to the edit screen
*
* @since 3.0.12
* @access public
*/
public function enable_tracking() {
$checked = get_option( 'feedzy_logger_flag', 'no' ) === 'yes' ? 'checked' : '';
?>
<div class="feedzy-tracking"><label class="feedzy-switch" style="display: inline-block;"><input type="checkbox"
onchange="return toggel_track();" <?php echo $checked; ?>>
<div class="feedzy-track visualizer-round"></div>
</label><span><?php _e( 'Enable Tracking', 'feedzy-rss-feeds' ); ?> <sup>*</sup></span>
<p>
<small><sup>*</sup><?php _e( 'Allow Themeisle to anonymously track how this plugin is used and help us make the
plugin better. No sensitive data is tracked.', 'feedzy-rss-feeds' ); ?>
</small>
</p>
</div>
<script type="text/javascript">
function toggel_track() {

var check_status = jQuery('.feedzy-switch input').is(':checked');

var data = {
'action': 'track_url',
'nonce': '<?php echo wp_create_nonce( 'feedzy-track' ); ?>',
'status': ( check_status ) ? 'yes' : 'no'
};

// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
jQuery.post(ajaxurl, data, function (response) {
console.log(response);
});

return true;
}
</script>
<?php
}

/**
* Method to register custom post type for
* Feedzy RSS Feeds Categories.
Expand Down Expand Up @@ -187,7 +127,7 @@ public function register_post_type() {
'public' => true,
'exclude_from_search' => true,
'publicly_queryable' => false,
'show_in_nav_menus' => false,
'show_in_nav_menus' => false,
'capability_type' => 'post',
'rewrite' => array( 'slug' => 'feedzy-category' ),
'show_in_menu' => 'feedzy-admin-menu',
Expand All @@ -209,16 +149,6 @@ public function add_feedzy_post_type_metaboxes() {
$this,
'feedzy_category_feed',
), 'feedzy_categories', 'normal', 'high' );
if ( ! class_exists( 'Feedzy_Rss_Feeds_Pro' ) ) {
add_meta_box(
'feedzy_categories_enable_tracking', __( 'Contribute to Feedzy RSS Feeds', 'feedzy-rss-feeds' ),
array(
$this,
'enable_tracking',
),
'feedzy_categories', 'side'
);
}
}

/**
Expand Down Expand Up @@ -352,7 +282,7 @@ public function feedzy_filter_plugin_row_meta( $links, $file ) {
'doc' => '<a href="http://docs.themeisle.com/article/277-feedzy-rss-feeds-hooks" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>',
'more_features' => '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank" title="' . __( 'More Plugins', 'feedzy-rss-feeds' ) . '">' . __( 'More Features', 'feedzy-rss-feeds' ) . '<i class="dashicons dashicons-unlock more-features-icon"></i></a>',
);
$links = array_merge( $links, $new_links );
$links = array_merge( $links, $new_links );
}

return $links;
Expand Down Expand Up @@ -380,15 +310,4 @@ public function feedzy_menu_pages() {
}
}
}

/**
* Track the feedzy rss feeds usage.
*
* @since 3.0.12
* @access public
* @return bool Either we should track or not.
*/
public function check_logger() {
return ( get_option( 'feedzy_logger_flag', 'no' ) === 'yes' );
}
}
7 changes: 6 additions & 1 deletion includes/feedzy-rss-feeds-activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ class Feedzy_Rss_Feeds_Activator {
* @access public
*/
public static function activate() {
$options = get_option( Feedzy_Rss_Feeds::get_plugin_name(), array() );
$options = get_option( Feedzy_Rss_Feeds::get_plugin_name(), array() );
$old_logger_option = get_option( 'feedzy_logger_flag', 'no' );
if ( $old_logger_option == 'yes' ) {
update_option( 'feedzy_rss_feeds_logger_flag', 'yes' );
update_option( 'feedzy_logger_flag', 'no' );
}
if ( ! isset( $options['is_new'] ) ) {
update_option( Feedzy_Rss_Feeds::get_plugin_name(), array(
'is_new' => 'yes',
Expand Down
5 changes: 1 addition & 4 deletions includes/feedzy-rss-feeds.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static function instance() {
*/
public function init() {
self::$plugin_name = 'feedzy-rss-feeds';
self::$version = '3.1.2';
self::$version = '3.1.3';
self::$instance->load_dependencies();
self::$instance->set_locale();
self::$instance->define_admin_hooks();
Expand Down Expand Up @@ -194,9 +194,6 @@ private function define_admin_hooks() {
self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );

self::$instance->loader->add_filter( 'feedzy_rss_feeds_logger_flag', self::$instance->admin, 'check_logger', 10, 2 );
self::$instance->loader->add_action( 'wp_ajax_track_url', self::$instance->admin, 'track_url' );

self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
self::$instance->loader->add_filter( 'mce_external_languages', $plugin_ui, 'feedzy_add_tinymce_lang', 10, 1 );
self::$instance->loader->add_filter( 'plugin_row_meta', self::$instance->admin, 'feedzy_filter_plugin_row_meta', 10, 2 );
Expand Down
69 changes: 29 additions & 40 deletions languages/feedzy-rss-feeds.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GPL-2.0+.
msgid ""
msgstr ""
"Project-Id-Version: Feedzy RSS Feeds Lite 3.1.1\n"
"Project-Id-Version: Feedzy RSS Feeds Lite 3.1.2\n"
"Report-Msgid-Bugs-To: https://github.com/Codeinwp/feedzy-rss-feeds/issues\n"
"POT-Creation-Date: 2017-05-25 13:42:35+00:00\n"
"POT-Creation-Date: 2017-05-29 10:20:44+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down Expand Up @@ -50,102 +50,87 @@ msgstr ""
msgid "at"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:132
msgid "Enable Tracking"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:134
msgid ""
"Allow Themeisle to anonymously track how this plugin is used and help us "
"make the\n"
"\t\t\t\t\tplugin better. No sensitive data is tracked."
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:170
#: includes/admin/feedzy-rss-feeds-admin.php:110
msgid "Feed Categories"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:171
#: includes/admin/feedzy-rss-feeds-admin.php:111
msgid "Feed Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:172
#: includes/admin/feedzy-rss-feeds-admin.php:173
#: includes/admin/feedzy-rss-feeds-admin.php:112
#: includes/admin/feedzy-rss-feeds-admin.php:113
msgid "Add Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:174
#: includes/admin/feedzy-rss-feeds-admin.php:114
msgid "Edit Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:175
#: includes/admin/feedzy-rss-feeds-admin.php:115
msgid "New Feed Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:176
#: includes/admin/feedzy-rss-feeds-admin.php:116
msgid "View Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:177
#: includes/admin/feedzy-rss-feeds-admin.php:117
msgid "Search Category"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:178
#: includes/admin/feedzy-rss-feeds-admin.php:118
msgid "No categories found"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:179
#: includes/admin/feedzy-rss-feeds-admin.php:119
msgid "No categories in the trash"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:208
#: includes/admin/feedzy-rss-feeds-admin.php:148
msgid "Category Feeds"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:214
msgid "Contribute to Feedzy RSS Feeds"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:238
#: includes/admin/feedzy-rss-feeds-admin.php:168
msgid "Place your URL's here followed by a comma."
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:299
#: includes/admin/feedzy-rss-feeds-admin.php:229
msgid "Category Title"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:300
#: includes/admin/feedzy-rss-feeds-admin.php:303
#: includes/admin/feedzy-rss-feeds-admin.php:230
#: includes/admin/feedzy-rss-feeds-admin.php:233
msgid "Slug"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:327
#: includes/admin/feedzy-rss-feeds-admin.php:257
msgid "Undefined"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:352
#: includes/admin/feedzy-rss-feeds-admin.php:282
msgid "Documentation and examples"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:353
#: includes/admin/feedzy-rss-feeds-admin.php:283
msgid "More Plugins"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:353
#: includes/admin/feedzy-rss-feeds-admin.php:371
#: includes/admin/feedzy-rss-feeds-admin.php:283
#: includes/admin/feedzy-rss-feeds-admin.php:301
msgid "More Features"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:369
#: includes/admin/feedzy-rss-feeds-admin.php:299
#: includes/admin/feedzy-wp-widget.php:40
msgid "Feedzy RSS Feeds"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:369
#: includes/admin/feedzy-rss-feeds-admin.php:299
msgid "Feedzy RSS"
msgstr ""

#: includes/admin/feedzy-rss-feeds-admin.php:379
#: includes/admin/feedzy-rss-feeds-admin.php:309
msgid "Import Posts"
msgstr ""

Expand Down Expand Up @@ -383,6 +368,10 @@ msgid ""
"stop, OK to update."
msgstr ""

#: vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php:189
msgid "Install"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "Feedzy RSS Feeds Lite"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feedzy-rss-feeds",
"version": "3.1.2",
"version": "3.1.3",
"description": "Feedzy RSS Feeds Lite",
"repository": {
"type": "git",
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ http://docs.themeisle.com/article/638-how-to-eliminate-duplicate-feed-item

== Changelog ==

= 3.1.3 - 29/05/2017 =
* Added new SDK features.
* Fixed some edge case issues on image parsing.

= 3.1.2 - 22/05/2017 =
* Fixed author protocol.
* Added core fetch_feed method.
Expand Down

0 comments on commit 9d38c60

Please sign in to comment.