Skip to content

Instantly share code, notes, and snippets.

View georgestephanis's full-sized avatar

George Stephanis georgestephanis

View GitHub Profile
// ==UserScript==
// @name OGLAF Keyboard Navigation
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add left/right arrow keyboard navigation.
// @author You
// @match https://www.oglaf.com/*
// @icon https://static.oglaf.com/favicon.png
// @grant none
// ==/UserScript==
<?php
// Plugin name: Jetpack Infinite Scroll for Single Posts
/**
* Infinite scroll needs to be filtered to function on non-archive pages.
*/
function jisfsp_archive_supported( $supported, $settings ) {
if ( is_singular( 'post' ) ) {
return true;
@georgestephanis
georgestephanis / index.php
Created March 29, 2021 15:22
`off-with-its-head` theme
<?php
if ( ! headers_sent() ) {
nocache_headers();
header( 'X-Robots-Tag: noindex, nofollow, noarchive, nosnippet' );
wp_safe_redirect( admin_url() );
}
?>
<!DOCTYPE html>
<?php
/**
* Plugin Name: Multisite Login Consolidation
* Author: georgestephanis
* License: GPLv2+
* Requires PHP: 7
* Network: true
*/
.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);
@georgestephanis
georgestephanis / build-markdown-table-of-plugins.php
Created November 27, 2020 21:55
This will build a github markdown table of all the plugins on a site.
<?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' );
<?php
/**
* Plugin Name: Child Theme Settings Migrator
*/
add_action( 'admin_init', 'child_theme_settings_migrator' );
function child_theme_settings_migrator() {
$theme = wp_get_theme();
<?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+
*/