Commit 6e8ea2cb authored by lucha's avatar lucha

[auto] plugin: wordpress-popular-posts 4.0.12

parent 2db3304d
......@@ -1138,6 +1138,35 @@ class WPP_Admin {
*/
public function upgrade_check(){
// Multisite setup, upgrade all sites
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
global $wpdb;
$original_blog_id = get_current_blog_id();
$blogs_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
foreach( $blogs_ids as $blog_id ) {
switch_to_blog( $blog_id );
$this->upgrade_site();
}
// Switch back to current blog
switch_to_blog( $original_blog_id );
}
else {
$this->upgrade_site();
}
} // end upgrade_check
/**
* Upgrades single site.
*
* @since 4.0.7
*/
private function upgrade_site() {
// Get WPP version
$wpp_ver = get_option( 'wpp_ver' );
......@@ -1146,8 +1175,7 @@ class WPP_Admin {
} elseif ( version_compare( $wpp_ver, $this->version, '<' ) ) {
$this->upgrade();
}
} // end upgrade_check
}
/**
* On plugin upgrade, performs a number of actions: update WPP database tables structures (if needed),
......@@ -1173,11 +1201,31 @@ class WPP_Admin {
// Validate the structure of the tables, create missing tables / fields if necessary
WPP_Activator::track_new_site();
// Update data table structure and indexes
$dataFields = $wpdb->get_results( "SHOW FIELDS FROM {$prefix}data;" );
foreach ( $dataFields as $column ) {
if ( "day" == $column->Field ) {
$wpdb->query( "ALTER TABLE {$prefix}data ALTER COLUMN day DROP DEFAULT;" );
}
if ( "last_viewed" == $column->Field ) {
$wpdb->query( "ALTER TABLE {$prefix}data ALTER COLUMN last_viewed DROP DEFAULT;" );
}
}
// Update summary table structure and indexes
$summaryFields = $wpdb->get_results( "SHOW FIELDS FROM {$prefix}summary;" );
foreach ( $summaryFields as $column ) {
if ( "last_viewed" == $column->Field ) {
$wpdb->query( "ALTER TABLE {$prefix}summary CHANGE last_viewed view_datetime datetime NOT NULL DEFAULT '0000-00-00 00:00:00', ADD KEY view_datetime (view_datetime);" );
$wpdb->query( "ALTER TABLE {$prefix}summary CHANGE last_viewed view_datetime datetime NOT NULL, ADD KEY view_datetime (view_datetime);" );
}
if ( "view_date" == $column->Field ) {
$wpdb->query( "ALTER TABLE {$prefix}summary ALTER COLUMN view_date DROP DEFAULT;" );
}
if ( "view_datetime" == $column->Field ) {
$wpdb->query( "ALTER TABLE {$prefix}summary ALTER COLUMN view_datetime DROP DEFAULT;" );
}
}
......
......@@ -956,7 +956,7 @@ if ( !$wpp_rand = get_option("wpp_rand") ) {
<tr>
<td><strong>post_html</strong></td>
<td><?php _e('Sets the HTML structure of each post', 'wordpress-popular-posts'); ?></td>
<td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('displays thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('displays thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('displays thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('displays linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('displays post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('displays the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('displays post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('displays post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('outputs the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('displays post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('displays linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('displays linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('displays linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('displays views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('displays comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('displays post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)</td>
<td><?php _e('Text string, custom HTML', 'wordpress-popular-posts'); ?>.<br /><br /><strong><?php _e('Available Content Tags', 'wordpress-popular-posts'); ?>:</strong> <br /><br /><em>{thumb}</em> (<?php _e('returns thumbnail linked to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_img}</em> (<?php _e('returns thumbnail image without linking to post/page, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{thumb_url}</em> (<?php _e('returns thumbnail url, requires thumbnail_width & thumbnail_height', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{title}</em> (<?php _e('returns linked post/page title', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{pid}</em> (<?php _e('returns the post/page ID', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{summary}</em> (<?php _e('returns post/page excerpt, and requires excerpt_length to be greater than 0', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{stats}</em> (<?php _e('returns the default stats tags', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{rating}</em> (<?php _e('returns post/page current rating, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{score}</em> (<?php _e('returns post/page current rating as an integer, requires WP-PostRatings installed and enabled', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{url}</em> (<?php _e('returns the URL of the post/page', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{text_title}</em> (<?php _e('returns post/page title, no link', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{author}</em> (<?php _e('returns linked author name, requires stats_author=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{category}</em> (<?php _e('returns linked category name, requires stats_category=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{taxonomy}</em> (<?php _e('returns linked taxonomy names, requires stats_taxonomy=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{views}</em> (<?php _e('returns views count only, no text', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{comments}</em> (<?php _e('returns comments count only, no text, requires stats_comments=1', 'wordpress-popular-posts'); ?>)<br /><br /> <em>{date}</em> (<?php _e('returns post/page date, requires stats_date=1', 'wordpress-popular-posts'); ?>)</td>
<td>&lt;li&gt;{thumb} {title} &lt;span class="wpp-meta post-stats"&gt;{stats}&lt;/span&gt;&lt;/li&gt;</td>
<td><strong><?php _e('With wpp_get_mostpopular():', 'wordpress-popular-posts'); ?></strong><br /><br />&lt;?php<br />$args = array(<br />&nbsp;&nbsp;&nbsp;&nbsp;'post_html' => '&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;'<br />);<br /><br />wpp_get_mostpopular( $args );<br />?&gt;<br /><br /><hr /><br /><strong><?php _e('With the [wpp] shortcode:', 'wordpress-popular-posts'); ?></strong><br /><br />[wpp post_html='&lt;li&gt;{thumb} &lt;a href="{url}"&gt;{text_title}&lt;/a&gt;&lt;/li&gt;']<br /><br /></td>
</tr>
......@@ -976,6 +976,8 @@ if ( !$wpp_rand = get_option("wpp_rand") ) {
$plugin_names = array();
foreach( $site_plugins as $main_file => $plugin_meta ) :
if ( !is_plugin_active( $main_file ) )
continue;
$plugin_names[] = sanitize_text_field( $plugin_meta['Name'] . ' ' . $plugin_meta['Version'] );
endforeach;
?>
......@@ -985,7 +987,8 @@ if ( !$wpp_rand = get_option("wpp_rand") ) {
<p><strong>Database version:</strong> <?php echo $wpdb->get_var( "SELECT VERSION();" ); ?></p>
<p><strong>InnoDB availability:</strong> <?php echo $wpdb->get_var( "SELECT SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE = 'InnoDB';" ); ?></p>
<p><strong>WordPress version:</strong> <?php echo $wp_version; ?></p>
<p><strong>Installed plugins:</strong> <?php echo implode( ', ', $plugin_names ); ?></p>
<p><strong>Multisite:</strong> <?php echo ( function_exists( 'is_multisite' ) && is_multisite() ) ? 'Yes' : 'No'; ?></p>
<p><strong>Active plugins:</strong> <?php echo implode( ', ', $plugin_names ); ?></p>
<p><strong>Theme:</strong> <?php echo $my_theme->get( 'Name' ) . ' (' . $my_theme->get( 'Version' ) . ') by ' . $my_theme->get( 'Author' ); ?></p>
</div>
<!-- End debug -->
......
......@@ -108,8 +108,8 @@ class WPP_Activator {
$sql = "
CREATE TABLE {$prefix}data (
postid bigint(20) NOT NULL,
day datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
last_viewed datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
day datetime NOT NULL,
last_viewed datetime NOT NULL,
pageviews bigint(20) DEFAULT 1,
PRIMARY KEY (postid)
) {$charset_collate} ENGINE=InnoDB;
......@@ -117,8 +117,8 @@ class WPP_Activator {
ID bigint(20) NOT NULL AUTO_INCREMENT,
postid bigint(20) NOT NULL,
pageviews bigint(20) NOT NULL DEFAULT 1,
view_date date NOT NULL DEFAULT '0000-00-00',
view_datetime datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
view_date date NOT NULL,
view_datetime datetime NOT NULL,
PRIMARY KEY (ID),
KEY postid (postid),
KEY view_date (view_date),
......
......@@ -239,7 +239,7 @@ class WPP_Image {
// ELSE
// image file path is invalid
return $this->render_image($this->default_thumbnail, $size, 'wpp-thumbnail wpp_imgeditor_error wpp_' . $image_meta['source'], null, $image->get_error_message());
return $this->render_image( $this->default_thumbnail, array( $image_meta['width'], $image_meta['height'] ), 'wpp-thumbnail wpp_imgeditor_error wpp_' . $image_meta['source'], null, $image->get_error_message() );
} // end image_resize
......
......@@ -143,7 +143,7 @@ class WPP_Output {
$postID = $post_object->id;
// Permalink
$permalink = get_permalink( $postID );
$permalink = $this->get_permalink( $post_object );
// Thumbnail
$post_thumbnail = $this->get_thumbnail( $post_object );
......@@ -257,6 +257,26 @@ class WPP_Output {
}
/**
* Return the permalink.
*
* @since 4.0.12
* @access private
* @param object $post_object
* @return string
*/
private function get_permalink( stdClass $post_object ) {
$translate = WPP_translate::get_instance();
$trid = $translate->get_object_id( $post_object->id, get_post_type( $post_object->id ) );
if ( $post_object->id != $trid ) {
return get_permalink( $trid );
}
return get_permalink( $post_object->id );
}
/**
* Return the processed post/page title.
*
......
......@@ -30,6 +30,7 @@ class WPP_Settings {
'widget_options' => array(
'title' => '',
'limit' => 10,
'offset' => 0,
'range' => 'daily',
'time_unit' => 'hour',
'time_quantity' => 24,
......
......@@ -112,6 +112,7 @@ class WPP_Widget extends WP_Widget {
}, function( response ){
widget_container.children("p.wpp-loader").remove();
widget_container.append(response);
widget_container.trigger('wpp-onload');
}
);
......@@ -212,10 +213,10 @@ class WPP_Widget extends WP_Widget {
$ids = array_filter( explode( ",", rtrim(preg_replace( '|[^0-9,]|', '', $new_instance['uid'] ), ",") ), 'is_numeric' );
// Got no valid IDs, clear
if ( empty( $ids ) ) {
$instance['uid'] = '';
$instance['author'] = '';
}
else {
$instance['uid'] = implode( ",", $ids );
$instance['author'] = implode( ",", $ids );
}
$instance['shorten_title']['words'] = $new_instance['shorten_title-words'];
......@@ -364,24 +365,28 @@ class WPP_Widget extends WP_Widget {
$time = 60 * 60 * 24 * 365;
break;
$expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
default:
$time = 60 * 60;
break;
// Store transient
set_transient( $transient_name, $popular_posts, $expiration );
}
// Store transient in WPP transients array for garbage collection
$wpp_transients = get_option('wpp_transients');
$expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
if ( !$wpp_transients ) {
$wpp_transients = array( $transient_name );
add_option( 'wpp_transients', $wpp_transients );
} else {
if ( !in_array($transient_name, $wpp_transients) ) {
$wpp_transients[] = $transient_name;
update_option( 'wpp_transients', $wpp_transients );
}
}
// Store transient
set_transient( $transient_name, $popular_posts, $expiration );
// Store transient in WPP transients array for garbage collection
$wpp_transients = get_option('wpp_transients');
if ( !$wpp_transients ) {
$wpp_transients = array( $transient_name );
add_option( 'wpp_transients', $wpp_transients );
} else {
if ( !in_array($transient_name, $wpp_transients) ) {
$wpp_transients[] = $transient_name;
update_option( 'wpp_transients', $wpp_transients );
}
}
}
......@@ -398,8 +403,13 @@ class WPP_Widget extends WP_Widget {
}
if ( defined('DOING_AJAX') && DOING_AJAX && !is_preview() )
if (
defined('DOING_AJAX')
&& DOING_AJAX && !is_preview()
&& !( is_singular() && isset( $_GET['fl_builder'] ) )
) {
wp_die();
}
}
......
......@@ -28,7 +28,7 @@ class WordPressPopularPosts {
public function __construct(){
$this->plugin_name = 'wordpress-popular-posts';
$this->version = '4.0.6';
$this->version = '4.0.12';
$this->load_dependencies();
$this->set_locale();
......@@ -125,7 +125,7 @@ class WordPressPopularPosts {
// Check admin notices
$this->loader->add_action( 'admin_notices', $plugin_admin, 'check_admin_notices' );
// Upgrade check
$this->loader->add_action( 'init', $plugin_admin, 'upgrade_check' );
$this->loader->add_action( 'admin_head', $plugin_admin, 'upgrade_check' );
// Hook fired when a new blog is activated on WP Multisite
$this->loader->add_action( 'wpmu_new_blog', $plugin_admin, 'activate_new_site' );
// Hook fired when a blog is deleted on WP Multisite
......
......@@ -72,7 +72,7 @@ if ( $taxonomies = get_taxonomies( array('public' => true), 'objects' ) ) {
}
?>
<label for="<?php echo $this->get_field_id( 'uid' ); ?>"><?php _e('Author ID(s)', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-authors-ids-for" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small>
<label for="<?php echo $this->get_field_id( 'uid' ); ?>"><?php _e('Author ID(s)', 'wordpress-popular-posts'); ?>:</label> <small>[<a href="https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#what-is-author-ids-for" title="<?php _e('What is this?', 'wordpress-popular-posts'); ?>" target="_blank">?</a>]</small>
<input type="text" id="<?php echo $this->get_field_id( 'uid' ); ?>" name="<?php echo $this->get_field_name( 'uid' ); ?>" value="<?php echo $instance['author']; ?>" class="widefat" /><br /><br />
<!-- Post features -->
......
......@@ -102,7 +102,7 @@ class WPP_Public {
|| ( 2 == $this->admin_options['tools']['log']['level'] && is_user_logged_in() )
) {
wp_register_script( 'wpp-tracking', plugin_dir_url( __FILE__ ) . 'js/tracking.js', array(), $this->version, false );
wp_register_script( 'wpp-js', plugin_dir_url( __FILE__ ) . 'js/wpp.js', array(), $this->version, false );
$params = array(
'sampling_active' => $this->admin_options['tools']['sampling']['active'],
......@@ -112,9 +112,9 @@ class WPP_Public {
'ID' => $is_single,
'token' => wp_create_nonce( 'wpp-token' )
);
wp_localize_script( 'wpp-tracking', 'wpp_params', $params );
wp_localize_script( 'wpp-js', 'wpp_params', $params );
wp_enqueue_script( 'wpp-tracking' );
wp_enqueue_script( 'wpp-js' );
}
......@@ -242,6 +242,7 @@ class WPP_Public {
/**
* @var string $header
* @var int $limit
* @var int $offset
* @var string $range
* @var bool $freshness
* @var string $order_by
......@@ -273,6 +274,7 @@ class WPP_Public {
extract( shortcode_atts( array(
'header' => '',
'limit' => 10,
'offset' => 0,
'range' => 'daily',
'time_unit' => 'hour',
'time_quantity' => 24,
......@@ -315,6 +317,7 @@ class WPP_Public {
$shortcode_ops = array(
'title' => strip_tags( $header ),
'limit' => ( !empty( $limit ) && WPP_Helper::is_number( $limit ) && $limit > 0 ) ? $limit : 10,
'offset' => ( !empty( $offset ) && WPP_Helper::is_number( $offset ) && $offset >= 0 ) ? $offset : 0,
'range' => ( in_array($range, $range_values) ) ? $range : 'daily',
'time_quantity' => ( !empty( $time_quantity ) && WPP_Helper::is_number( $time_quantity ) && $time_quantity > 0 ) ? $time_quantity : 24,
'time_unit' => ( in_array($time_unit, $time_units) ) ? $time_unit : 'hour',
......@@ -446,24 +449,28 @@ class WPP_Public {
$time = 60 * 60 * 24 * 365;
break;
$expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
default:
$time = 60 * 60;
break;
}
// Store transient
set_transient( $transient_name, $popular_posts, $expiration );
$expiration = $time * $this->admin_options['tools']['cache']['interval']['value'];
// Store transient in WPP transients array for garbage collection
$wpp_transients = get_option('wpp_transients');
// Store transient
set_transient( $transient_name, $popular_posts, $expiration );
if ( !$wpp_transients ) {
$wpp_transients = array( $transient_name );
add_option( 'wpp_transients', $wpp_transients );
} else {
if ( !in_array($transient_name, $wpp_transients) ) {
$wpp_transients[] = $transient_name;
update_option( 'wpp_transients', $wpp_transients );
}
}
// Store transient in WPP transients array for garbage collection
$wpp_transients = get_option('wpp_transients');
if ( !$wpp_transients ) {
$wpp_transients = array( $transient_name );
add_option( 'wpp_transients', $wpp_transients );
} else {
if ( !in_array($transient_name, $wpp_transients) ) {
$wpp_transients[] = $transient_name;
update_option( 'wpp_transients', $wpp_transients );
}
}
}
......
;if("undefined"!==typeof wpp_params){var do_request=!0;if(1==wpp_params.sampling_active)var num=Math.floor(Math.random()*wpp_params.sampling_rate)+1,do_request=1===num;if(do_request){var xhr=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),url=wpp_params.ajax_url,params="action="+wpp_params.action+"&token="+wpp_params.token+"&wpp_id="+wpp_params.ID;xhr.open("POST",url,!0);xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.onreadystatechange=function(){4===xhr.readyState&&200===xhr.status&&window.console&&window.console.log&&window.console.log(xhr.responseText)};xhr.send(params)}};
\ No newline at end of file
......@@ -3,8 +3,8 @@ Contributors: hcabrera
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=hcabrerab%40gmail%2ecom&lc=GB&item_name=WordPress%20Popular%20Posts%20Plugin&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG_global%2egif%3aNonHosted
Tags: popular, posts, widget, popularity, top
Requires at least: 4.1
Tested up to: 4.8.2
Stable tag: 4.0.6
Tested up to: 4.8.3
Stable tag: 4.0.12
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -23,7 +23,7 @@ WordPress Popular Posts is a highly customizable widget that displays your most
* **Sorting options** - Order your popular list by comments, views (default) or average views per day!
* **Use your own layout!** - WPP is flexible enough to let you customize the look and feel of your popular posts! (see [customizing WPP's HTML markup](https://github.com/cabrerahector/wordpress-popular-posts/wiki/5.-FAQ#how-can-i-use-my-own-html-markup-with-your-plugin) and [How to style WordPress Popular Posts](https://github.com/cabrerahector/wordpress-popular-posts/wiki/6.-Styling-the-list) for more.)
* **Disqus support** - Sort your popular posts by Disqus comments count!
* **Polylang & WPML support!**
* **Polylang & WPML 3.2+ support!**
* **WordPress Multisite support** - Each site on the network can have its own popular posts!
= Other Features =
......@@ -82,6 +82,43 @@ The FAQ section has been moved [here](https://github.com/cabrerahector/wordpress
4. WordPress Popular Posts Stats panel.
== Changelog ==
= 4.0.12 =
- Fixes bug where WPP didn't return the right URL when using Polylang / WPML.
- Fixes a compatibility issue with Yoast SEO (and potentially other plugins as well).
- Improves compatibility with MySQL 5.7+.
- Other minor fixes and improvements.
= 4.0.11 =
**If you're using a caching plugin, flushing its cache after installing / upgrading to this version is highly recommended.**
- Fixes reference to tracking script.
= 4.0.10 =
**If you're using a caching plugin, flushing its cache after installing / upgrading to this version is highly recommended.**
- Renames tracking script to prevent issues with ad blockers (props @Damienov).
- Widget: fixes caching (props @zu2).
- Exposes offset parameter to wpp shortcode / `wpp_get_mostpopular` template tag.
= 4.0.9 =
- Widget: fixes Author ID field not saving/updating.
- Fixes WPP data caching (props @zu2).
- Dashboard: updates Content Tags' documentation.
- Main POT file updated.
- Other minor bug fixes & improvements.
= 4.0.8 =
- Multisite: plugin can now be installed individually on each site.
- Multisite: improved upgrade process.
- Dashboard: adds multisite check to Debug screen.
- Dashboard: have the Debug screen display active plugins only.
- Improves compatibility with Beaver Builder.
- Adds onload event to ajax widget (props @cawa-93).
- Other minor bug fixes.
= 4.0.6 =
- Improves compatibility with Multisite.
......@@ -145,33 +182,6 @@ Also, see [Release notes](https://cabrerahector.com/development/wordpress-popula
- Minor improvements and bug fixes.
- Documentation updated.
= 3.3.3 =
- Fixes potential XSS exploit in WPP's admin dashboard.
- Adds filter to set which post types should be tracked by WPP ([details](https://github.com/cabrerahector/wordpress-popular-posts/wiki/3.-Filters#wpp_trackable_post_types)).
- Adds ability to select first attached image as thumbnail source (thanks, [@serglopatin](https://github.com/serglopatin)!)
= 3.3.2 =
- Fixes warning message: 'stream does not support seeking in...'
- Removes excerpt HTML encoding.
- Passes widget ID to the instance variable for customization.
- Adds CSS class current.
- Documentation cleanup.
- Other minor bug fixes / improvements.
= 3.3.1 =
- Fixes undefined index notice.
- Makes sure legacy tables are deleted on plugin upgrade.
= 3.3.0 =
- Adds the ability to limit the amount of data logged by WPP (see Settings > WordPress Popular Posts > Tools for more).
- Adds Polylang support (thanks, [@Chouby](https://github.com/Chouby)!)
- Removes post data from DB on deletion.
- Fixes whitespaces from post_type argument (thanks, [@getdave](https://github.com/getdave)!)
- WPP now handles SSL detection for images.
- Removes legacy datacache and datacache_backup tables.
- Adds Settings page advertisement support.
- FAQ section has been moved over to Github.
See [full changelog](https://github.com/cabrerahector/wordpress-popular-posts/blob/master/changelog.md).
== Credits ==
......@@ -179,5 +189,5 @@ See [full changelog](https://github.com/cabrerahector/wordpress-popular-posts/bl
* Flame graphic by freevector/Vecteezy.com.
== Upgrade Notice ==
= 4.0.6 =
If you're using a caching plugin, flush its cache before upgrading to this version.
\ No newline at end of file
= 4.0.11 =
If you're using a caching plugin, flushing its cache after upgrading to this version is highly recommended.
\ No newline at end of file
......@@ -28,6 +28,7 @@ if ( function_exists( 'is_multisite' ) && is_multisite() ) {
// Delete plugin's options
delete_option( 'wpp_ver' );
delete_option( 'wpp_update' );
delete_option( 'wpp_settings_config' );
delete_option( 'wpp_rand' );
delete_option( 'wpp_transients' );
......@@ -47,6 +48,7 @@ if ( function_exists( 'is_multisite' ) && is_multisite() ) {
// Delete plugin's options
delete_option( 'wpp_ver' );
delete_option( 'wpp_update' );
delete_option( 'wpp_settings_config' );
delete_option( 'wpp_rand' );
delete_option( 'wpp_transients' );
......
......@@ -16,7 +16,7 @@
* Plugin Name: WordPress Popular Posts
* Plugin URI: https://wordpress.org/plugins/wordpress-popular-posts/
* Description: A highly customizable widget that displays the most popular posts on your blog.
* Version: 4.0.6
* Version: 4.0.12
* Author: Hector Cabrera
* Author URI: http://cabrerahector.com/
* License: GPL-2.0+
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment