Skip to content

Commit

Permalink
Merge pull request #111 from itthinx/tested-4.13.0-6.0
Browse files Browse the repository at this point in the history
Tested 4.13.0 6.0
  • Loading branch information
itthinx authored May 8, 2022
2 parents 34ceef7 + a874cff commit fdeb120
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions affiliates.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Plugin Name: Affiliates
* Plugin URI: http://www.itthinx.com/plugins/affiliates
* Description: The Affiliates plugin provides the right tools to maintain a partner referral program.
* Version: 4.12.0
* Version: 4.13.0
* Author: itthinx
* Author URI: http://www.itthinx.com
* Donate-Link: http://www.itthinx.com
Expand All @@ -35,7 +35,7 @@
}

if ( !defined( 'AFFILIATES_CORE_VERSION' ) ) {
define( 'AFFILIATES_CORE_VERSION', '4.12.0' );
define( 'AFFILIATES_CORE_VERSION', '4.13.0' );
define( 'AFFILIATES_PLUGIN_NAME', 'affiliates' );
define( 'AFFILIATES_FILE', __FILE__ );
define( 'AFFILIATES_PLUGIN_BASENAME', plugin_basename( AFFILIATES_FILE ) );
Expand Down
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
== Affiliates - Changelog ==

= 4.13.0 =
* WordPress 6.0 compatible.
* PHP 8.1 compatibility fixed deprecated passing null to stripslashes().
* PHP 8.1 compatibility fixed deprecated passing null to strcmp().
* PHP 8.1 compatibility fixed deprecated passing null to trim().

= 4.12.0 =
* WordPress 6.0 compatible.
* Requires at least WordPress 5.6.
Expand Down
8 changes: 4 additions & 4 deletions lib/core/affiliates-admin-hits-uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,25 +583,25 @@ function affiliates_admin_hits_uri() {
sprintf( '<label style="cursor:help" title="%s" class="src-uri-filter">', esc_html( $use_and_or ) ) .
__( 'Source URI', 'affiliates' ) .
' ' .
'<input class="src-uri-filter" name="src_uri" type="text" value="' . esc_attr( stripslashes( $src_uri ) ) . '"/>' .
'<input class="src-uri-filter" name="src_uri" type="text" value="' . esc_attr( $src_uri !== null ? stripslashes( $src_uri ) : '' ) . '"/>' .
'</label>' .
' ' .
sprintf( '<label style="cursor:help" title="%s" class="dest-uri-filter">', esc_html( $use_and_or ) ) .
__( 'Landing URI', 'affiliates' ) .
' ' .
'<input class="dest-uri-filter" name="dest_uri" type="text" value="' . esc_attr( stripslashes( $dest_uri ) ) . '"/>' .
'<input class="dest-uri-filter" name="dest_uri" type="text" value="' . esc_attr( $dest_uri !== null ? stripslashes( $dest_uri ) : '' ) . '"/>' .
'</label>' .
' ' .
sprintf( '<label style="cursor:help" title="%s" class="user-agent-filter">', esc_html( $use_and_or ) ) .
__( 'User Agent', 'affiliates' ) .
' ' .
'<input class="user-agent-filter" name="user_agent" type="text" value="' . esc_attr( stripslashes( $user_agent ) ) . '"/>' .
'<input class="user-agent-filter" name="user_agent" type="text" value="' . esc_attr( $user_agent !== null ? stripslashes( $user_agent ) : '' ) . '"/>' .
'</label>' .
' ' .
'<label class="ip-filter">' .
__( 'IP', 'affiliates' ) .
' ' .
'<input class="ip-filter" name="ip" type="text" value="' . esc_attr( stripslashes( $ip ) ) . '"/>' .
'<input class="ip-filter" name="ip" type="text" value="' . esc_attr( $ip !== null ? stripslashes( $ip ) : '' ) . '"/>' .
'</label>' .
'</div>' .
'<div class="filter-section">' .
Expand Down
2 changes: 1 addition & 1 deletion lib/core/class-affiliates-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ public static function affiliates_url( $atts, $content = null ) {
"SELECT $affiliates_users_table.affiliate_id FROM $affiliates_users_table LEFT JOIN $affiliates_table ON $affiliates_users_table.affiliate_id = $affiliates_table.affiliate_id WHERE $affiliates_users_table.user_id = %d AND $affiliates_table.status = 'active'",
intval( $user_id )
))) {
$content = trim( $content );
$content = $content !== null ? trim( $content ) : '';
if ( strlen( $content ) > 0 ) {
// wp_texturize() has already been applied to $content and
// it indiscriminately replaces ampersands with the HTML
Expand Down
2 changes: 1 addition & 1 deletion lib/core/class-affiliates-totals.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public static function view() {

$name_suffix = '';
$class_deleted = '';
if ( $is_deleted = ( strcmp( $result->status, 'deleted' ) == 0 ) ) {
if ( $is_deleted = ( $result->status !== null && strcmp( $result->status, 'deleted' ) == 0 ) ) {
$class_deleted = ' deleted ';
$name_suffix .= ' ' . __( '(removed)', 'affiliates' );
}
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: affiliate, affiliates, affiliate marketing, referral, growth marketing, ad
Requires at least: 5.6.0
Tested up to: 6.0
Requires PHP: 5.6.0
Stable tag: 4.12.0
Stable tag: 4.13.0
License: GPLv3

The Affiliates system provides the most powerful growth-oriented tools to run a successful Affiliate Marketing Program.
Expand Down

0 comments on commit fdeb120

Please sign in to comment.