This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Change size for Yoast SEO OpenGraph image for all content | |
| * Credit: Yoast Development team | |
| * Last Tested: May 24 2019 using Yoast SEO 11.2.1 on WordPress 5.2.1 | |
| */ | |
| add_filter( 'wpseo_opengraph_image_size', 'yoast_seo_opengraph_change_image_size' ); | |
| function yoast_seo_opengraph_change_image_size( $string ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ================================================ | |
| # PHP 7.2 | |
| # | |
| # See https://www.colinodell.com/blog/201711/installing-php-72 | |
| # ================================================ | |
| apt-get install -y apt-transport-https lsb-release ca-certificates | |
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list | |
| apt-get update | |
| apt-get install -y php7.2-cli php7.2-gd php7.2-mbstring php7.2-curl php7.2-xml php7.2-zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * | |
| * Description: Adds floating lables to all text inputs | |
| * | |
| */ | |
| function ns_append_style_and_js( ){ ?> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function($){ | |
| $(document).on('focus', 'input[type=text], input[type=email], textarea', function(e){ | |
| var ph = $(this).attr('placeholder'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Enqueue scripts and styles. | |
| * | |
| * @since 1.0.0 | |
| */ | |
| function ja_global_enqueues() { | |
| wp_enqueue_style( | |
| 'jquery-auto-complete', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Popular Posts Widget | |
| * | |
| * Displays posts in last X days, sorted by most comments (proxy for popularity) | |
| * | |
| * @package Core Functionality | |
| * @author Nuno Sarmento <hello@nuno-sarmento.com> | |
| * | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function get_isotope_item( $query_args = array() ){ | |
| $defaults = array( | |
| 'post_type' => 'post', | |
| 'posts_per_page' => -1, | |
| 'post_status' => 'publish', | |
| ); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * BCC event organizers email on all Event Tickets' RSVP and commerce ticket emails so they get a copy of it too | |
| */ | |
| function bcc_all_event_organizers( $headers, $event_id, $order_id ) { | |
| //check if has organizer | |
| if ( !tribe_has_organizer( $event_id ) ) { | |
| return $headers; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| global $current_user; | |
| get_currentuserinfo(); | |
| if (is_user_logged_in() && $current_user->ID == $post->post_author) { | |
| // Build a list of attendees | |
| $attendeeList = TribeEventsTickets::get_event_attendees($event_id); | |
| $customerList = array(); |