Plugin Directory

Changeset 1398582


Ignore:
Timestamp:
04/18/2016 08:15:54 PM (10 years ago)
Author:
firetree
Message:

v1.0.1

Location:
ccbpress-core/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • ccbpress-core/trunk/ccbpress-core.php

    r1386691 r1398582  
    44 * Plugin URI: http://ccbpress.com/
    55 * Description: Display information from Church Community Builder on your WordPress site.
    6  * Version: 1.0.0
     6 * Version: 1.0.1
    77 * Author: CCBPress <info@ccbpress.com>
    88 * Author URI: https://ccbpress.com/
     
    6464    * @since 1.0.0
    6565    */
    66    public $version = '1.0.0';
     66   public $version = '1.0.1';
    6767
    6868   /**
     
    123123                    .updated.ccbpress-core header h3 { margin: 0; position: absolute; top: 50%; transform: translateY(-50%); }
    124124                    .updated.ccbpress-core header h3 span { color: #ff5555; }
    125                     .updated.ccbpress-core header .dismiss { flex-grow: 0; flex-shrink: 0; width: 70px; height: 70px; background-color: #ff5555; color: #fff; line-height: 50px; text-align: center; }
     125                    .updated.ccbpress-core header .dismiss { flex-grow: 0; flex-shrink: 0; width: 70px; height: 70px; background-color: #ff5555; color: #fff; line-height: 50px; text-align: center; text-decoration: none; }
    126126                    .updated.ccbpress-core header .dismiss .dashicons { line-height: 50px; font-size: 24px; }
    127127                    .updated.ccbpress-core .ccbpress-core-actions { display: flex; width: 100%; align-content: stretch; background-color: #f5f5f5; }
    128128                    .updated.ccbpress-core .ccbpress-core-action { flex: 1 auto; height: 60px; position: relative; }
    129129                    .updated.ccbpress-core .ccbpress-core-action.mailchimp { min-width: 33%; padding: 0 15px; overflow: hidden; }
    130                     .updated.ccbpress-core .ccbpress-core-action a { display: block; height: 60px; line-height: 60px; padding: 0 15px; color: #ff5555; }
     130                    .updated.ccbpress-core .ccbpress-core-action a { display: block; height: 60px; line-height: 60px; padding: 0 15px; color: #ff5555; text-decoration: none; }
    131131                    .updated.ccbpress-core .ccbpress-core-action a:hover { background-color: rgba(0, 0, 0, 0.05); }
    132132                    .updated.ccbpress-core .ccbpress-core-action a .dashicons { line-height: 60px; margin-right: 10px; }
     
    344344     public static function unschedule_cron() {
    345345         wp_clear_scheduled_hook( 'ccbpress_daily_maintenance' );
     346         wp_clear_scheduled_hook( 'ccbpress_transient_cache_cleanup' );
    346347     }
    347348
  • ccbpress-core/trunk/includes/admin/purge-transients.php

    r1378883 r1398582  
    99        global $wpdb;
    1010
    11         $cache = $wpdb->get_col( "SELECT option_name FROM $wpdb->options where option_name LIKE '_transient_timeout_ccbpress_%'" );
     11        $cache = $wpdb->get_col( "SELECT option_name FROM $wpdb->options where option_name LIKE '_transient_timeout_ccbp_%'" );
    1212
    1313        if ( ! empty( $cache ) ) {
  • ccbpress-core/trunk/includes/class-ccbpress-connection.php

    r1386691 r1398582  
    4949        $this->api_user             = $api_user;
    5050        $this->api_pass             = $api_pass;
    51         $this->transient_prefix     = 'ccbpress_';
     51        $this->transient_prefix     = 'ccbp_';
    5252        $this->test_srv             = 'api_status';
    5353        $this->image_cache_dir      = 'ccbpress';
  • ccbpress-core/trunk/includes/class-ccbpress-sync.php

    r1386691 r1398582  
    154154
    155155            // Skip the event if it is not listed
    156             if ( 'false' == $event->listed || 'false' == $event->public_calendar_listed ) {
     156            if ( 'false' == $event->public_calendar_listed ) {
    157157                continue;
    158158            }
  • ccbpress-core/trunk/includes/class-ccbpress-transients.php

    r1302421 r1398582  
    5454                $data = get_site_transient( $fallback_transient );
    5555
    56                 wp_clear_scheduled_hook( $hook, $args );
    57                 wp_schedule_single_event( time(), $hook, $args );
     56                if ( ! wp_get_schedule( $hook, $args ) ) {
     57                    wp_clear_scheduled_hook( $hook, $args );
     58                    wp_schedule_single_event( time(), $hook, $args );
     59                }
    5860
    5961                return $data;
     
    6971                $data = get_transient( $fallback_transient );
    7072
    71                 wp_clear_scheduled_hook( $hook, $args );
    72                 wp_schedule_single_event( time(), $hook, $args );
     73                if ( ! wp_get_schedule( $hook, $args ) ) {
     74                    wp_clear_scheduled_hook( $hook, $args );
     75                    wp_schedule_single_event( time(), $hook, $args );
     76                }
    7377
    7478                return $data;
  • ccbpress-core/trunk/includes/schedule-get.php

    r1302421 r1398582  
    22function ccbpress_schedule_get( $get_url, $cache_lifespan, $api_user, $api_pass, $transient_prefix ) {
    33
    4     $transient_name = $transient_prefix . md5( $get_url );
    5 
    6     $args = array(
    7         'headers'   => array(
    8             'Authorization' => 'Basic ' . base64_encode( $api_user . ':' . $api_pass )
    9             ),
    10         'timeout'   => 300,
    11         );
    12 
    13     $response = wp_remote_get( $get_url, $args );
    14     if ( ! is_wp_error( $response ) ) {
    15 
    16         // Grab the body from the response
    17         $ccb_data = wp_remote_retrieve_body( $response );
    18 
    19         // Save the transient data according to the $cache_lifespan
    20         if ( is_multisite() ) {
    21             set_site_transient( $transient_name, $ccb_data, $cache_lifespan * MINUTE_IN_SECONDS );
    22             set_site_transient( $transient_name . '_', $ccb_data, 10080 * MINUTE_IN_SECONDS );
    23         } else {
    24             set_transient( $transient_name, $ccb_data, $cache_lifespan * MINUTE_IN_SECONDS );
    25             set_transient( $transient_name . '_', $ccb_data, 10080 * MINUTE_IN_SECONDS );
    26         }
    27 
    28         CCBPress_Core()->ccb->find_images( $ccb_data );
    29 
    30     }
     4    CCBPress()->ccb->get( $get_url, $cache_lifespan );
    315
    326}
  • ccbpress-core/trunk/includes/widgets/widget-group-info.php

    r1386691 r1398582  
    6161        }
    6262
    63         if ( ! $ccbpress_data === false ) {
     63        if ( false !== $ccbpress_data ) {
    6464
    6565            // Define the array to hold all found group
  • ccbpress-core/trunk/readme.txt

    r1386691 r1398582  
    44Requires at least: 4.3
    55Tested up to: 4.5
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77License: GPLv2 or later
    88License URI: http://ww.gnu.org/licenses/gpl-2.0.html
     
    3636
    3737== Changelog ==
     38
     39= 1.0.1 =
     40* Fixed an issue with the cache not working properly.
     41* A cache cleanup function is now properly unscheduled on plugin deactivation.
     42* Group images should now update correctly.
     43* Minor display adjustments.
    3844
    3945= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.