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
/* | |
* Function for post duplication. Dups appear as drafts. User is redirected to the edit screen | |
*/ | |
function rd_duplicate_post_as_draft(){ | |
global $wpdb; | |
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) { | |
wp_die('No post to duplicate has been supplied!'); | |
} | |
/* |
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 | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] | |
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] |
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
import requests | |
import base64 | |
from tqdm import tqdm | |
import pandas as pd | |
from datetime import datetime, timedelta | |
import searchconsole | |
domain = "" # Must have trailing slash! | |
# WordPress Logins |
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 | |
$servername = "mysql.hostinger.co.uk"; | |
$database = "u266072517_name"; | |
$username = "u266072517_user"; | |
$password = "buystuffpwd"; | |
// Create connection | |
$conn = mysqli_connect($servername, $username, $password, $database); |
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
define('MULTISITE', true); | |
define('SUBDOMAIN_INSTALL', false); | |
define('DOMAIN_CURRENT_SITE', 'new-multisite-setup.dev'); | |
define('PATH_CURRENT_SITE', '/'); | |
define('SITE_ID_CURRENT_SITE', 1); | |
define('BLOG_ID_CURRENT_SITE', 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
<h3>Video Tutorial</h3> | |
<div class="video-container"> | |
<iframe src="YOUTUBE_EMBED_URL_GOES_HERE"></iframe> | |
</div> |
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
version: '2' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: somewordpress |
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( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ){ | |
$current_site = new stdClass; | |
$current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? constant( 'SITE_ID_CURRENT_SITE' ) : 1; | |
$current_site->domain = $domain = DOMAIN_CURRENT_SITE; | |
$current_site->path = $path = PATH_CURRENT_SITE; | |
if( defined( 'BLOGID_CURRENT_SITE' ) ){ | |
$current_site->blog_id = BLOGID_CURRENT_SITE; | |
} | |
$url = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ); |
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 | |
$servername = "mysql.hostinger.com"; | |
$database = "uXXXXXXXXXX_name"; | |
$username = "uXXXXXXXXXX_user"; | |
$password = "buystuffpwd"; | |
$sql = "mysql:host=$servername;dbname=$database;"; | |
$dsn_Options = [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]; | |
// Create a new connection to the MySQL database using PDO, $my_Db_Connection is an object | |
try { |
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
// ** MySQL settings - You can get this info from your web host ** // | |
/** The name of the database for WordPress */ | |
define('DB_NAME', 'uXXXXXXXXXX'); | |
/** MySQL database username */ | |
define('DB_USER', 'uXXXXXXXXXX'); | |
/** MySQL database password */ | |
define('DB_PASSWORD', 'byMaHuTuMu'); |
NewerOlder