Changeset 1398582
- Timestamp:
- 04/18/2016 08:15:54 PM (10 years ago)
- Location:
- ccbpress-core/trunk
- Files:
-
- 8 edited
-
ccbpress-core.php (modified) (4 diffs)
-
includes/admin/purge-transients.php (modified) (1 diff)
-
includes/class-ccbpress-connection.php (modified) (1 diff)
-
includes/class-ccbpress-sync.php (modified) (1 diff)
-
includes/class-ccbpress-transients.php (modified) (2 diffs)
-
includes/schedule-get.php (modified) (1 diff)
-
includes/widgets/widget-group-info.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ccbpress-core/trunk/ccbpress-core.php
r1386691 r1398582 4 4 * Plugin URI: http://ccbpress.com/ 5 5 * Description: Display information from Church Community Builder on your WordPress site. 6 * Version: 1.0. 06 * Version: 1.0.1 7 7 * Author: CCBPress <info@ccbpress.com> 8 8 * Author URI: https://ccbpress.com/ … … 64 64 * @since 1.0.0 65 65 */ 66 public $version = '1.0. 0';66 public $version = '1.0.1'; 67 67 68 68 /** … … 123 123 .updated.ccbpress-core header h3 { margin: 0; position: absolute; top: 50%; transform: translateY(-50%); } 124 124 .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; } 126 126 .updated.ccbpress-core header .dismiss .dashicons { line-height: 50px; font-size: 24px; } 127 127 .updated.ccbpress-core .ccbpress-core-actions { display: flex; width: 100%; align-content: stretch; background-color: #f5f5f5; } 128 128 .updated.ccbpress-core .ccbpress-core-action { flex: 1 auto; height: 60px; position: relative; } 129 129 .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; } 131 131 .updated.ccbpress-core .ccbpress-core-action a:hover { background-color: rgba(0, 0, 0, 0.05); } 132 132 .updated.ccbpress-core .ccbpress-core-action a .dashicons { line-height: 60px; margin-right: 10px; } … … 344 344 public static function unschedule_cron() { 345 345 wp_clear_scheduled_hook( 'ccbpress_daily_maintenance' ); 346 wp_clear_scheduled_hook( 'ccbpress_transient_cache_cleanup' ); 346 347 } 347 348 -
ccbpress-core/trunk/includes/admin/purge-transients.php
r1378883 r1398582 9 9 global $wpdb; 10 10 11 $cache = $wpdb->get_col( "SELECT option_name FROM $wpdb->options where option_name LIKE '_transient_timeout_ccbp ress_%'" );11 $cache = $wpdb->get_col( "SELECT option_name FROM $wpdb->options where option_name LIKE '_transient_timeout_ccbp_%'" ); 12 12 13 13 if ( ! empty( $cache ) ) { -
ccbpress-core/trunk/includes/class-ccbpress-connection.php
r1386691 r1398582 49 49 $this->api_user = $api_user; 50 50 $this->api_pass = $api_pass; 51 $this->transient_prefix = 'ccbp ress_';51 $this->transient_prefix = 'ccbp_'; 52 52 $this->test_srv = 'api_status'; 53 53 $this->image_cache_dir = 'ccbpress'; -
ccbpress-core/trunk/includes/class-ccbpress-sync.php
r1386691 r1398582 154 154 155 155 // 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 ) { 157 157 continue; 158 158 } -
ccbpress-core/trunk/includes/class-ccbpress-transients.php
r1302421 r1398582 54 54 $data = get_site_transient( $fallback_transient ); 55 55 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 } 58 60 59 61 return $data; … … 69 71 $data = get_transient( $fallback_transient ); 70 72 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 } 73 77 74 78 return $data; -
ccbpress-core/trunk/includes/schedule-get.php
r1302421 r1398582 2 2 function ccbpress_schedule_get( $get_url, $cache_lifespan, $api_user, $api_pass, $transient_prefix ) { 3 3 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 ); 31 5 32 6 } -
ccbpress-core/trunk/includes/widgets/widget-group-info.php
r1386691 r1398582 61 61 } 62 62 63 if ( ! $ccbpress_data === false) {63 if ( false !== $ccbpress_data ) { 64 64 65 65 // Define the array to hold all found group -
ccbpress-core/trunk/readme.txt
r1386691 r1398582 4 4 Requires at least: 4.3 5 5 Tested up to: 4.5 6 Stable tag: 1.0. 06 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://ww.gnu.org/licenses/gpl-2.0.html … … 36 36 37 37 == 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. 38 44 39 45 = 1.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.