Plugin Directory

Changeset 2805086

Timestamp:
10/26/2022 03:22:59 PM (22 months ago)
Author:
jakeom
Message:

Tagging version 1.38.1

Location:
wp-job-manager
Files:
2 added
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-job-manager/tags/1.38.1/changelog.txt

    r2780949 r2805086  
     1
     2
     3
     4
     5
     6
    17= 1.38.0 =
    28* Enhancement: Add remote position to filtering (@tripflex)
  • wp-job-manager/tags/1.38.1/includes/3rd-party/3rd-party.php

    r2100476 r2805086  
    1414require_once JOB_MANAGER_PLUGIN_DIR . '/includes/3rd-party/rp4wp.php';
    1515require_once JOB_MANAGER_PLUGIN_DIR . '/includes/3rd-party/wp-all-import.php';
     16
  • wp-job-manager/tags/1.38.1/includes/class-wp-job-manager-shortcodes.php

    r2780619 r2805086  
    9696     */
    9797    public function handle_redirects() {
    98         // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Input is used safely.
    99         if ( ! get_current_user_id() || ( ! empty( $_REQUEST['job_id'] ) && job_manager_user_can_edit_job( intval( $_REQUEST['job_id'] ) ) ) ) {
     98        $submit_job_form_page_id = get_option( 'job_manager_submit_job_form_page_id' );
     99
     100        if ( ! is_user_logged_in() || ! is_page( $submit_job_form_page_id ) ||
     101             // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Input is used safely.
     102            ( ! empty( $_REQUEST['job_id'] ) && job_manager_user_can_edit_job( intval( $_REQUEST['job_id'] ) ) )
     103        ) {
    100104            return;
    101105        }
    102106
    103         $submit_job_form_page_id = get_option( 'job_manager_submit_job_form_page_id' );
    104         $submission_limit        = get_option( 'job_manager_submission_limit' );
    105         $job_count               = job_manager_count_user_job_listings();
     107        $submission_limit = get_option( 'job_manager_submission_limit' );
     108        $job_count        = job_manager_count_user_job_listings();
    106109
    107110        if (
     
    109112            && $submission_limit
    110113            && $job_count >= $submission_limit
    111             && is_page( $submit_job_form_page_id )
    112114        ) {
    113115            $employer_dashboard_page_id = get_option( 'job_manager_job_dashboard_page_id' );
  • wp-job-manager/tags/1.38.1/includes/forms/class-wp-job-manager-form-submit-job.php

    r2780619 r2805086  
    516516        if ( ! $this->should_application_field_skip_email_url_validation() && isset( $values['job']['application'] ) ) {
    517517            $allowed_application_method = get_option( 'job_manager_allowed_application_method', '' );
     518
    518519
    519520            $is_valid = true;
     
    526527            }
    527528
    528             switch ( $allowed_application_method ) {
    529                 case 'email':
    530                     if ( ! $is_valid || ! is_email( $values['job']['application'] ) ) {
    531                         throw new Exception( __( 'Please enter a valid application email address', 'wp-job-manager' ) );
    532                     }
    533                     break;
    534                 case 'url':
    535                     if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
    536                         throw new Exception( __( 'Please enter a valid application URL', 'wp-job-manager' ) );
    537                     }
    538                     break;
    539                 default:
    540                     if ( ! is_email( $values['job']['application'] ) ) {
     529            if ( $application_required || ! empty( $values['job']['application'] ) ) {
     530                switch ( $allowed_application_method ) {
     531                    case 'email':
     532                        if ( ! $is_valid || ! is_email( $values['job']['application'] ) ) {
     533                            throw new Exception( __( 'Please enter a valid application email address', 'wp-job-manager' ) );
     534                        }
     535                        break;
     536                    case 'url':
    541537                        if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
    542                             throw new Exception( __( 'Please enter a valid application email address or URL', 'wp-job-manager' ) );
     538                            throw new Exception( __( 'Please enter a valid application URL', 'wp-job-manager' ) );
    543539                        }
    544                     }
    545                     break;
     540                        break;
     541                    default:
     542                        if ( ! is_email( $values['job']['application'] ) ) {
     543                            if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
     544                                throw new Exception( __( 'Please enter a valid application email address or URL', 'wp-job-manager' ) );
     545                            }
     546                        }
     547                        break;
     548                }
    546549            }
    547550        }
  • wp-job-manager/tags/1.38.1/includes/helper/class-wp-job-manager-helper.php

    r2166302 r2805086  
    512512     * @param string $email
    513513     */
    514     private function activate_licence( $product_slug, $licence_key, $email ) {
     514    p function activate_licence( $product_slug, $licence_key, $email ) {
    515515        $response = $this->api->activate(
    516516            [
  • wp-job-manager/tags/1.38.1/includes/helper/views/html-licences.php

    r2745746 r2805086  
    4545                    echo '<div class="notice inline notice-' . esc_attr( $message['type'] ) . '"><p>' . wp_kses_post( $message['message'] ) . '</p></div>';
    4646                }
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
    4784                ?>
    48                 <form method="post">
    49                 <?php wp_nonce_field( 'wpjm-manage-licence' ); ?>
    50                 <?php
    51                 if ( ! empty( $licence['licence_key'] ) && ! empty( $licence['email'] ) ) {
    52                     ?>
    53                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_action" name="action" value="deactivate"/>
    54                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_plugin" name="product_slug" value="<?php echo esc_attr( $product_slug ); ?>"/>
    55 
    56                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key"><?php esc_html_e( 'License', 'wp-job-manager' ); ?>:
    57                         <input type="text" disabled="disabled" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key" name="licence_key" placeholder="XXXX-XXXX-XXXX-XXXX" value="<?php echo esc_attr( $licence['licence_key'] ); ?>"/>
    58                     </label>
    59                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email"><?php esc_html_e( 'Email', 'wp-job-manager' ); ?>:
    60                         <input type="email" disabled="disabled" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email" name="email" placeholder="<?php esc_attr_e( 'Email address', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( $licence['email'] ); ?>"/>
    61                     </label>
    62 
    63                     <input type="submit" class="button" name="submit" value="<?php esc_attr_e( 'Deactivate License', 'wp-job-manager' ); ?>" />
    64                     <?php
    65                 } else { // licence is not active.
    66                     ?>
    67                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_action" name="action" value="activate"/>
    68                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_plugin" name="product_slug" value="<?php echo esc_attr( $product_slug ); ?>"/>
    69                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key"><?php esc_html_e( 'License', 'wp-job-manager' ); ?>:
    70                         <input type="text" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key" name="licence_key" placeholder="XXXX-XXXX-XXXX-XXXX"/>
    71                     </label>
    72                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email"><?php esc_html_e( 'Email', 'wp-job-manager' ); ?>:
    73                         <input type="email" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email" name="email" placeholder="<?php esc_attr_e( 'Email address', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( get_option( 'admin_email' ) ); ?>"/>
    74                     </label>
    75                     <input type="submit" class="button" name="submit" value="<?php esc_attr_e( 'Activate License', 'wp-job-manager' ); ?>" />
    76                     <?php
    77                 } // end if : else licence is not active.
    78                 ?>
    79                 </form>
    8085            </div>
    8186        </div>
  • wp-job-manager/tags/1.38.1/languages/wp-job-manager.pot

    r2780619 r2805086  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Job Manager 1.38.0\n"
     5"Project-Id-Version: WP Job Manager 1.38.\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager/\n"
    77"Last-Translator: \n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-08-26T17:27:21+00:00\n"
     12"POT-Creation-Date: 2022-1+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.6.0\n"
     14"X-Generator: WP-CLI 2.\n"
    1515"X-Domain: wp-job-manager\n"
    1616
     
    3131#. Author of the plugin
    3232msgid "Automattic"
     33
     34
     35
     36
    3337msgstr ""
    3438
     
    278282
    279283#: includes/admin/class-wp-job-manager-cpt.php:507
    280 #: includes/class-wp-job-manager-shortcodes.php:393
     284#: includes/class-wp-job-manager-shortcodes.php:39
    281285msgid "Filled?"
    282286msgstr ""
     
    318322#: includes/admin/class-wp-job-manager-cpt.php:652
    319323#: includes/class-wp-job-manager-post-types.php:340
    320 #: includes/class-wp-job-manager-shortcodes.php:441
    321 #: includes/class-wp-job-manager-shortcodes.php:474
     324#: includes/class-wp-job-manager-shortcodes.php:44
     325#: includes/class-wp-job-manager-shortcodes.php:47
    322326msgid "Edit"
    323327msgstr ""
    324328
    325329#: includes/admin/class-wp-job-manager-cpt.php:659
    326 #: includes/class-wp-job-manager-shortcodes.php:489
     330#: includes/class-wp-job-manager-shortcodes.php:4
    327331msgid "Delete"
    328332msgstr ""
     
    15671571msgstr ""
    15681572
    1569 #: includes/class-wp-job-manager-shortcodes.php:201
     1573#: includes/class-wp-job-manager-shortcodes.php:20
    15701574msgid "Invalid ID"
    15711575msgstr ""
    15721576
    1573 #: includes/class-wp-job-manager-shortcodes.php:208
     1577#: includes/class-wp-job-manager-shortcodes.php:2
    15741578msgid "This position has already been filled"
    15751579msgstr ""
    15761580
    15771581#. translators: Placeholder %s is the job listing title.
    1578 #: includes/class-wp-job-manager-shortcodes.php:216
     1582#: includes/class-wp-job-manager-shortcodes.php:21
    15791583msgid "%s has been filled"
    15801584msgstr ""
    15811585
    1582 #: includes/class-wp-job-manager-shortcodes.php:221
     1586#: includes/class-wp-job-manager-shortcodes.php:22
    15831587msgid "This position is not filled"
    15841588msgstr ""
    15851589
    15861590#. translators: Placeholder %s is the job listing title.
    1587 #: includes/class-wp-job-manager-shortcodes.php:229
     1591#: includes/class-wp-job-manager-shortcodes.php:2
    15881592msgid "%s has been marked as not filled"
    15891593msgstr ""
    15901594
    15911595#. translators: Placeholder %s is the job listing title.
    1592 #: includes/class-wp-job-manager-shortcodes.php:237
     1596#: includes/class-wp-job-manager-shortcodes.php:23
    15931597msgid "%s has been deleted"
    15941598msgstr ""
    15951599
    1596 #: includes/class-wp-job-manager-shortcodes.php:242
    1597 #: includes/class-wp-job-manager-shortcodes.php:256
     1600#: includes/class-wp-job-manager-shortcodes.php:24
     1601#: includes/class-wp-job-manager-shortcodes.php:25
    15981602msgid "Missing submission page."
    15991603msgstr ""
    16001604
    16011605#. translators: Placeholder %s is the plural label for the job listing post type.
    1602 #: includes/class-wp-job-manager-shortcodes.php:392
     1606#: includes/class-wp-job-manager-shortcodes.php:39
    16031607#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:36
    16041608#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:52
     
    16071611msgstr ""
    16081612
    1609 #: includes/class-wp-job-manager-shortcodes.php:394
     1613#: includes/class-wp-job-manager-shortcodes.php:39
    16101614msgid "Date Posted"
    16111615msgstr ""
    16121616
    1613 #: includes/class-wp-job-manager-shortcodes.php:395
     1617#: includes/class-wp-job-manager-shortcodes.php:39
    16141618msgid "Listing Expires"
    16151619msgstr ""
    16161620
    1617 #: includes/class-wp-job-manager-shortcodes.php:447
     1621#: includes/class-wp-job-manager-shortcodes.php:44
    16181622msgid "Mark not filled"
    16191623msgstr ""
    16201624
    1621 #: includes/class-wp-job-manager-shortcodes.php:452
     1625#: includes/class-wp-job-manager-shortcodes.php:45
    16221626msgid "Mark filled"
    16231627msgstr ""
    16241628
    1625 #: includes/class-wp-job-manager-shortcodes.php:458
     1629#: includes/class-wp-job-manager-shortcodes.php:4
    16261630msgid "Duplicate"
    16271631msgstr ""
    16281632
    1629 #: includes/class-wp-job-manager-shortcodes.php:465
     1633#: includes/class-wp-job-manager-shortcodes.php:46
    16301634msgid "Relist"
    16311635msgstr ""
    16321636
    1633 #: includes/class-wp-job-manager-shortcodes.php:482
     1637#: includes/class-wp-job-manager-shortcodes.php:48
    16341638msgid "Continue Submission"
    16351639msgstr ""
    16361640
    1637 #: includes/class-wp-job-manager-shortcodes.php:688
    1638 #: includes/class-wp-job-manager-shortcodes.php:727
     1641#: includes/class-wp-job-manager-shortcodes.php:6
     1642#: includes/class-wp-job-manager-shortcodes.php:72
    16391643msgid "Load more listings"
    16401644msgstr ""
     
    17771781
    17781782#: includes/forms/class-wp-job-manager-form-submit-job.php:93
    1779 #: includes/forms/class-wp-job-manager-form-submit-job.php:667
     1783#: includes/forms/class-wp-job-manager-form-submit-job.php:6
    17801784#: templates/job-preview.php:30
    17811785msgid "Preview"
     
    18681872msgstr ""
    18691873
    1870 #: includes/forms/class-wp-job-manager-form-submit-job.php:531
     1874#: includes/forms/class-wp-job-manager-form-submit-job.php:53
    18711875msgid "Please enter a valid application email address"
    18721876msgstr ""
    18731877
    1874 #: includes/forms/class-wp-job-manager-form-submit-job.php:536
     1878#: includes/forms/class-wp-job-manager-form-submit-job.php:53
    18751879msgid "Please enter a valid application URL"
    18761880msgstr ""
    18771881
    1878 #: includes/forms/class-wp-job-manager-form-submit-job.php:542
     1882#: includes/forms/class-wp-job-manager-form-submit-job.php:54
    18791883msgid "Please enter a valid application email address or URL"
    18801884msgstr ""
    18811885
    1882 #: includes/forms/class-wp-job-manager-form-submit-job.php:726
     1886#: includes/forms/class-wp-job-manager-form-submit-job.php:72
    18831887msgid "Please enter a username."
    18841888msgstr ""
    18851889
    1886 #: includes/forms/class-wp-job-manager-form-submit-job.php:730
     1890#: includes/forms/class-wp-job-manager-form-submit-job.php:73
    18871891msgid "Please enter a password."
    18881892msgstr ""
    18891893
    1890 #: includes/forms/class-wp-job-manager-form-submit-job.php:734
     1894#: includes/forms/class-wp-job-manager-form-submit-job.php:73
    18911895msgid "Please enter your email address."
    18921896msgstr ""
    18931897
    1894 #: includes/forms/class-wp-job-manager-form-submit-job.php:740
     1898#: includes/forms/class-wp-job-manager-form-submit-job.php:74
    18951899msgid "Passwords must match."
    18961900msgstr ""
    18971901
    18981902#. translators: Placeholder %s is the password hint.
    1899 #: includes/forms/class-wp-job-manager-form-submit-job.php:746
     1903#: includes/forms/class-wp-job-manager-form-submit-job.php:74
    19001904msgid "Invalid Password: %s"
    19011905msgstr ""
    19021906
    1903 #: includes/forms/class-wp-job-manager-form-submit-job.php:748
     1907#: includes/forms/class-wp-job-manager-form-submit-job.php:7
    19041908msgid "Password is not valid."
    19051909msgstr ""
    19061910
    1907 #: includes/forms/class-wp-job-manager-form-submit-job.php:780
     1911#: includes/forms/class-wp-job-manager-form-submit-job.php:78
    19081912msgid "You must be signed in to post a new listing."
    19091913msgstr ""
    19101914
    19111915#. translators: placeholder is the URL to the job dashboard page.
    1912 #: includes/forms/class-wp-job-manager-form-submit-job.php:806
     1916#: includes/forms/class-wp-job-manager-form-submit-job.php:80
    19131917msgid "Draft was saved. Job listing drafts can be resumed from the <a href=\"%s\">job dashboard</a>."
    19141918msgstr ""
     
    19241928
    19251929#: includes/helper/class-wp-job-manager-helper.php:285
    1926 #: includes/helper/views/html-licences.php:75
     1930#: includes/helper/views/html-licences.php:7
    19271931#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:278
    19281932msgid "Activate License"
     
    19681972msgstr ""
    19691973
    1970 #: includes/helper/views/html-licences.php:56
    1971 #: includes/helper/views/html-licences.php:69
     1974#: includes/helper/views/html-licences.php:5
     1975#: includes/helper/views/html-licences.php:
    19721976msgid "License"
    1973 msgstr ""
    1974 
    1975 #: includes/helper/views/html-licences.php:59
    1976 #: includes/helper/views/html-licences.php:72
    1977 msgid "Email"
    19781977msgstr ""
    19791978
    19801979#: includes/helper/views/html-licences.php:60
    19811980#: includes/helper/views/html-licences.php:73
     1981
     1982
     1983
     1984
     1985
    19821986msgid "Email address"
    19831987msgstr ""
    19841988
    1985 #: includes/helper/views/html-licences.php:63
     1989#: includes/helper/views/html-licences.php:6
    19861990msgid "Deactivate License"
    19871991msgstr ""
    19881992
    19891993#. translators: Placeholder %s is the lost license key URL.
    1990 #: includes/helper/views/html-licences.php:84
     1994#: includes/helper/views/html-licences.php:8
    19911995msgid "Lost your license key? <a href=\"%s\">Retrieve it here</a>."
    19921996msgstr ""
    19931997
    1994 #: includes/helper/views/html-licences.php:86
     1998#: includes/helper/views/html-licences.php:
    19951999msgid "No plugins are activated that have licenses managed by WP Job Manager."
    19962000msgstr ""
  • wp-job-manager/tags/1.38.1/readme.txt

    r2780949 r2805086  
    153153
    154154== Changelog ==
     155
     156
     157
     158
     159
     160
    155161
    156162= 1.38.0 =
  • wp-job-manager/tags/1.38.1/wp-job-manager-template.php

    r2758091 r2805086  
    11351135    $company_twitter = get_the_company_twitter( $post );
    11361136
    1137     if ( 0 === strlen( $company_twitter ) ) {
     1137    if ( ( $company_twitter ) ) {
    11381138        return null;
    11391139    }
     
    11631163    $company_twitter = $post->_company_twitter;
    11641164
    1165     if ( 0 === strlen( $company_twitter ) ) {
     1165    if ( ( $company_twitter ) ) {
    11661166        return null;
    11671167    }
  • wp-job-manager/tags/1.38.1/wp-job-manager.php

    r2780619 r2805086  
    44 * Plugin URI: https://wpjobmanager.com/
    55 * Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
    6  * Version: 1.38.0
     6 * Version: 1.38.
    77 * Author: Automattic
    88 * Author URI: https://wpjobmanager.com/
    99 * Requires at least: 5.8
    10  * Tested up to: 6.0
     10 * Tested up to: 6.
    1111 * Requires PHP: 7.2
    1212 * Text Domain: wp-job-manager
     
    2222
    2323// Define constants.
    24 define( 'JOB_MANAGER_VERSION', '1.38.0' );
     24define( 'JOB_MANAGER_VERSION', '1.38.' );
    2525define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
    2626define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
  • wp-job-manager/trunk/changelog.txt

    r2780949 r2805086  
     1
     2
     3
     4
     5
     6
    17= 1.38.0 =
    28* Enhancement: Add remote position to filtering (@tripflex)
  • wp-job-manager/trunk/includes/3rd-party/3rd-party.php

    r2100476 r2805086  
    1414require_once JOB_MANAGER_PLUGIN_DIR . '/includes/3rd-party/rp4wp.php';
    1515require_once JOB_MANAGER_PLUGIN_DIR . '/includes/3rd-party/wp-all-import.php';
     16
  • wp-job-manager/trunk/includes/class-wp-job-manager-shortcodes.php

    r2780619 r2805086  
    9696     */
    9797    public function handle_redirects() {
    98         // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Input is used safely.
    99         if ( ! get_current_user_id() || ( ! empty( $_REQUEST['job_id'] ) && job_manager_user_can_edit_job( intval( $_REQUEST['job_id'] ) ) ) ) {
     98        $submit_job_form_page_id = get_option( 'job_manager_submit_job_form_page_id' );
     99
     100        if ( ! is_user_logged_in() || ! is_page( $submit_job_form_page_id ) ||
     101             // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Input is used safely.
     102            ( ! empty( $_REQUEST['job_id'] ) && job_manager_user_can_edit_job( intval( $_REQUEST['job_id'] ) ) )
     103        ) {
    100104            return;
    101105        }
    102106
    103         $submit_job_form_page_id = get_option( 'job_manager_submit_job_form_page_id' );
    104         $submission_limit        = get_option( 'job_manager_submission_limit' );
    105         $job_count               = job_manager_count_user_job_listings();
     107        $submission_limit = get_option( 'job_manager_submission_limit' );
     108        $job_count        = job_manager_count_user_job_listings();
    106109
    107110        if (
     
    109112            && $submission_limit
    110113            && $job_count >= $submission_limit
    111             && is_page( $submit_job_form_page_id )
    112114        ) {
    113115            $employer_dashboard_page_id = get_option( 'job_manager_job_dashboard_page_id' );
  • wp-job-manager/trunk/includes/forms/class-wp-job-manager-form-submit-job.php

    r2780619 r2805086  
    516516        if ( ! $this->should_application_field_skip_email_url_validation() && isset( $values['job']['application'] ) ) {
    517517            $allowed_application_method = get_option( 'job_manager_allowed_application_method', '' );
     518
    518519
    519520            $is_valid = true;
     
    526527            }
    527528
    528             switch ( $allowed_application_method ) {
    529                 case 'email':
    530                     if ( ! $is_valid || ! is_email( $values['job']['application'] ) ) {
    531                         throw new Exception( __( 'Please enter a valid application email address', 'wp-job-manager' ) );
    532                     }
    533                     break;
    534                 case 'url':
    535                     if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
    536                         throw new Exception( __( 'Please enter a valid application URL', 'wp-job-manager' ) );
    537                     }
    538                     break;
    539                 default:
    540                     if ( ! is_email( $values['job']['application'] ) ) {
     529            if ( $application_required || ! empty( $values['job']['application'] ) ) {
     530                switch ( $allowed_application_method ) {
     531                    case 'email':
     532                        if ( ! $is_valid || ! is_email( $values['job']['application'] ) ) {
     533                            throw new Exception( __( 'Please enter a valid application email address', 'wp-job-manager' ) );
     534                        }
     535                        break;
     536                    case 'url':
    541537                        if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
    542                             throw new Exception( __( 'Please enter a valid application email address or URL', 'wp-job-manager' ) );
     538                            throw new Exception( __( 'Please enter a valid application URL', 'wp-job-manager' ) );
    543539                        }
    544                     }
    545                     break;
     540                        break;
     541                    default:
     542                        if ( ! is_email( $values['job']['application'] ) ) {
     543                            if ( ! $is_valid || ! filter_var( $values['job']['application'], FILTER_VALIDATE_URL ) ) {
     544                                throw new Exception( __( 'Please enter a valid application email address or URL', 'wp-job-manager' ) );
     545                            }
     546                        }
     547                        break;
     548                }
    546549            }
    547550        }
  • wp-job-manager/trunk/includes/helper/class-wp-job-manager-helper.php

    r2166302 r2805086  
    512512     * @param string $email
    513513     */
    514     private function activate_licence( $product_slug, $licence_key, $email ) {
     514    p function activate_licence( $product_slug, $licence_key, $email ) {
    515515        $response = $this->api->activate(
    516516            [
  • wp-job-manager/trunk/includes/helper/views/html-licences.php

    r2745746 r2805086  
    4545                    echo '<div class="notice inline notice-' . esc_attr( $message['type'] ) . '"><p>' . wp_kses_post( $message['message'] ) . '</p></div>';
    4646                }
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
     65
     66
     67
     68
     69
     70
     71
     72
     73
     74
     75
     76
     77
     78
     79
     80
     81
     82
     83
    4784                ?>
    48                 <form method="post">
    49                 <?php wp_nonce_field( 'wpjm-manage-licence' ); ?>
    50                 <?php
    51                 if ( ! empty( $licence['licence_key'] ) && ! empty( $licence['email'] ) ) {
    52                     ?>
    53                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_action" name="action" value="deactivate"/>
    54                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_plugin" name="product_slug" value="<?php echo esc_attr( $product_slug ); ?>"/>
    55 
    56                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key"><?php esc_html_e( 'License', 'wp-job-manager' ); ?>:
    57                         <input type="text" disabled="disabled" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key" name="licence_key" placeholder="XXXX-XXXX-XXXX-XXXX" value="<?php echo esc_attr( $licence['licence_key'] ); ?>"/>
    58                     </label>
    59                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email"><?php esc_html_e( 'Email', 'wp-job-manager' ); ?>:
    60                         <input type="email" disabled="disabled" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email" name="email" placeholder="<?php esc_attr_e( 'Email address', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( $licence['email'] ); ?>"/>
    61                     </label>
    62 
    63                     <input type="submit" class="button" name="submit" value="<?php esc_attr_e( 'Deactivate License', 'wp-job-manager' ); ?>" />
    64                     <?php
    65                 } else { // licence is not active.
    66                     ?>
    67                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_action" name="action" value="activate"/>
    68                     <input type="hidden" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_plugin" name="product_slug" value="<?php echo esc_attr( $product_slug ); ?>"/>
    69                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key"><?php esc_html_e( 'License', 'wp-job-manager' ); ?>:
    70                         <input type="text" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_licence_key" name="licence_key" placeholder="XXXX-XXXX-XXXX-XXXX"/>
    71                     </label>
    72                     <label for="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email"><?php esc_html_e( 'Email', 'wp-job-manager' ); ?>:
    73                         <input type="email" id="<?php echo esc_attr( sanitize_title( $product_slug ) ); ?>_email" name="email" placeholder="<?php esc_attr_e( 'Email address', 'wp-job-manager' ); ?>" value="<?php echo esc_attr( get_option( 'admin_email' ) ); ?>"/>
    74                     </label>
    75                     <input type="submit" class="button" name="submit" value="<?php esc_attr_e( 'Activate License', 'wp-job-manager' ); ?>" />
    76                     <?php
    77                 } // end if : else licence is not active.
    78                 ?>
    79                 </form>
    8085            </div>
    8186        </div>
  • wp-job-manager/trunk/languages/wp-job-manager.pot

    r2780619 r2805086  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: WP Job Manager 1.38.0\n"
     5"Project-Id-Version: WP Job Manager 1.38.\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-job-manager/\n"
    77"Last-Translator: \n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2022-08-26T17:27:21+00:00\n"
     12"POT-Creation-Date: 2022-1+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.6.0\n"
     14"X-Generator: WP-CLI 2.\n"
    1515"X-Domain: wp-job-manager\n"
    1616
     
    3131#. Author of the plugin
    3232msgid "Automattic"
     33
     34
     35
     36
    3337msgstr ""
    3438
     
    278282
    279283#: includes/admin/class-wp-job-manager-cpt.php:507
    280 #: includes/class-wp-job-manager-shortcodes.php:393
     284#: includes/class-wp-job-manager-shortcodes.php:39
    281285msgid "Filled?"
    282286msgstr ""
     
    318322#: includes/admin/class-wp-job-manager-cpt.php:652
    319323#: includes/class-wp-job-manager-post-types.php:340
    320 #: includes/class-wp-job-manager-shortcodes.php:441
    321 #: includes/class-wp-job-manager-shortcodes.php:474
     324#: includes/class-wp-job-manager-shortcodes.php:44
     325#: includes/class-wp-job-manager-shortcodes.php:47
    322326msgid "Edit"
    323327msgstr ""
    324328
    325329#: includes/admin/class-wp-job-manager-cpt.php:659
    326 #: includes/class-wp-job-manager-shortcodes.php:489
     330#: includes/class-wp-job-manager-shortcodes.php:4
    327331msgid "Delete"
    328332msgstr ""
     
    15671571msgstr ""
    15681572
    1569 #: includes/class-wp-job-manager-shortcodes.php:201
     1573#: includes/class-wp-job-manager-shortcodes.php:20
    15701574msgid "Invalid ID"
    15711575msgstr ""
    15721576
    1573 #: includes/class-wp-job-manager-shortcodes.php:208
     1577#: includes/class-wp-job-manager-shortcodes.php:2
    15741578msgid "This position has already been filled"
    15751579msgstr ""
    15761580
    15771581#. translators: Placeholder %s is the job listing title.
    1578 #: includes/class-wp-job-manager-shortcodes.php:216
     1582#: includes/class-wp-job-manager-shortcodes.php:21
    15791583msgid "%s has been filled"
    15801584msgstr ""
    15811585
    1582 #: includes/class-wp-job-manager-shortcodes.php:221
     1586#: includes/class-wp-job-manager-shortcodes.php:22
    15831587msgid "This position is not filled"
    15841588msgstr ""
    15851589
    15861590#. translators: Placeholder %s is the job listing title.
    1587 #: includes/class-wp-job-manager-shortcodes.php:229
     1591#: includes/class-wp-job-manager-shortcodes.php:2
    15881592msgid "%s has been marked as not filled"
    15891593msgstr ""
    15901594
    15911595#. translators: Placeholder %s is the job listing title.
    1592 #: includes/class-wp-job-manager-shortcodes.php:237
     1596#: includes/class-wp-job-manager-shortcodes.php:23
    15931597msgid "%s has been deleted"
    15941598msgstr ""
    15951599
    1596 #: includes/class-wp-job-manager-shortcodes.php:242
    1597 #: includes/class-wp-job-manager-shortcodes.php:256
     1600#: includes/class-wp-job-manager-shortcodes.php:24
     1601#: includes/class-wp-job-manager-shortcodes.php:25
    15981602msgid "Missing submission page."
    15991603msgstr ""
    16001604
    16011605#. translators: Placeholder %s is the plural label for the job listing post type.
    1602 #: includes/class-wp-job-manager-shortcodes.php:392
     1606#: includes/class-wp-job-manager-shortcodes.php:39
    16031607#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:36
    16041608#: includes/widgets/class-wp-job-manager-widget-featured-jobs.php:52
     
    16071611msgstr ""
    16081612
    1609 #: includes/class-wp-job-manager-shortcodes.php:394
     1613#: includes/class-wp-job-manager-shortcodes.php:39
    16101614msgid "Date Posted"
    16111615msgstr ""
    16121616
    1613 #: includes/class-wp-job-manager-shortcodes.php:395
     1617#: includes/class-wp-job-manager-shortcodes.php:39
    16141618msgid "Listing Expires"
    16151619msgstr ""
    16161620
    1617 #: includes/class-wp-job-manager-shortcodes.php:447
     1621#: includes/class-wp-job-manager-shortcodes.php:44
    16181622msgid "Mark not filled"
    16191623msgstr ""
    16201624
    1621 #: includes/class-wp-job-manager-shortcodes.php:452
     1625#: includes/class-wp-job-manager-shortcodes.php:45
    16221626msgid "Mark filled"
    16231627msgstr ""
    16241628
    1625 #: includes/class-wp-job-manager-shortcodes.php:458
     1629#: includes/class-wp-job-manager-shortcodes.php:4
    16261630msgid "Duplicate"
    16271631msgstr ""
    16281632
    1629 #: includes/class-wp-job-manager-shortcodes.php:465
     1633#: includes/class-wp-job-manager-shortcodes.php:46
    16301634msgid "Relist"
    16311635msgstr ""
    16321636
    1633 #: includes/class-wp-job-manager-shortcodes.php:482
     1637#: includes/class-wp-job-manager-shortcodes.php:48
    16341638msgid "Continue Submission"
    16351639msgstr ""
    16361640
    1637 #: includes/class-wp-job-manager-shortcodes.php:688
    1638 #: includes/class-wp-job-manager-shortcodes.php:727
     1641#: includes/class-wp-job-manager-shortcodes.php:6
     1642#: includes/class-wp-job-manager-shortcodes.php:72
    16391643msgid "Load more listings"
    16401644msgstr ""
     
    17771781
    17781782#: includes/forms/class-wp-job-manager-form-submit-job.php:93
    1779 #: includes/forms/class-wp-job-manager-form-submit-job.php:667
     1783#: includes/forms/class-wp-job-manager-form-submit-job.php:6
    17801784#: templates/job-preview.php:30
    17811785msgid "Preview"
     
    18681872msgstr ""
    18691873
    1870 #: includes/forms/class-wp-job-manager-form-submit-job.php:531
     1874#: includes/forms/class-wp-job-manager-form-submit-job.php:53
    18711875msgid "Please enter a valid application email address"
    18721876msgstr ""
    18731877
    1874 #: includes/forms/class-wp-job-manager-form-submit-job.php:536
     1878#: includes/forms/class-wp-job-manager-form-submit-job.php:53
    18751879msgid "Please enter a valid application URL"
    18761880msgstr ""
    18771881
    1878 #: includes/forms/class-wp-job-manager-form-submit-job.php:542
     1882#: includes/forms/class-wp-job-manager-form-submit-job.php:54
    18791883msgid "Please enter a valid application email address or URL"
    18801884msgstr ""
    18811885
    1882 #: includes/forms/class-wp-job-manager-form-submit-job.php:726
     1886#: includes/forms/class-wp-job-manager-form-submit-job.php:72
    18831887msgid "Please enter a username."
    18841888msgstr ""
    18851889
    1886 #: includes/forms/class-wp-job-manager-form-submit-job.php:730
     1890#: includes/forms/class-wp-job-manager-form-submit-job.php:73
    18871891msgid "Please enter a password."
    18881892msgstr ""
    18891893
    1890 #: includes/forms/class-wp-job-manager-form-submit-job.php:734
     1894#: includes/forms/class-wp-job-manager-form-submit-job.php:73
    18911895msgid "Please enter your email address."
    18921896msgstr ""
    18931897
    1894 #: includes/forms/class-wp-job-manager-form-submit-job.php:740
     1898#: includes/forms/class-wp-job-manager-form-submit-job.php:74
    18951899msgid "Passwords must match."
    18961900msgstr ""
    18971901
    18981902#. translators: Placeholder %s is the password hint.
    1899 #: includes/forms/class-wp-job-manager-form-submit-job.php:746
     1903#: includes/forms/class-wp-job-manager-form-submit-job.php:74
    19001904msgid "Invalid Password: %s"
    19011905msgstr ""
    19021906
    1903 #: includes/forms/class-wp-job-manager-form-submit-job.php:748
     1907#: includes/forms/class-wp-job-manager-form-submit-job.php:7
    19041908msgid "Password is not valid."
    19051909msgstr ""
    19061910
    1907 #: includes/forms/class-wp-job-manager-form-submit-job.php:780
     1911#: includes/forms/class-wp-job-manager-form-submit-job.php:78
    19081912msgid "You must be signed in to post a new listing."
    19091913msgstr ""
    19101914
    19111915#. translators: placeholder is the URL to the job dashboard page.
    1912 #: includes/forms/class-wp-job-manager-form-submit-job.php:806
     1916#: includes/forms/class-wp-job-manager-form-submit-job.php:80
    19131917msgid "Draft was saved. Job listing drafts can be resumed from the <a href=\"%s\">job dashboard</a>."
    19141918msgstr ""
     
    19241928
    19251929#: includes/helper/class-wp-job-manager-helper.php:285
    1926 #: includes/helper/views/html-licences.php:75
     1930#: includes/helper/views/html-licences.php:7
    19271931#: tests/php/tests/includes/helper/test_class.wp-job-manager-helper.php:278
    19281932msgid "Activate License"
     
    19681972msgstr ""
    19691973
    1970 #: includes/helper/views/html-licences.php:56
    1971 #: includes/helper/views/html-licences.php:69
     1974#: includes/helper/views/html-licences.php:5
     1975#: includes/helper/views/html-licences.php:
    19721976msgid "License"
    1973 msgstr ""
    1974 
    1975 #: includes/helper/views/html-licences.php:59
    1976 #: includes/helper/views/html-licences.php:72
    1977 msgid "Email"
    19781977msgstr ""
    19791978
    19801979#: includes/helper/views/html-licences.php:60
    19811980#: includes/helper/views/html-licences.php:73
     1981
     1982
     1983
     1984
     1985
    19821986msgid "Email address"
    19831987msgstr ""
    19841988
    1985 #: includes/helper/views/html-licences.php:63
     1989#: includes/helper/views/html-licences.php:6
    19861990msgid "Deactivate License"
    19871991msgstr ""
    19881992
    19891993#. translators: Placeholder %s is the lost license key URL.
    1990 #: includes/helper/views/html-licences.php:84
     1994#: includes/helper/views/html-licences.php:8
    19911995msgid "Lost your license key? <a href=\"%s\">Retrieve it here</a>."
    19921996msgstr ""
    19931997
    1994 #: includes/helper/views/html-licences.php:86
     1998#: includes/helper/views/html-licences.php:
    19951999msgid "No plugins are activated that have licenses managed by WP Job Manager."
    19962000msgstr ""
  • wp-job-manager/trunk/readme.txt

    r2780949 r2805086  
    153153
    154154== Changelog ==
     155
     156
     157
     158
     159
     160
    155161
    156162= 1.38.0 =
  • wp-job-manager/trunk/wp-job-manager-template.php

    r2758091 r2805086  
    11351135    $company_twitter = get_the_company_twitter( $post );
    11361136
    1137     if ( 0 === strlen( $company_twitter ) ) {
     1137    if ( ( $company_twitter ) ) {
    11381138        return null;
    11391139    }
     
    11631163    $company_twitter = $post->_company_twitter;
    11641164
    1165     if ( 0 === strlen( $company_twitter ) ) {
     1165    if ( ( $company_twitter ) ) {
    11661166        return null;
    11671167    }
  • wp-job-manager/trunk/wp-job-manager.php

    r2780619 r2805086  
    44 * Plugin URI: https://wpjobmanager.com/
    55 * Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site.
    6  * Version: 1.38.0
     6 * Version: 1.38.
    77 * Author: Automattic
    88 * Author URI: https://wpjobmanager.com/
    99 * Requires at least: 5.8
    10  * Tested up to: 6.0
     10 * Tested up to: 6.
    1111 * Requires PHP: 7.2
    1212 * Text Domain: wp-job-manager
     
    2222
    2323// Define constants.
    24 define( 'JOB_MANAGER_VERSION', '1.38.0' );
     24define( 'JOB_MANAGER_VERSION', '1.38.' );
    2525define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
    2626define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );
Note: See TracChangeset for help on using the changeset viewer.