https://developers.facebook.com/tools/debug/
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
-------------------------------------------------------------------------------------- | |
-- Handled with \define( 'WP_HOME', 'NEWURL' ) and \define( 'WP_SITEURL', 'NEWURL' ) | |
-------------------------------------------------------------------------------------- | |
UPDATE wp_options SET option_value = 'NEWURL' WHERE option_name IN ( 'home', 'siteurl' ); | |
-------------------------------------------------------------------------------------- | |
-- replace option values, but careful as it could include serialized data, | |
-- added a clause to try to avoid that... | |
-------------------------------------------------------------------------------------- | |
UPDATE |
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 can be added to your functions.php file | |
\add_filter( 'pr_login_errors', function( $messages ){ | |
$new_messages = [ 'Please enter a valid username and password' ]; | |
return $new_messages; | |
}, 10, 1 ); |
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
UPDATE wp_options | |
SET option_value = 'https://dev.website.com' | |
WHERE option_name IN ( 'home', 'siteurl' ); |
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 the following code to your functions.php or | |
// save this file to your /wp-content/mu-plugins/ folder. | |
// | |
\add_filter( 'pr_message_content', function( $content ){ | |
return \do_shortcode( $content ); | |
}); |
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
mysqldump -u root -p --all-databases > alldb.sql | |
mysqldump -u root -p --opt --all-databases > alldb.sql | |
mysqldump -u root -p --all-databases --skip-lock-tables > alldb.sql | |
mysqldump -u root -p --all-databases --single-transaction --skip-lock-tables > all-your-db.sql |
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
<!-- Typical builds --> | |
<style> | |
.heading { color: blue; } | |
.list-red { color: red; } | |
p.intro { font-size: 1.2em; } | |
p.intro span { font-weight: bold;} | |
</style> | |
<section class="section section__prices"> |
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 | |
foreach ( [ 'Andy', 'Drew', 'Rob', 'Shane', 'Chris' ] as $name ) | |
{ | |
switch ( $name ) | |
{ | |
case 'Rob' : | |
case 'Drew' : | |
case 'Shane' : | |
// continue; // acts as break within switch(); needs arg "2" | |
continue 2; |
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
git checkout $revision-hash file-name.php |
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
location ~* ^/wp-content/.*\.(png|jpe?g)$ { | |
add_header Vary Accept; | |
if ($http_accept !~* "webp"){ | |
break; | |
} | |
if ( !-f $request_filename ) { | |
return 404; | |
} |
NewerOlder