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
# Apache .htaccess | |
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 | |
# Nginx | |
location ~ ^/wp-content/uploads/(.*) { | |
rewrite ^/wp-content/uploads/(.*)$ http://livewebsite.com/wp-content/uploads/$1 redirect; | |
} |
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
// Usage: | |
// get_id_by_slug( 'any-page-slug' ); | |
function get_id_by_slug( $page_slug ) { | |
$page = get_page_by_path( $page_slug ); | |
if ( $page ) { | |
return $page->ID; | |
} else { | |
return null; |
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
/** | |
* Back To Top. | |
*/ | |
window.Back_To_Top = {}; | |
( function( window, $, that ) { | |
// Private variables. | |
var minWidth = 768; | |
var minHeight = 200; |
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
/** | |
* Foo Script. | |
*/ | |
window.Foo_Object = {}; | |
( function( window, $, that ) { | |
// Private variable. | |
var fooVariable = 'foo'; | |
// Constructor. |
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
#!/bin/sh | |
if [ "$#" -ne 1 ] | |
then | |
echo "Usage: Must supply a domain" | |
exit 1 | |
fi | |
DOMAIN=$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
<!-- wp:heading {"level":1} --> | |
<h1>This is a heading (H1)</h1> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>This is a heading (H2)</h2> | |
<!-- /wp:heading --> | |
<!-- wp:heading {"level":3} --> | |
<h3>This is a heading (H3)</h3> |