Plugin Directory

Changeset 3080457


Ignore:
Timestamp:
05/02/2024 02:20:57 PM (2 years ago)
Author:
getpantheon
Message:

Update to version 1.0.6 from GitHub

Location:
decoupled-preview
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • decoupled-preview/tags/1.0.6/readme.txt

    r2960763 r3080457  
    22Contributors: getpantheon, backlineint, abhisekmazumdar, jspellman,jazzs3quence
    33Tags: headless,next.js,decoupled,preview
    4 Tested up to: 6.3
    5 Stable tag: 1.0.5
     4Tested up to: 6.3.1
     5Stable tag: 1.0.6
    66License: GPL2 or later
    77License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
     
    5656== Changelog ==
    5757
     58= 1.0.6  May 2, 2024 =
     59* Updates Pantheon WP Coding Standards to 2.0 [[#63](https://github.com/pantheon-systems/wp-decoupled-preview/pull/63)]
     60* Fixes an issue with broken activation and deactivation hooks
     61
    5862= 1.0.5 =
    5963* Preview Button Regression in WordPress 6.3. [[#58](https://github.com/pantheon-systems/wp-decoupled-preview/pull/58)]
  • decoupled-preview/tags/1.0.6/src/class-decoupled-preview-settings.php

    r2955124 r3080457  
    357357         * @return array
    358358         */
    359         public function get_allowed_post_types() : array {
     359        public function get_allowed_post_types(): array {
    360360            /**
    361361             * Allow the allowable post types to be filtered.
     
    380380         * @return string
    381381         */
    382         public function sanitize_preview_type( string $type ) : string {
     382        public function sanitize_preview_type( string $type ): string {
    383383            /**
    384384             * Allow the allowable preview types to be filtered.
     
    415415         * @return int
    416416         */
    417         public function validate_preview_id( int $edit_id, $options = [] ) : int {
     417        public function validate_preview_id( int $edit_id, $options = [] ): int {
    418418            if ( empty( $options ) ) {
    419419                $options = get_option( 'preview_sites' );
     
    644644         * @return array
    645645         */
    646         public function remove_site_from_list( int $site_id = null ) : array {
     646        public function remove_site_from_list( int $site_id = null ): array {
    647647            $site = $this->get_preview_site( $site_id );
    648648            $sites = get_option( 'preview_sites' );
     
    690690         * @return array The updated array of preview sites.
    691691         */
    692         public function filter_preview_sites( array $preview_sites ) : array {
     692        public function filter_preview_sites( array $preview_sites ): array {
    693693            if ( count( $preview_sites ) < 1 ) {
    694694                return $preview_sites;
  • decoupled-preview/tags/1.0.6/src/class-list-table.php

    r2955124 r3080457  
    5454     * @return array
    5555     */
    56     public function get_sortable_columns() : array {
     56    public function get_sortable_columns(): array {
    5757        return [
    5858            'label' => [ 'label', true ],
     
    7070     * @return int
    7171     */
    72     private function usort_reorder( $a, $b ) : int {
     72    private function usort_reorder( $a, $b ): int {
    7373        // Similar to the above, I don't think we need to check the nonce here because we're not processing any information other than the sort order.
    7474        $orderby = ( ! empty( $_GET['orderby'] ) ) ? sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) : 'label'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     
    9292     * @return array
    9393     */
    94     public function get_columns() : array {
     94    public function get_columns(): array {
    9595        return [
    9696            'label' => __( 'Label', 'wp-decoupled-preview' ),
     
    110110     * @return string
    111111     */
    112     public function column_default( $item, $column_name ) : string {
     112    public function column_default( $item, $column_name ): string {
    113113        switch ( $column_name ) {
    114114            case 'label':
  • decoupled-preview/tags/1.0.6/wp-decoupled-preview.php

    r2960763 r3080457  
    44 * Plugin URI:      https://github.com/pantheon-systems/wp-decoupled-preview
    55 * Description:     Preview WordPress content on Front-end sites including Next.js
    6  * Version:         1.0.5
     6 * Version:         1.0.6
    77 * Author:          Pantheon
    88 * Author URI:      https://pantheon.io/
     
    3434
    3535    // Load the settings class and kick it off.
    36     require_once dirname( __FILE__ ) . '/src/class-decoupled-preview-settings.php';
     36    require_once __DIR__ . '/src/class-decoupled-preview-settings.php';
    3737    new Decoupled_Preview_Settings();
    3838
    3939    add_action( 'init', __NAMESPACE__ . '\\conditionally_enqueue_scripts' );
    4040    add_action( 'updated_option', __NAMESPACE__ . '\\redirect_to_preview_site' );
    41 
    42     // Register activation and deactivation hooks.
    43     register_activation_hook( __FILE__, __NAMESPACE__ . '\\set_default_options' );
    44     register_deactivation_hook( __FILE__, __NAMESPACE__ . '\\delete_default_options' );
    4541}
    4642
     
    167163 */
    168164function override_preview_template() {
    169     return trailingslashit( dirname( __FILE__ ) ) . 'templates/preview-template.php';
     165    return trailingslashit( __DIR__ ) . 'templates/preview-template.php';
    170166}
    171167
  • decoupled-preview/trunk/readme.txt

    r2960763 r3080457  
    22Contributors: getpantheon, backlineint, abhisekmazumdar, jspellman,jazzs3quence
    33Tags: headless,next.js,decoupled,preview
    4 Tested up to: 6.3
    5 Stable tag: 1.0.5
     4Tested up to: 6.3.1
     5Stable tag: 1.0.6
    66License: GPL2 or later
    77License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
     
    5656== Changelog ==
    5757
     58= 1.0.6  May 2, 2024 =
     59* Updates Pantheon WP Coding Standards to 2.0 [[#63](https://github.com/pantheon-systems/wp-decoupled-preview/pull/63)]
     60* Fixes an issue with broken activation and deactivation hooks
     61
    5862= 1.0.5 =
    5963* Preview Button Regression in WordPress 6.3. [[#58](https://github.com/pantheon-systems/wp-decoupled-preview/pull/58)]
  • decoupled-preview/trunk/src/class-decoupled-preview-settings.php

    r2955124 r3080457  
    357357         * @return array
    358358         */
    359         public function get_allowed_post_types() : array {
     359        public function get_allowed_post_types(): array {
    360360            /**
    361361             * Allow the allowable post types to be filtered.
     
    380380         * @return string
    381381         */
    382         public function sanitize_preview_type( string $type ) : string {
     382        public function sanitize_preview_type( string $type ): string {
    383383            /**
    384384             * Allow the allowable preview types to be filtered.
     
    415415         * @return int
    416416         */
    417         public function validate_preview_id( int $edit_id, $options = [] ) : int {
     417        public function validate_preview_id( int $edit_id, $options = [] ): int {
    418418            if ( empty( $options ) ) {
    419419                $options = get_option( 'preview_sites' );
     
    644644         * @return array
    645645         */
    646         public function remove_site_from_list( int $site_id = null ) : array {
     646        public function remove_site_from_list( int $site_id = null ): array {
    647647            $site = $this->get_preview_site( $site_id );
    648648            $sites = get_option( 'preview_sites' );
     
    690690         * @return array The updated array of preview sites.
    691691         */
    692         public function filter_preview_sites( array $preview_sites ) : array {
     692        public function filter_preview_sites( array $preview_sites ): array {
    693693            if ( count( $preview_sites ) < 1 ) {
    694694                return $preview_sites;
  • decoupled-preview/trunk/src/class-list-table.php

    r2955124 r3080457  
    5454     * @return array
    5555     */
    56     public function get_sortable_columns() : array {
     56    public function get_sortable_columns(): array {
    5757        return [
    5858            'label' => [ 'label', true ],
     
    7070     * @return int
    7171     */
    72     private function usort_reorder( $a, $b ) : int {
     72    private function usort_reorder( $a, $b ): int {
    7373        // Similar to the above, I don't think we need to check the nonce here because we're not processing any information other than the sort order.
    7474        $orderby = ( ! empty( $_GET['orderby'] ) ) ? sanitize_text_field( wp_unslash( $_GET['orderby'] ) ) : 'label'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     
    9292     * @return array
    9393     */
    94     public function get_columns() : array {
     94    public function get_columns(): array {
    9595        return [
    9696            'label' => __( 'Label', 'wp-decoupled-preview' ),
     
    110110     * @return string
    111111     */
    112     public function column_default( $item, $column_name ) : string {
     112    public function column_default( $item, $column_name ): string {
    113113        switch ( $column_name ) {
    114114            case 'label':
  • decoupled-preview/trunk/wp-decoupled-preview.php

    r2960763 r3080457  
    44 * Plugin URI:      https://github.com/pantheon-systems/wp-decoupled-preview
    55 * Description:     Preview WordPress content on Front-end sites including Next.js
    6  * Version:         1.0.5
     6 * Version:         1.0.6
    77 * Author:          Pantheon
    88 * Author URI:      https://pantheon.io/
     
    3434
    3535    // Load the settings class and kick it off.
    36     require_once dirname( __FILE__ ) . '/src/class-decoupled-preview-settings.php';
     36    require_once __DIR__ . '/src/class-decoupled-preview-settings.php';
    3737    new Decoupled_Preview_Settings();
    3838
    3939    add_action( 'init', __NAMESPACE__ . '\\conditionally_enqueue_scripts' );
    4040    add_action( 'updated_option', __NAMESPACE__ . '\\redirect_to_preview_site' );
    41 
    42     // Register activation and deactivation hooks.
    43     register_activation_hook( __FILE__, __NAMESPACE__ . '\\set_default_options' );
    44     register_deactivation_hook( __FILE__, __NAMESPACE__ . '\\delete_default_options' );
    4541}
    4642
     
    167163 */
    168164function override_preview_template() {
    169     return trailingslashit( dirname( __FILE__ ) ) . 'templates/preview-template.php';
     165    return trailingslashit( __DIR__ ) . 'templates/preview-template.php';
    170166}
    171167
Note: See TracChangeset for help on using the changeset viewer.