Skip to content

Instantly share code, notes, and snippets.

Stephanie Leary sillybean

Block or report user

Report or block sillybean

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sillybean / posts-page-warning.php
Last active Oct 18, 2016
Warn users not to edit the post container
View posts-page-warning.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' )
View list-chid-pages.php
Plugin Name: Steph's Tiny List Child Pages Plugin
Plugin URI:
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:
License: GPL v2 or later
View remove-dashboard-widgets.php
function remove_dashboard_widgets() {
global $wp_meta_boxes;
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
// unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);
// unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']); // WordPress Blog
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']); // Other WordPress News
sillybean / 404.php
Created May 18, 2012
Better 404 Error Page
View 404.php
<?php get_header(); ?>
<div id="content" class="section">
<h2>I'm sorry. I couldn't find the page you requested.</h2>
<p>You can try searching for it or looking for it in the <a href="/sitemap">site map</a>.</p>
<?php get_template_part( 'searchform' ); ?>
sillybean / proxy.php
Created Jun 19, 2012
Bad bad bad theme
View proxy.php
header('Content-Type: text/xml');
$url = $_GET['url'];
$data = file_get_contents($url);
echo $data;
sillybean / gist:2965797
Created Jun 21, 2012
Hide a custom taxonomy's input box while leaving the other admin UI alone
View gist:2965797
function remove_my_taxonomy_boxes()
$tax_name = 'my_taxonomy';
$content_type = 'post';
// presumably there is some condition you want to check, like current_user_can('something')
$remove = true;
if ($remove)
remove_meta_box( $tax_name.'div', $content_type, 'side' );
sillybean / comment-quicktags-p2mod
Created Jun 28, 2012
Basic Comment Quicktags mod for P2
View comment-quicktags-p2mod
// quicktags.js
id: "comment",
buttons: "link,em,strong"
id: "posttext",
buttons: "link,em,strong"
sillybean / tagged-galleries.php
Created Aug 1, 2012
Multiple WordPress galleries per page using attachment tags
View tagged-galleries.php
Plugin Name: Tagged Galleries
Description: Lets you add multiple [gallery] tags in a single WordPress page. Specify the images to be included in each gallery using tags: [gallery tag="foo"] (assuming you have tagged the images).
Version: 1.0
Author: Stephanie Leary
Author URI:
add_action('admin_init', 'register_attachment_tags');
sillybean / buddypress-spam-link.php
Created Oct 2, 2012
BuddyPress Spam Link plugin. Adds the "Mark as spammer" link back to the admin bar and adds a "Spammer" button to the activity stream entry meta row.
View buddypress-spam-link.php
sillybean / add-plugins-link.php
Created Nov 2, 2012
Adds plugin and theme links to the Network Admin section of the admin menu bar
View add-plugins-link.php
You can’t perform that action at this time.