A list of everything that *could* go in the <head> of your document
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
| function add_defer_attribute($tag, $handle) { | |
| // add script handles to the array below | |
| $scripts_to_defer = array( | |
| 'html5', | |
| 'jquery', | |
| 'jquery-migrate', | |
| 'wp-embed', | |
| 'twentyseventeen-skip-link-focus-fix', | |
| 'jquery-scrollto', | |
| 'twentyseventeen-global', |
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
| echo get_site_url(); |
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
| define( 'EDD_USE_CART_COOKIE', false ); |
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
| diff --git a/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php b/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
| index e77ed03..2e41933 100644 | |
| --- a/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
| +++ b/wp-content/plugins/woocommerce-waitlist/classes/class-pie-wcwl-waitlist-mailout.php | |
| @@ -83,6 +83,9 @@ if ( ! class_exists( 'Pie_WCWL_Waitlist_Mailout' ) ) { | |
| public function add_user_to_archive( $product_id, $user_id ) { | |
| $existing_archives = get_post_meta( $product_id, 'wcwl_waitlist_archive', true ); | |
| $today = strtotime( date( "Ymd" ) ); | |
| + if (empty($existing_archives)) { | |
| + $existing_archives = array(); |
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
| function excerpt($limit) { | |
| $excerpt = explode(' ', get_the_excerpt(), $limit); | |
| if (count($excerpt)>=$limit) { | |
| array_pop($excerpt); | |
| $excerpt = implode(" ",$excerpt).'...'; | |
| } else { | |
| $excerpt = implode(" ",$excerpt); | |
| } | |
| $excerpt = preg_replace('`[[^]]*]`','',$excerpt); | |
| return $excerpt; |
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
| //Insert in wp-config.php file | |
| define('FS_METHOD','direct');define('FS_CHMOD_DIR',0755);define('FS_CHMOD_FILE',0644); | |
| define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/uploads'); |
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
| <head> | |
| <?php if (is_single() || is_page()) { ?> | |
| <meta name="description" content="<?php $s = trim(str_replace("\r\n", " ", htmlspecialchars(strip_tags($post->post_content)))); if(mb_strlen($s,'UTF-8') > 200){$postdescr = mb_substr($s,0,198,'UTF-8').' …';} else{$postdescr = $s;}; echo $postdescr; ?>" /> | |
| <meta property="og:description" content="<?php echo $postdescr; ?>" /> | |
| <meta property="og:url" content="http://site.com/<?php global $post; echo $post->post_name; ?>" /> <!-- OR --> | |
| <meta property="og:url" content="<?php the_permalink() ?>" /> | |
| <meta property="og:title" content="Site Name<?php wp_title(); ?>" /> | |
| <meta property="og:headline" content="Site Name<?php wp_title(); ?>" /> | |
| <?php if (get_post_meta($post->ID, 'image_id', true)){$postimage = wp_get_attachment_image_src(get_post_meta($post->ID, 'image_id', true), 'full'); ?> | |
| <link rel="image_src" href="<?php echo $postimage[0]; ?>" /> |
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
| function wp_update_privacy( $query ) { | |
| unset($query['php']); | |
| unset($query['mysql']); | |
| unset($query['local_package']); | |
| unset($query['blogs']); | |
| unset($query['users']); | |
| unset($query['multisite_enabled']); | |
| unset($query['initial_db_version']); | |
| return $query; | |
| } |
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 | |
| /* | |
| Creates and end-point that get Yoast SEO meta tags... | |
| */ | |
| add_action('rest_api_init', 'add_yoast_data'); | |
| function add_yoast_data() | |
| { | |
| // Add your post types here... | |
| register_rest_field(array( |