This file contains 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 | |
/** | |
* Enable msm-sitemap plugin sitemap rendering on non-production environments | |
* by overriding blog_public to 1 on the pre_option hook. | |
* | |
* @param mixed $pre_option Value of an existing option. | |
* | |
* @return mixed | |
*/ | |
function vip_enable_non_prod_sitemap_rendering( $pre_option ) { |
This file contains 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 | |
// Yoast sitemap performance improvements. | |
/** | |
* Objects are cached for 24 hours and changes will be applied upon next sitemap update. | |
*/ | |
add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_true' ); | |
add_action( 'parse_request', 'filter_yoast_sitemap_cache_maxage' ); | |
add_action( 'parse_request', 'block_query_string_sitemap_requests' ); |
This file contains 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 | |
// Disable sitemap stylesheets if needed. | |
add_filter( 'wp_sitemaps_stylesheet_url', '__return_false' ); | |
add_filter( 'wp_sitemaps_stylesheet_index_url', '__return_false'); | |
add_action( 'init', 'register_custom_sitemap_rewrites', 20 ); | |
/** | |
* Register custom `^sitemap/*` rewrite rules for sitemap routes. | |
* |
This file contains 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 | |
add_filter( 'vip_files_acl_file_visibility', 'check_file_visibility_by_metadata', 11, 2 ); | |
/** | |
* Given a path determine whether the file is private or public based on the | |
* value of the attachment's `_custom_restriction_meta` post meta. | |
* | |
* @param string $file_visibility one of Automattic\VIP\Files\Acl\(FILE_IS_PUBLIC | FILE_IS_PRIVATE_AND_ALLOWED | FILE_IS_PRIVATE_AND_DENIED). | |
* @param string $file_path path to file to be checked for visibility. | |
* |
This file contains 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 | |
/** | |
* ExamplePackage\CLI_Import_CSV Class. | |
* | |
* @package ExamplePackage | |
*/ | |
namespace ExamplePackage; | |
if ( ! defined( '\WP_CLI' ) ) { |
This file contains 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 | |
/** | |
* Overwrite default post_tag taxonomy to be non-public. | |
* | |
* @see https://developer.wordpress.org/reference/functions/register_taxonomy/ | |
* | |
* @return void | |
*/ | |
function vip_modify_post_tag_taxonomy() { | |
$post_tag_args = get_taxonomy( 'post_tag' ); |
This file contains 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
#{"rootDirectory":"public","phpVersion":"8.0"} | |
server { | |
listen 80; | |
listen [::]:80; | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
{{ssl_certificate_key}} | |
{{ssl_certificate}} | |
{{server_name}} | |
{{root}} |
This file contains 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 | |
$default_attachment_url = get_stylesheet_directory_uri() . '/assets/images/default-cover-bg.jpg'; | |
$block_pattern_content = '<!-- wp:cover {"url":"' . esc_url( $default_attachment_url ) . '","id":42,"dimRatio":90,"minHeight":0,"minHeightUnit":"px","gradient":"vivid-cyan-blue-to-vivid-purple","align":"full","style":{"spacing":{"padding":{"top":"5rem","right":"14rem","bottom":"5rem","left":"14rem"}}}} --> | |
<div class="wp-block-cover alignfull" style="padding-top:5rem;padding-right:14rem;padding-bottom:5rem;padding-left:14rem;min-height:0px"> | |
<span aria-hidden="true" class="has-background-dim-90 wp-block-cover__gradient-background has-vivid-cyan-blue-to-vivid-purple-gradient-background has-background-dim has-background-gradient"></span> | |
<img class="wp-block-cover__image-background wp-image-42" alt="" src="' . esc_url( $default_attachment_url ) . '" data-object-fit="cover"/> | |
<div class="wp-block-cover__inner-container"> | |
<!-- wp:heading {"textAlign":"center","level":4,"style":{"spacing":{"margin":{"top" |
This file contains 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
{ | |
"schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"layout": { | |
"contentSize": "800px", | |
"wideSize": "1000px" | |
}, | |
"color": { | |
"link": false |