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
// Go to menue: | |
// find->find in files | |
// Switch on reg_ex button | |
// Find: | |
^(.*)$ | |
// Where: | |
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/* | |
// Then click on the find button | |
// Be careful to not click on Replace!!! |
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
yarn create nuxt-app <my-project> |
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 | |
//custom excrept length in words | |
add_filter( 'excerpt_length', function(){ return 40; }, 999 ); | |
?> |
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 | |
$img = wp_get_attachment_image_src(get_post_thumbnail_id(get_option('page_for_posts')),'full'); | |
$featured_image = $img[0]; | |
?> |
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('jpeg_quality', function($arg){return 90;}); | |
?> |
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_image_size( 'homepage-thumb', 270, 175, false ); //soft crop = resize | |
add_image_size( 'search-thumb', 150, 150, true ); //hard crop | |
add_filter( 'image_size_names_choose', 'my_custom_sizes' ); | |
function my_custom_sizes( $sizes ) { | |
return array_merge( $sizes, array( | |
'homepage-thumb' => __( 'Homepage Thumb' ), | |
'search-thumb' => __( 'Search Thumb' ), | |
) ); |
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 | |
if( current_user_can('administrator')) | |
add_filter( 'show_admin_bar', '__return_true' , 1000 ); | |
?> |
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
#Force SSL | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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
var theParentGO = GameObject.Find("ParentName"); | |
theParentGO.transform.GetComponentInChildren<ScriptOnTheChild>(true).gameObject; |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^example\.com [NC] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://example.com/$1 [R,L] |
NewerOlder