\\', '/', $result ); $result = str_replace( '//', '/', $result ); $result = str_replace( $site_dir, trailingslashit( $site_uri ), $result ); } #returns resized image path or WP_Error ( if something went wrong during resizing ) return $result; } #returns unmodified image, for example in case if the user is trying to resize 800x600px to 1920x1080px image return $thumb; } } add_action( 'pre_get_posts', 'et_custom_posts_per_page' ); function et_custom_posts_per_page( $query ) { global $shortname; if ( is_admin() ) return $query; if ( $query->is_category ) { $query->set( 'posts_per_page', get_option( $shortname . '_catnum_posts' ) ); } elseif ( $query->is_tag ) { $query->set( 'posts_per_page', get_option( $shortname . '_tagnum_posts' ) ); } elseif ( $query->is_search ) { if ( isset($_GET['et_searchform_submit']) ) { $postTypes = array(); if ( !isset($_GET['et-inc-posts']) && !isset($_GET['et-inc-pages']) ) $postTypes = array('post'); if ( isset($_GET['et-inc-pages']) ) $postTypes = array('page'); if ( isset($_GET['et-inc-posts']) ) $postTypes[] = 'post'; $query->set( 'post_type', $postTypes ); if ( isset( $_GET['et-month-choice'] ) && $_GET['et-month-choice'] != 'no-choice' ) { $et_year = substr($_GET['et-month-choice'],0,4); $et_month = substr($_GET['et-month-choice'], 4, strlen($_GET['et-month-choice'])-4); $query->set( 'year', absint($et_year) ); $query->set( 'monthnum', absint($et_month) ); } if ( isset( $_GET['et-cat'] ) && $_GET['et-cat'] != 0 ) $query->set( 'cat', absint($_GET['et-cat']) ); } $query->set( 'posts_per_page', get_option( $shortname . '_searchnum_posts' ) ); } elseif ( $query->is_archive ) { $query->set( 'posts_per_page', get_option( $shortname . '_archivenum_posts' ) ); } return $query; } add_filter('pre_set_site_transient_update_themes', 'et_check_themes_updates'); function et_check_themes_updates( $update_transient ){ global $wp_version; if ( !isset($update_transient->checked) ) return $update_transient; else $themes = $update_transient->checked; $send_to_api = array( 'action' => 'check_theme_updates', 'installed_themes' => $themes ); $options = array( 'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), 'body' => $send_to_api, 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() ); $theme_request = wp_remote_post( 'http://www.elegantthemes.com/api/api.php', $options ); if ( !is_wp_error($theme_request) && wp_remote_retrieve_response_code($theme_request) == 200 ){ $theme_response = unserialize( wp_remote_retrieve_body( $theme_request ) ); if ( !empty($theme_response) ) { $update_transient->response = array_merge(!empty($update_transient->response) ? $update_transient->response : array(),$theme_response); $last_update->checked = $themes; $last_update->response = $theme_response; } } $last_update->last_checked = time(); set_site_transient( 'et_update_themes', $last_update ); return $update_transient; } add_filter('site_transient_update_themes', 'et_add_themes_to_update_notification'); function et_add_themes_to_update_notification( $update_transient ){ $et_update_themes = get_site_transient( 'et_update_themes' ); if ( !is_object($et_update_themes) || !isset($et_update_themes->response) ) return $update_transient; $update_transient->response = array_merge(!empty($update_transient->response) ? $update_transient->response : array(), $et_update_themes->response); return $update_transient; } add_filter( 'default_hidden_meta_boxes', 'et_show_hidden_metaboxes', 10, 2 ); function et_show_hidden_metaboxes( $hidden, $screen ){ # make custom fields and excerpt meta boxes show by default if ( 'post' == $screen->base || 'page' == $screen->base ) $hidden = array('slugdiv', 'trackbacksdiv', 'commentstatusdiv', 'commentsdiv', 'authordiv', 'revisionsdiv'); return $hidden; } add_filter('widget_title','et_widget_force_title'); function et_widget_force_title( $title ){ #add an empty title for widgets ( otherwise it might break the sidebar layout ) if ( $title == '' ) $title = ' '; return $title; } //modify the comment counts to only reflect the number of comments minus pings if( version_compare( phpversion(), '4.4', '>=' ) ) add_filter('get_comments_number', 'et_comment_count', 0); function et_comment_count( $count ) { if ( ! is_admin() ) { global $id; $get_comments = get_comments( array('post_id' => $id, 'status' => 'approve') ); $comments_by_type = &separate_comments($get_comments); return count($comments_by_type['comment']); } else { return $count; } } add_action( 'admin_init', 'et_theme_check_clean_installation' ); function et_theme_check_clean_installation(){ add_action( 'admin_notices', 'et_theme_epanel_reminder' ); } if ( ! function_exists( 'et_theme_epanel_reminder' ) ){ function et_theme_epanel_reminder(){ global $shortname, $themename, $current_screen; if ( false === get_option( $shortname . '_logo' ) && 'appearance_page_core_functions' != $current_screen->id ){ printf( __('

This is a fresh installation of %1$s theme. Don\'t forget to go to ePanel to set it up. This message will disappear once you have clicked the Save button within the theme\'s options page.

',$themename), get_current_theme(), admin_url( 'themes.php?page=core_functions.php' ) ); } } } ?> Hanging of the Greens | Sapulpa First United Methodist Church

Hanging of the Greens

The first Sunday in Advent, December 2, is marked by the Hanging of the Greens.  This is a beautiful service in which symbols of the advent season are expalined.  The Hanging of the Greens will be a part of our Sanctuary service that Sunday morning.  Join us (10:45 a.m.)  as our Sanctuary is adorned in it’s advent attire.