Plugin Directory

Changeset 2868782


Ignore:
Timestamp:
02/21/2023 02:27:32 PM (3 years ago)
Author:
thronspa
Message:

PHP8 support

Location:
thron/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • thron/trunk/README.txt

    r2750821 r2868782  
    22Contributors: thronspa, websolutedev
    33Tags: DAM
    4 Stable tag: 1.2.2
     4Stable tag: 1.3.0
    55Requires at least: 5.9
    6 Tested up to: 5.9.2
    7 Requires PHP: 7.0
     6Tested up to: 6.1
     7Requires PHP: 7.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8585== Changelog ==
    8686
     87= 1.3.0 =
     88- Extended support to PHP 8
     89
    8790= 1.2.2 =
    8891- Fix for WordPress.com Hosting
  • thron/trunk/admin/class-thron-admin.php

    r2750821 r2868782  
    420420        $query = isset( $_REQUEST['query'] ) ? (array) $_REQUEST['query'] : array();
    421421
     422
    422423        $source = sanitize_text_field( $query['thron_source'] );
    423424
     
    531532       
    532533        $infinite = true;
    533         //print_r($infinite);
    534534        return $infinite;
    535535    }
     
    661661
    662662        $list_files = $thron_api->search( $term, $categories, $tag, $mime_type, $per_page, $pageToken );
    663         //print_r($list_files);
     663   
     664
    664665        $_SESSION['pageToken'] = $list_files->nextPageToken;
    665666
     
    743744                                $height = null;
    744745                            }
    745                             //print_r( $file->detail->locales[0]);
    746 
     746                            //print_r( $file->details);
     747                            //die();
    747748                            //print_r( $file->detail->locales[0]->name);
    748749                            $url = 'https://' . $clientId . '-cdn.thron.com/delivery/public/image/' . $clientId . '/' . $file->id . '/' . $pkey . '/std/' . $width . 'x' . $height . '/' . $file->details->source->fileName;
     
    15491550                        <input type="text" id="attachment-details-two-column-alt-text" value="{{ data.alt }}" aria-describedby="alt-text-description" {{ maybeReadOnly }} />
    15501551                    </span>
    1551                     <p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
    15521552                <# } #>
    15531553                <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
     
    16551655
    16561656    function ws_add_overrides() {
    1657         $args = array (
    1658             'id'        =>  $_GET['item'], // id
    1659         );
     1657            $args = array (
     1658                'id'        =>  '', // id
     1659            );
    16601660
    16611661        add_action( 'admin_footer-post.php', [$this,'ws_add_media_overrides'] );
     
    16641664        add_action( 'admin_footer-upload.php', function() use ( $args ) {
    16651665            $this->ws_add_media_overrides( $args ); } );
    1666 
    1667     }
     1666   
     1667        }
    16681668
    16691669}
  • thron/trunk/admin/class-thron-setting.php

    r2741703 r2868782  
    180180        $thron_options = get_option( 'thron_option_api_page' );
    181181
    182         if (! array_key_exists('thron_maxImageWidth', $thron_options ) or $thron_options['thron_maxImageWidth'] == '' ) {
    183             $thron_options['thron_maxImageWidth'] = 1920;
    184 
    185             update_option( 'thron_option_api_page', $thron_options );
     182        if ( is_array( $thron_options ) ) {
     183
     184            if (! array_key_exists('thron_maxImageWidth', $thron_options ) or $thron_options['thron_maxImageWidth'] == '' ) {
     185                $thron_options['thron_maxImageWidth'] = 1920;
     186
     187                update_option( 'thron_option_api_page', $thron_options );
     188            }
     189           
    186190        }
    187191
  • thron/trunk/admin/class-thron-wp-rest-attachments-controller.php

    r2741714 r2868782  
    1515 * @see WP_REST_Attachments_Controller
    1616 */
     17
    1718class THRON_WP_REST_Attachments_Controller extends WP_REST_Attachments_Controller {
    1819
     
    3738        $thron_api = new ThronAPI( $appId, $clientId, $appKey );
    3839        $detail = $thron_api->get_content_detail( $thron_id );   
     40       
    3941       
    4042        $mime = null;
  • thron/trunk/includes/class-thron-api.php

    r2750821 r2868782  
    179179        );
    180180
    181 
    182 
    183181        if ( is_wp_error( $response ) ) {
    184182            thron_write_log($response->get_error_message);
    185183        } else {
    186184            $result = json_decode( $response['body'] );
     185
     186           
    187187
    188188            return $result;
  • thron/trunk/includes/class-thron.php

    r2750821 r2868782  
    7171            $this->version = THRON_VERSION;
    7272        } else {
    73             $this->version = '1.2.2';
     73            $this->version = '1.3.0';
    7474        }
    7575        $this->plugin_name = 'thron';
     
    174174
    175175        $plugin_admin = new Thron_Admin( $this->get_plugin_name(), $this->get_version() );
    176         $plugin_wp_rest_attachments_controller = new THRON_WP_REST_Attachments_Controller('attachments');
     176        $plugin_wp_rest_attachments_controller = new THRON_WP_REST_Attachments_Controller('attachment');
    177177        $plugin_setting = new Thron_Setting( );
    178178        $plugin_cron = new Thron_Cron( );
  • thron/trunk/thron.php

    r2750821 r2868782  
    1717 * Plugin URI:
    1818 * Description:       Select the assets to insert within your pages directly from the DAM library
    19  * Version:           1.2.2
     19 * Version:           1.3.0
    2020 * Author:            THRON
    2121 * Author URI:        https://www.thron.com
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'THRON_VERSION', '1.2.2' );
     38define( 'THRON_VERSION', '1.3.0' );
    3939define( 'THRON_PLUGIN_URL', plugin_dir_url(__FILE__) );
    4040define( 'THRON_PLUGIN_PATH', plugin_dir_path(__FILE__) );
Note: See TracChangeset for help on using the changeset viewer.