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
{"name":"LWPTD WordPress Dev","settings":"{\"settings\":\"{\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\",\\n \\\"[javascript]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"dbaeumer.vscode-eslint\\\"\\n },\\n \\\"[javascriptreact]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"dbaeumer.vscode-eslint\\\"\\n },\\n \\\"[php]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"valeryanm.vscode-phpsab\\\"\\n },\\n \\\"[css]\\\": {\\n \\\"editor.formatOnSave\\\": true\\n },\\n \\\"[scss]\\\": {\\n \\\"editor.formatOnSave\\\": true\\n },\\n \\\"intelephense.stubs\\\": [\\n \\\"apache\\\",\\n \\\"bcmath\\\",\\n \\\"bz2\\\",\\n \\\"calendar\\\",\\n \\\"com_dotnet\\\",\\n \\\"Core\\\",\\n \\\"ctype\\\",\\n \\\"curl\\\",\\n \\\"date\\\",\\n \\\"dba\\\",\\n \\\"dom\\\",\\n \\\"enchant\\\",\\n \\\"exif\\\",\\n \\\"FF |
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
{"name":"LWPTD WordPress Dev Ian's Version","settings":"{\"settings\":\"{\\n \\\"editor.defaultFormatter\\\": \\\"esbenp.prettier-vscode\\\",\\n \\\"[javascript]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"dbaeumer.vscode-eslint\\\"\\n },\\n \\\"[javascriptreact]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"dbaeumer.vscode-eslint\\\"\\n },\\n \\\"[php]\\\": {\\n \\\"editor.formatOnSave\\\": true,\\n \\\"editor.defaultFormatter\\\": \\\"valeryanm.vscode-phpsab\\\"\\n },\\n \\\"[css]\\\": {\\n \\\"editor.formatOnSave\\\": true\\n },\\n \\\"[scss]\\\": {\\n \\\"editor.formatOnSave\\\": true\\n },\\n \\\"intelephense.stubs\\\": [\\n \\\"apache\\\",\\n \\\"bcmath\\\",\\n \\\"bz2\\\",\\n \\\"calendar\\\",\\n \\\"com_dotnet\\\",\\n \\\"Core\\\",\\n \\\"ctype\\\",\\n \\\"curl\\\",\\n \\\"date\\\",\\n \\\"dba\\\",\\n \\\"dom\\\",\\n \\\"enchant\\\",\\n \\\"exif\\\" |
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
set $production your-prod-server.com; | |
# Redirect requests to /wp-content/uploads/* to production server | |
location @prod_uploads { | |
rewrite "^(.*)/wp-content/uploads/(.*)$" "https://$production/wp-content/uploads/$2" break; | |
} | |
# Rule for handling local requests for images | |
location ~ "^/wp-content/uploads/(.*)$" { | |
try_files $uri @prod_uploads; |
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
.edit-post-layout:has(.interface-interface-skeleton__secondary-sidebar) { | |
--overview-width: 350px; | |
} | |
.edit-post-layout.is-sidebar-opened { | |
--settings-width: 280px; | |
} | |
.edit-post-layout { | |
--scrollbar-width: 16px; |
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_action( 'style_loader_tag', function ( string $tag, string $handle, string $href, string $media ) : string { | |
$allowlist = [ 'lwtd-style' ]; | |
if ( !in_array( $handle, $allowlist, true ) ) { | |
return $tag; | |
} | |
$new_tag = new WP_HTML_Tag_Processor( $tag ); | |
$fallback = '<noscript>' . $tag . '</noscript>'; |
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('get_term', function ($term, $taxonomy) { | |
// Bail if we're in the admin | |
if( is_admin() ) { | |
return $term; | |
} | |
$already_modified = strpos( $term->name, '#' ) === 0; | |
if ( $taxonomy === 'post_tag' && ! $already_modified ) { |
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( 'upload_mimes', function($mime_types) { | |
$mime_types['svg'] = 'image/svg+xml'; | |
return $mime_types; | |
} ); |
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 | |
/* | |
* See: https://developer.wordpress.org/reference/functions/add_editor_style/ | |
* | |
*/ | |
add_action('admin_init', function() { | |
// Enable support for editor styles | |
add_theme_support('editor-style'); | |
add_editor_style('dist/css/your-css-file.css'); // Replace path to your frontend stylesheet |
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
tell application "CodeKit" | |
set projectRoot to get path of active project | |
process file at path projectRoot & "/src/css/style.css" | |
end tell |
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 | |
// This is used as a fallback if the file isn't found for some reason | |
global $wp_version; | |
/* | |
Note: | |
This function assumes you're only asking for files in your own theme | |
and that theme isn't a child theme. If you're using a child theme, | |
replace get_template_directory() with get_stylesheet_directory(). | |
NewerOlder