Plugin Directory

Changeset 3807302


Ignore:
Timestamp:
11/17/2026 11:59:25 AM (less than one hour ago)
Author:
debutstudio
Message:

Update to version 1.3.5 from GitHub

Location:
debut-jobs
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • debut-jobs/tags/1.3.5/debut-jobs.php

    r3804819 r3807302  
    55 * Plugin URI:        https://debut.studio/products/jobs/
    66 * Description:       Show your JobAdder jobs on your WordPress site: a job board and careers page with search, filters and apply, kept in sync with JobAdder.
    7  * Version:           1.3.4
     7 * Version:           1.3.5
    88 * Author:            DEBUT Studio
    99 * Author URI:        https://debut.studio/
    … …  
    8686}
    8787// ── Plugin constants ──────────────────────────────────────────────────────────
    88 define( 'DEBUT_JOBS_VERSION', '1.3.4' );
     88define( 'DEBUT_JOBS_VERSION', '1.3.5' );
    8989define( 'DEBUT_JOBS_FILE', __FILE__ );
    9090define( 'DEBUT_JOBS_DIR', plugin_dir_path( __FILE__ ) );
  • debut-jobs/tags/1.3.5/inc/class-board.php

    r3799226 r3807302  
    9393
    9494    /**
    95      * Ask JobAdder for the account's job boards, and how many live ads each
    96      * has, and remember them. JobAdder lists every board on the account
    97      * (channels like Indeed too) without saying which are website boards,
    98      * so the ad counts help the customer spot the right one.
     95     * Ask JobAdder for the account's job boards and remember them. JobAdder
     96     * lists every board on the account (channels like Indeed too) without
     97     * saying which are website boards, so the customer picks by name.
    9998     *
    10099     * @return array|WP_Error As boards().
    … …  
    121120            if ( $id === '' ) continue;
    122121            $name = trim( (string) ( $item['name'] ?? ( $item['title'] ?? '' ) ) );
     122            // Only the list itself: JobAdder asks that we don't call boards
     123            // other than the one the customer chooses.
    123124            $list[ $id ] = [
    124125                /* translators: %s: JobAdder job board ID */
    125126                'name' => $name !== '' ? $name : sprintf( __( 'Board %s', 'debut-jobs' ), $id ),
    126                 'ads'  => self::count_ads( $api_base, $id, $token ),
     127                'ads'  => null,
    127128            ];
    128129        }
    129130
    130         // Boards with live ads first.
    131131        uasort( $list, function ( $a, $b ) {
    132             return (int) ( $b['ads'] ?? -1 ) <=> (int) ( $a['ads'] ?? -1 ) ?: strcasecmp( $a['name'], $b['name'] );
     132            return strcasecmp( $a['name'], $b['name'] );
    133133        } );
    134134
    … …  
    137137    }
    138138
    139     /** Live ads on a board, or null if JobAdder wouldn't say. */
    140     private static function count_ads( string $api_base, string $id, string $token ): ?int {
    141         $res = Debut_Jobs_JobAdder_API::get( $api_base . '/jobboards/' . rawurlencode( $id ) . '/ads?limit=1', $token, 1 );
    142         if ( is_wp_error( $res ) ) return null;
    143         [ $body ] = $res;
    144         if ( isset( $body['totalCount'] ) ) return (int) $body['totalCount'];
    145         return isset( $body['items'] ) && is_array( $body['items'] ) ? count( $body['items'] ) : null;
    146     }
    147139
    148140    /**
    … …  
    182174        if ( $current !== '' && isset( $list[ $current ] ) ) return 'kept';
    183175
    184         // A site from before 1.3.0 on the old shared board: keep it while
    185         // it still works, so reconnecting doesn't empty the jobs page.
    186         if ( $current === self::LEGACY_ID && self::legacy_works() ) return 'kept';
     176        // A site from before 1.3.0 on the old shared board keeps it until
     177        // someone chooses a board, so reconnecting doesn't empty its jobs page.
     178        if ( $current === self::LEGACY_ID ) return 'kept';
    187179
    188180        if ( count( $list ) === 1 ) {
    … …  
    197189    }
    198190
    199     /** Whether the pre-1.3.0 shared board can still be read. */
    200     private static function legacy_works(): bool {
    201         $api_base = rtrim( (string) Debut_Jobs_Settings::get( 'api_base', '' ), '/' );
    202         $token    = Debut_Jobs_JobAdder_API::get_access_token();
    203         if ( $api_base === '' || is_wp_error( $token ) ) return false;
    204         $res = Debut_Jobs_JobAdder_API::get( $api_base . '/jobboards/' . self::LEGACY_ID . '/ads?limit=1', $token, 1 );
    205         return ! is_wp_error( $res );
    206     }
    207191
    208192    /** Forget the board when disconnecting. The jobs stay until another board is chosen. */
  • debut-jobs/tags/1.3.5/readme.txt

    r3804819 r3807302  
    55Tested up to: 7.0
    66Requires PHP: 7.4
    7 Stable tag: 1.3.4
     7Stable tag: 1.3.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    166166== Changelog ==
    167167
     168= 1.3.5 =
     169* Changed: reconnecting only asks JobAdder for your list of job boards, and never calls a board you haven't chosen
     170* Changed: real-time sync ignores ad events for your other job boards (JobAdder sends one per board) and duplicate notifications, without calling JobAdder, so each change is handled once
     171
    168172= 1.3.4 =
    169173* Changed: updated the Freemius SDK to 2.13.5
  • debut-jobs/trunk/debut-jobs.php

    r3804819 r3807302  
    55 * Plugin URI:        https://debut.studio/products/jobs/
    66 * Description:       Show your JobAdder jobs on your WordPress site: a job board and careers page with search, filters and apply, kept in sync with JobAdder.
    7  * Version:           1.3.4
     7 * Version:           1.3.5
    88 * Author:            DEBUT Studio
    99 * Author URI:        https://debut.studio/
    … …  
    8686}
    8787// ── Plugin constants ──────────────────────────────────────────────────────────
    88 define( 'DEBUT_JOBS_VERSION', '1.3.4' );
     88define( 'DEBUT_JOBS_VERSION', '1.3.5' );
    8989define( 'DEBUT_JOBS_FILE', __FILE__ );
    9090define( 'DEBUT_JOBS_DIR', plugin_dir_path( __FILE__ ) );
  • debut-jobs/trunk/inc/class-board.php

    r3799226 r3807302  
    9393
    9494    /**
    95      * Ask JobAdder for the account's job boards, and how many live ads each
    96      * has, and remember them. JobAdder lists every board on the account
    97      * (channels like Indeed too) without saying which are website boards,
    98      * so the ad counts help the customer spot the right one.
     95     * Ask JobAdder for the account's job boards and remember them. JobAdder
     96     * lists every board on the account (channels like Indeed too) without
     97     * saying which are website boards, so the customer picks by name.
    9998     *
    10099     * @return array|WP_Error As boards().
    … …  
    121120            if ( $id === '' ) continue;
    122121            $name = trim( (string) ( $item['name'] ?? ( $item['title'] ?? '' ) ) );
     122            // Only the list itself: JobAdder asks that we don't call boards
     123            // other than the one the customer chooses.
    123124            $list[ $id ] = [
    124125                /* translators: %s: JobAdder job board ID */
    125126                'name' => $name !== '' ? $name : sprintf( __( 'Board %s', 'debut-jobs' ), $id ),
    126                 'ads'  => self::count_ads( $api_base, $id, $token ),
     127                'ads'  => null,
    127128            ];
    128129        }
    129130
    130         // Boards with live ads first.
    131131        uasort( $list, function ( $a, $b ) {
    132             return (int) ( $b['ads'] ?? -1 ) <=> (int) ( $a['ads'] ?? -1 ) ?: strcasecmp( $a['name'], $b['name'] );
     132            return strcasecmp( $a['name'], $b['name'] );
    133133        } );
    134134
    … …  
    137137    }
    138138
    139     /** Live ads on a board, or null if JobAdder wouldn't say. */
    140     private static function count_ads( string $api_base, string $id, string $token ): ?int {
    141         $res = Debut_Jobs_JobAdder_API::get( $api_base . '/jobboards/' . rawurlencode( $id ) . '/ads?limit=1', $token, 1 );
    142         if ( is_wp_error( $res ) ) return null;
    143         [ $body ] = $res;
    144         if ( isset( $body['totalCount'] ) ) return (int) $body['totalCount'];
    145         return isset( $body['items'] ) && is_array( $body['items'] ) ? count( $body['items'] ) : null;
    146     }
    147139
    148140    /**
    … …  
    182174        if ( $current !== '' && isset( $list[ $current ] ) ) return 'kept';
    183175
    184         // A site from before 1.3.0 on the old shared board: keep it while
    185         // it still works, so reconnecting doesn't empty the jobs page.
    186         if ( $current === self::LEGACY_ID && self::legacy_works() ) return 'kept';
     176        // A site from before 1.3.0 on the old shared board keeps it until
     177        // someone chooses a board, so reconnecting doesn't empty its jobs page.
     178        if ( $current === self::LEGACY_ID ) return 'kept';
    187179
    188180        if ( count( $list ) === 1 ) {
    … …  
    197189    }
    198190
    199     /** Whether the pre-1.3.0 shared board can still be read. */
    200     private static function legacy_works(): bool {
    201         $api_base = rtrim( (string) Debut_Jobs_Settings::get( 'api_base', '' ), '/' );
    202         $token    = Debut_Jobs_JobAdder_API::get_access_token();
    203         if ( $api_base === '' || is_wp_error( $token ) ) return false;
    204         $res = Debut_Jobs_JobAdder_API::get( $api_base . '/jobboards/' . self::LEGACY_ID . '/ads?limit=1', $token, 1 );
    205         return ! is_wp_error( $res );
    206     }
    207191
    208192    /** Forget the board when disconnecting. The jobs stay until another board is chosen. */
  • debut-jobs/trunk/readme.txt

    r3804819 r3807302  
    55Tested up to: 7.0
    66Requires PHP: 7.4
    7 Stable tag: 1.3.4
     7Stable tag: 1.3.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    166166== Changelog ==
    167167
     168= 1.3.5 =
     169* Changed: reconnecting only asks JobAdder for your list of job boards, and never calls a board you haven't chosen
     170* Changed: real-time sync ignores ad events for your other job boards (JobAdder sends one per board) and duplicate notifications, without calling JobAdder, so each change is handled once
     171
    168172= 1.3.4 =
    169173* Changed: updated the Freemius SDK to 2.13.5
Note: See TracChangeset for help on using the changeset viewer.