Plugin Directory

Changeset 3161302


Ignore:
Timestamp:
10/02/2024 07:58:13 AM (17 months ago)
Author:
miunosoft
Message:

Preparing for 5.4.3 release

Location:
amazon-auto-links/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • amazon-auto-links/trunk/amazon-auto-links.php

    r3082358 r3161302  
    66 * Author:            Michael Uno (miunosoft)
    77 * Author URI:        https://michaeluno.jp
    8  * Version:           5.4.3b04
     8 * Version:           5.4.3
    99 * Text Domain:       amazon-auto-links
    1010 * Domain Path:       /language
     
    1919 */
    2020class AmazonAutoLinks_Registry_Base {
    21     const VERSION      = '5.4.3b04';    // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
     21    const VERSION      = '5.4.3';    // <--- DON'T FORGET TO CHANGE THIS AS WELL!!
    2222    const NAME         = 'Auto Amazon Links';
    2323    const DESCRIPTION  = 'Formerly, Amazon Auto Links. The plugin generates links of Amazon products just coming out today. You just pick categories and they appear even in JavaScript disabled browsers.';
  • amazon-auto-links/trunk/include/core/_common/utility/interpreter/http/AmazonAutoLinks_HTTPClient.php

    r3069332 r3161302  
    546546
    547547                if ( $_bProxySet ) {
    548 
     548                    /**
     549                     * @see AmazonAutoLinks_Proxy_Utility::getProxyArguments()
     550                     */
    549551                    $_aProxy = $_aProxy + array(
    550552                        'host'      => null,
     
    552554                        'username'  => null,
    553555                        'password'  => null,
     556                        'ip'        => null,
     557                        'scheme'    => null,
    554558                    );
    555559                    curl_setopt( $_oCurl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
     
    563567                        curl_setopt( $_oCurl, CURLOPT_PROXYUSERPWD, $_aProxy[ 'username' ] . ':' . $_aProxy[ 'password' ] );
    564568                    }
    565 
    566569                }
    567570
     
    588591
    589592                // Error handling
     593                $_sHost = $_aProxy[ 'raw' ] !== $_aProxy[ 'host' ]
     594                    ? $_aProxy[ 'raw' ] . ' (' . $_aProxy[ 'host' ] . ')'
     595                    : $_aProxy[ 'raw' ];
    590596                if ( ! $_bsResponse ) {
    591597                    $_aErrorData = array( 'url' => $sURL ) + $_aProxy;
    592598                    $_sHTTPCode  = $_sHTTPCode ? $_sHTTPCode : 'CURL_CONNECTION_FAILURE';
    593                     return new WP_Error( $_sHTTPCode, sprintf( 'The cURL connection failed with a proxy: %1$s.', $_aProxy[ 'raw' ] ), $_aErrorData );
     599                    return new WP_Error( $_sHTTPCode, sprintf( 'The cURL connection failed with a proxy: %1$s.', $_sHost ), $_aErrorData );
    594600                }
    595601                $_iResponseCode   = ( integer ) $_sHTTPCode;
    596602                if ( $_iResponseCode >= 400 ) {
    597603                    $_aErrorData = array( 'url' => $sURL ) + $_aProxy;
    598                     return new WP_Error( $_iResponseCode, sprintf( 'The cURL response returned an error with a proxy: %1$s.', $_aProxy[ 'raw' ] ), $_aErrorData );
     604                    return new WP_Error( $_iResponseCode, sprintf( 'The cURL response returned an error with a proxy: %1$s.', $_sHost ), $_aErrorData );
    599605                }
    600606
  • amazon-auto-links/trunk/include/core/component/custom_oembed/oembed/AmazonAutoLinks_CustomOEmbed_Endpoint.php

    r3022483 r3161302  
    4646        $_sNonce            = wp_create_nonce( 'aal_custom_oembed' );
    4747        $_sProviderSiteURL  = $_oOption->get( array( 'custom_oembed', 'external_provider' ), '' );
     48        $_sEmbedSlug        = ( string ) apply_filters( 'aal_filter_plugin_slug_oembed', 'amazon-auto-links' );
    4849        $_sProviderEndpoint = filter_var( $_sProviderSiteURL, FILTER_VALIDATE_URL )
    49             ? untrailingslashit( $_sProviderSiteURL ) . '/amazon-auto-links/embed/'
    50             : untrailingslashit( site_url() ) . '/amazon-auto-links/embed/'; // using a custom non-existent url so when the plugin is deactivated, the iframe displays the 404 embedded page.
     50            ? untrailingslashit( $_sProviderSiteURL ) . '/' . $_sEmbedSlug . '/embed/'
     51            : untrailingslashit( site_url() ) . '/' . $_sEmbedSlug . '/embed/'; // using a custom non-existent url so when the plugin is deactivated, the iframe displays the 404 embedded page.
    5152        $_sIFrameURL        = add_query_arg(
    5253            array(
    53                 'embed'  => ( string ) apply_filters( 'aal_filter_plugin_slug_oembed', 'amazon-auto-links' ),    // usually the value is 1 for normal oEmbed posts but here we use a custom value to differentiate the request to process own custom outputs // [5.3.10] filter
     54                'embed'  => $_sEmbedSlug,    // usually the value is 1 for normal oEmbed posts but here we use a custom value to differentiate the request to process own custom outputs // [5.3.10] filter
    5455                // 'url' => ... the key is reserved by the core for oEmbed discovery routine and when used, it causes recursive requests.
    5556                'uri'    => urlencode( AmazonAutoLinks_PluginUtility::getURLSanitized( $_GET[ 'url' ] ) ),  // sanitization done
  • amazon-auto-links/trunk/include/core/component/proxy/event/action/AmazonAutoLinks_Proxy_Event_Action_UnusableProxy.php

    r2701172 r3161302  
    3535         * The stored proxies will be saved at shutdown.
    3636         * @param array $aArguments
    37          * @since   4.2.0
     37         * @since 4.2.0
    3838         */
    3939        public function replyToCaptureUnusableProxies( array $aArguments ) {
    4040
    41             $_sHost  = $this->getElement( $aArguments,  array( 'proxy', 'host' ), '' );
    42             $_sPort  = $this->getElement( $aArguments,  array( 'proxy', 'port' ),  '' );
    43             $_sUser  = $this->getElement( $aArguments,  array( 'proxy', 'username' ),  '' );
    44             $_sPass  = $this->getElement( $aArguments,  array( 'proxy', 'password' ),  '' );
     41            /**
     42             * Allows the user to disable the updates of the list of unusable proxies.
     43             * @since 5.4.3
     44             */
     45            if ( ! ( boolean ) apply_filters( 'aal_filter_http_request_proxy_update_unusable', true ) ) {
     46                return;
     47            }
    4548
    46             // scheme://username:password@host:port
    47             $_sUserPass = ( $_sUser && $_sPass ) ? $_sUser . ':' . $_sPass . '@': '';
    48             $_sEntry    = $_sUserPass . $_sHost . ':' . $_sPort;
     49            $_sEntry = $this->getElement( $aArguments,  array( 'proxy', 'raw' ),  '' );
    4950            $this->___aUnusableProxies[ $_sEntry ] = $_sEntry;  // prevent duplicates by setting the value in key
    5051            if ( 1 === count( $this->___aUnusableProxies ) ) {
     
    6970        foreach( $this->___aUnusableProxies as $_sProxy ) {
    7071
    71             $_aUnusables[]  = $_sProxy;
    72             $_biIndex       = array_search( $_sProxy, $_aProxies );
     72            $_aUnusables[] = $_sProxy;
     73            $_biIndex      = array_search( $_sProxy, $_aProxies );
    7374            if ( false === $_biIndex ) {
    7475                continue;
  • amazon-auto-links/trunk/include/core/component/proxy/utility/AmazonAutoLinks_Proxy_Utility.php

    r3082358 r3161302  
    2424
    2525        $_aProxy = parse_url( $sProxy );
     26        $_sIP    = self::getIPFromHostName( $_aProxy[ 'host' ] );
    2627        return array(
     28            'scheme'   => $_aProxy[ 'scheme' ],
     29            'ip'       => $_sIP,
    2730            'host'     => isset( $_aProxy[ 'scheme' ] )
    28                 ? $_aProxy[ 'scheme' ] . '://' . self::getIPFromHostName( $_aProxy[ 'host' ] ) // cURL does not accept domain names
     31                ? $_aProxy[ 'scheme' ] . '://' . $_sIP // cURL does not accept domain names
    2932                : $_aProxy[ 'host' ],
    3033            'port'     => $_aProxy[ 'port' ],
  • amazon-auto-links/trunk/include/core/main/admin/report/http_request/AmazonAutoLinks_AdminPage_Tab_HTTPRequest.php

    r2701172 r3161302  
    5151        private function ___getCacheDataTable( array $aCache, $sNonce ) {
    5252
    53             $_aData         = $aCache[ 'data' ];
     53            $_aData         = $this->getElementAsArray( $aCache, array( 'data' ) ) + array(
     54                'body' => '',
     55                'headers' => array(),
     56                'cookies' => array(),
     57            );
     58            $aCache[ 'name' ] = isset( $aCache[ 'name' ] ) ? $aCache[ 'name' ] : '';
    5459
    5560            if ( is_wp_error( $_aData ) ) {
     
    145150            return "<div class='go-back'>"
    146151                    . "<span class='dashicons dashicons-arrow-left-alt small-icon'></span>"
    147                     . "<a href='{$_sProductsPageURL}'>"
     152                    . "<a href='" . esc_url( $_sProductsPageURL ) . "'>"
    148153                        . __( 'Go Back', 'amazon-auto-links' )
    149154                    . "</a>"
  • amazon-auto-links/trunk/readme.txt

    r3072213 r3161302  
    77Tested up to:       6.5.2
    88Requires MySQL:     5.0.3
    9 Stable tag:         5.4.2
     9Stable tag:         5.4.3
    1010License:            GPLv2 or later
    1111License URI:        http://www.gnu.org/licenses/gpl-2.0.html
     
    185185= Do I need API Keys? =
    186186
    187 For the category unit type, no, but for PA-API unit types, yes. You need to issue a pair of API keys on the Amazon Associates logged-in page.
     187For the Category unit type, no, but for other unit types, yes. You need to issue a pair of API keys on the Amazon Associates logged-in page.
    188188
    189189For that, you need to have an account with [Amazon Product Advertising API](https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html). The keys can be obtained by logging in to [Amazon Web Services](http://aws.amazon.com/) and you need to get **Access Key ID** (public key) and **Secret Access Key** (private key).
     
    406406== Changelog ==
    407407
    408 #### 5.4.2 - 04/17/2024
    409 - Added a method to avoid the PHP warning, "gzuncompress(): data error"
     408#### 5.4.2 - 10/02/2024
     409- Fixed a bug that the `sort` shortcode argument did not take effect when used with the `asin` argument.
     410- Fixed a PHP critical error saying "Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty."
     411- Added the **Server** section in the **About** tab of the **Help** page.
     412- Added the ability to automatically update the default options of Country and Associate ID when the options of the Associates section are updated.
     413- Changed to show some About details only when the Debug Mode with back-end is enabled.
     414- Fixed a PHP warning saying "Deprecated: preg_replace(): Passing null to parameter #3" in PHP 8.2.
     415- Changed the timing of applying the sort order of PA-API Item-Lookup units.
     416- Added the ability to accept host names for HTTP proxies
     417- Fixed the broken format in the unusable HTTP proxy list
     418- Fixed a bug that the `aal_filter_plugin_slug_oembed` filter hook did not function
     419- Fixed raw strings to be sanitized
    410420
    411421#### Old Log
Note: See TracChangeset for help on using the changeset viewer.