Skip to content

Instantly share code, notes, and snippets.

View stephanieleary's full-sized avatar

Stephanie Leary stephanieleary

View GitHub Profile
@stephanieleary
stephanieleary / list-chid-pages.php
Last active October 3, 2015 19:48
List Child Pages
<?php
/*
Plugin Name: Steph's Tiny List Child Pages Plugin
Plugin URI: http://sillybean.net/2010/06/listing-child-pages-with-a-shortcode/
Description: Lets you list child pages using a shortcode. Also displays child page list by default on empty parent pages.
Author: Stephanie Leary
Version: 1.0
Author URI: http://sillybean.net/
License: GPL v2 or later
*/
@stephanieleary
stephanieleary / posts-page-warning.php
Last active October 18, 2016 19:31
Warn users not to edit the post container
<?php
// Add to functions.php or place in mu-plugins
// Admin Notice on Posts Page
add_action( 'admin_notices', 'scl_postspage_print_notices' );
function scl_postspage_print_notices() {
$screen = get_current_screen();
if ( $screen->parent_base != 'edit' || $screen->base != 'post' || $_REQUEST['action'] != 'edit' )
return;