Skip to content

Instantly share code, notes, and snippets.

Avatar

George Stephanis georgestephanis

View GitHub Profile
View team51_credit_colophon.php
<?php
/**
* A colophon-generating method for WordPress Special Projects Sites.
*
* team51_credits( 'separator= | ' );
*
* @param array $args {
* Optional. An array of arguments.
*
View oglaf-keyboard-nav.js
// ==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==
View jp-infinite-scroll-single.php
<?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 Mar 29, 2021
`off-with-its-head` theme
View index.php
<?php
if ( ! headers_sent() ) {
nocache_headers();
header( 'X-Robots-Tag: noindex, nofollow, noarchive, nosnippet' );
wp_safe_redirect( admin_url() );
}
?>
<!DOCTYPE html>
View my_ppp_preview_link.php
View mu-login-consolidate.php
<?php
/**
* Plugin Name: Multisite Login Consolidation
* Author: georgestephanis
* License: GPLv2+
* Requires PHP: 7
* Network: true
*/
View twentytwelve-cards-against.scss
.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);
View inline-external-link-style.php
@georgestephanis
georgestephanis / build-markdown-table-of-plugins.php
Created Nov 27, 2020
This will build a github markdown table of all the plugins on a site.
View build-markdown-table-of-plugins.php
<?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' );
View child-theme-settings-migrator.php
<?php
/**
* Plugin Name: Child Theme Settings Migrator
*/
add_action( 'admin_init', 'child_theme_settings_migrator' );
function child_theme_settings_migrator() {
$theme = wp_get_theme();