Plugin Directory

Changeset 2124831


Ignore:
Timestamp:
07/17/2019 06:43:06 PM (7 years ago)
Author:
nikolam
Message:

Fix term dates not being updated on sermon save in an specific scenario

Location:
sermon-manager-for-wordpress/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sermon-manager-for-wordpress/trunk/includes/class-sm-dates-wp.php

    r2028461 r2124831  
    162162                    }
    163163
    164                     $term = get_term_by( 'slug', $term, $taxonomy );
     164                    // Some sites pass name, some slug, so try both.
     165                    $term = get_term_by( 'name', $term, $taxonomy ) ?: get_term_by( 'slug', $term, $taxonomy );
    165166
    166167                    if ( ! $term instanceof WP_Error && $term && isset( $term->term_id ) ) {
  • sermon-manager-for-wordpress/trunk/includes/class-sm-install.php

    r1986896 r2124831  
    6363        '2.15.11' => array(
    6464            'sm_update_21511_update_term_dates',
     65        ),
     66        '2.15.16' => array(
     67            'sm_update_21516_update_term_dates',
    6568        ),
    6669    );
  • sermon-manager-for-wordpress/trunk/includes/sm-update-functions.php

    r1986896 r2124831  
    462462    update_option( 'wp_sm_updater_' . __FUNCTION__ . '_done', 1 );
    463463}
     464
     465/**
     466 * Re-update term dates that were not updated due to a bug.
     467 *
     468 * @see SM_Dates_WP::update_term_dates()
     469 */
     470function sm_update_21516_update_term_dates() {
     471    sm_update_21511_update_term_dates();
     472
     473    // Mark it as done, backup way.
     474    update_option( 'wp_sm_updater_' . __FUNCTION__ . '_done', 1 );
     475}
  • sermon-manager-for-wordpress/trunk/readme.txt

    r2120393 r2124831  
    130130* Fix: Preacher label not being replaced everywhere
    131131* Fix: Not getting the real latest series image via "latest_series" shortcode
     132* Fix: Some terms (series) not being ordered correctly by sermon date
    132133* Dev: Add a filter to disable sidebar on supported themes
    133134
Note: See TracChangeset for help on using the changeset viewer.