Skip to content

Instantly share code, notes, and snippets.

View stellarcowboy's full-sized avatar

Kenneth White stellarcowboy

View GitHub Profile
@arod2634
arod2634 / custom-wp-menus.php
Created September 21, 2012 03:06
Customize Wordpress Admin Menus
<?php
//Remove any unnecessary admin menus & sub-menus
function my_remove_menu_pages() {
remove_menu_page('link-manager.php');
remove_menu_page('edit-comments.php');
//remove_menu_page('index.php');
//remove_menu_page('edit.php?post_type=page');
//remove_menu_page('upload.php');
//remove_menu_page('themes.php');
@arod2634
arod2634 / custom-wp-dashboard.php
Created September 21, 2012 02:50
Customize Wordpress Admin Dashboard
<?php
//Add a custom admin dashboard welcome widget
function custom_dashboard_widget() {
echo '<h1>Welcome to your new WordPress site built by an awesome developer</h1>';
}
function add_custom_dashboard_widget() {
wp_add_dashboard_widget('custom_dashboard_widget', 'Integrity Welcomes You To WordPress!', 'custom_dashboard_widget');
}
add_action('wp_dashboard_setup', 'add_custom_dashboard_widget');
@rachelbaker
rachelbaker / bp-multi-members-loop.php
Created July 24, 2012 15:28
BuddyPress Multisite Filtering Members Loop to only show site members
<?php
// Getting current blog_id
global $wpdb, $current_blog;
$id = $current_blog->blog_id;
// Setting variable for current blog_prefix
$blog_prefix = $wpdb->get_blog_prefix( $id );
// Start the BuddyPress Ajax Members Loop
if ( bp_has_members( bp_ajax_querystring( 'members' ).'&meta_key='.$blog_prefix.'capabilities' ) ) : ?>
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@haschek
haschek / _contrast.scss
Last active August 14, 2019 14:20
SCSS/SASS Accessibility Color Methods
/*
SCSS Color Methods for Accessibility
================================================================================
Adjust given colors to ensure that those color combination provide sufficient
contrast.
@version 0.1
@link http://eye48.com/go/scsscontrast
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);