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 ( ! headers_sent() ) { | |
nocache_headers(); | |
header( 'X-Robots-Tag: noindex, nofollow, noarchive, nosnippet' ); | |
wp_safe_redirect( admin_url() ); | |
} | |
?> | |
<!DOCTYPE html> |
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( 'ppp_preview_link', 'my_ppp_preview_link', 10, 2 ); | |
function my_ppp_preview_link( $link, $post_id ) { | |
$found = preg_match( '#_ppp=([0-9A-F]{10})#i', $link, $matches ); | |
if ( ! $found ) { | |
return $link; | |
} |
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 | |
/** | |
* Plugin Name: Multisite Login Consolidation | |
* Author: georgestephanis | |
* License: GPLv2+ | |
* Requires PHP: 7 | |
* Network: true | |
*/ |
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
.site { | |
max-width: 85% !important; | |
} | |
article.post { | |
width: 200px; | |
height: 300px; | |
border-radius: 15px; | |
border-bottom: 0; | |
box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.35); |
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 | |
// loosely based on a selector from https://davidwalsh.name/external-links-css | |
wp_add_inline_style( | |
'mytheme-style', | |
sprintf( | |
'a[href*="//"]:not([href*="%1$s"]) { | |
padding-%3$s: 17px; | |
background: url("%2$s") center %3$s no-repeat; | |
background-size: 13px; | |
}', |
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 | |
include( 'the/path/to/wp-load.php' ); | |
if ( ! function_exists( 'is_plugin_active_for_network' ) ) { | |
require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); | |
} | |
$updates = get_site_transient( 'update_plugins' ); |
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 | |
/** | |
* Plugin Name: Child Theme Settings Migrator | |
*/ | |
add_action( 'admin_init', 'child_theme_settings_migrator' ); | |
function child_theme_settings_migrator() { | |
$theme = wp_get_theme(); |
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 | |
/** | |
* Plugin Name: Extra User Registration Source Tracking | |
* Description: Store data about a user's origin -- IP Address and User Agent -- when registering. | |
* Author: georgestephanis | |
* Author URI: http://wpspecialprojects.wordpress.com/ | |
* License: GPLv2+ | |
*/ |
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($){ | |
const $root = $( '#root' ); | |
const $stage1 = $( '.stage-1', $root ); | |
const $stage2 = $( '.stage-2', $root ); | |
// If there's no GET string, then no credentials have been passed back. Let's get them. | |
if ( ! window.location.href.includes('?') ) { | |
// Stage 1: Get the WordPress Site URL, Validate the REST API, and Send to the Authentication Flow | |
const $urlInput = $( 'input[type=url]', $stage1 ); |
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 | |
/* | |
* Plugin Name: Environment Notifier | |
* Plugin URI: http://github.com/georgestephanis/environment-notifier/ | |
* Description: This plugin adds a node to the adminbar clarifying the current environment setting if not production. | |
* Author: George Stephanis | |
* Version: 1.0 | |
* Author URI: http://wpspecialprojects.wordpress.com | |
*/ |