Skip to content

Instantly share code, notes, and snippets.

View jillmugge's full-sized avatar

Jill jillmugge

View GitHub Profile
@jillmugge
jillmugge / Debug
Created April 22, 2014 14:48
Debug site
<?php
function list_hooked_functions($tag=false){
global $wp_filter;
if ($tag) {
$hook[$tag]=$wp_filter[$tag];
if (!is_array($hook[$tag])) {
trigger_error("Nothing found for '$tag' hook", E_USER_WARNING);
return;
}
}
@jillmugge
jillmugge / Edit Meta Boxes
Created April 22, 2014 14:47
Editing the meta boxes in the dashboard
<?php
add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
function my_custom_dashboard_widgets() {
global $wp_meta_boxes;
//Right Now - Comments, Posts, Pages at a glance
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);
//Recent Comments
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);
//Incoming Links
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
@jillmugge
jillmugge / CPT
Created April 22, 2014 14:46
Custom Post Types
<?php
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Products', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Product', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Product', 'text_domain' ),
'parent_item_colon' => __( 'Parent Product:', 'text_domain' ),
'all_items' => __( 'All Products', 'text_domain' ),
@jillmugge
jillmugge / Longshade
Created April 22, 2014 14:45
Longshade flat icon in CSS
/* Google Font flat longshade Icon in pure css
Create with love by @LukyVj
Inspired by so much people an works over the internet.
*/
@import url(http://fonts.googleapis.com/css?family=Marck+Script);
body {
-webkit-font-smoothing: antialiased;
background: #333;
overflow: hidden;
@jillmugge
jillmugge / CSS Floats
Created April 22, 2014 14:44
Group Class for Floats
.group:before,
.group:after{
content:"";
display:table;
}
.group:after{
clear:both;
}
.group {
*zoom:1;
@jillmugge
jillmugge / Tblvd - copyright
Created April 22, 2014 14:43
Themeblvd - edit dynamic copyright year
@jillmugge
jillmugge / local config file
Created April 22, 2014 14:42
local-config.php
if( file_exists( dirname( __FILE__) . '/local-config.php' ) ) {
include( direname( __FILE__ ) . '/local-config.php' );
define( 'WP_LOCAL_DEV', true );
} else {
deifne ('WP_LOCAL_DEV', false);
define ( 'DB_NAME', 'production_db' );
define ( 'DB_USER', 'prodcuction_user' );
define ( 'DB_PASSWORD', 'production_password' );
define ( 'DB_HOST', 'produciton_db_host' );
}
@jillmugge
jillmugge / admin css
Created April 22, 2014 14:40
remove thank you for creating with WP in the admin css
<?php
/*
*Add this snipt to functions.php file. Also add a wp-admin.css file to the child theme.
*
*?
function load_jmg_wp_admin_style(){
wp_register_style( 'jmg_wp_admin_css', get_bloginfo('stylesheet_directory') . '/wp-admin.css', false, '1.0.0' );
wp_enqueue_style( 'jmg_wp_admin_css' );
}
add_action('admin_enqueue_scripts', 'load_jmg_wp_admin_style');
@jillmugge
jillmugge / MCE
Created April 22, 2014 14:38
Add buttons to MCE
<?php
function add_more_buttons($buttons) {
$buttons[] = 'hr';
$buttons[] = 'del';
$buttons[] = 'sub';
$buttons[] = 'sup';
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'cleanup';
$buttons[] = 'styleselect';
@jillmugge
jillmugge / Auto Update
Created April 22, 2014 14:37
Auto Update WP 3.7
//add to function.php (plugin file)
//members chat 10/28/13 handout
add_filter('auto_update_plugin','__return_true');