Skip to content

Instantly share code, notes, and snippets.

@QETHAN
QETHAN / navbar.css
Created April 27, 2013 02:57
Bootstrap_navbar_css
.navbar-fixed-top {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 1030;
}
.navbar-fixed-top .navbar-inner {
padding-left: 0;
padding-right: 0;
@jeremyboggs
jeremyboggs / convert_search_filters.php
Created April 23, 2013 13:48
Converts Omeka's advanced search output into acceptable input for findBy().
<?php
/**
* Converts the advanced search output into acceptable input for findBy().
*
* @see Omeka_Db_Table::findBy()
* @param array $query HTTP query string array
* @return array Array of findBy() parameters
*/
function neatlinetime_convert_search_filters($query) {
@tylerhall
tylerhall / index.php
Created April 21, 2013 20:51
Modified WordPress index.php to work with any domain name.
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
@shanebp
shanebp / gist:5391229
Created April 15, 2013 20:56
BuddyPress - add message button in members loop
function filter_message_button_link( $link ) {
$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( bp_get_member_user_id() ) );
return $link;
}
function display_private_message_button() {
if( bp_get_member_user_id() != bp_loggedin_user_id() ) {
bp_send_message_button();
add_filter('bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 );
<style>.row-fluid :first-child{margin-left: 0;}</style>
@trepmal
trepmal / get-usernames.php
Created April 4, 2013 19:38
get usernames from get_users()
<?php
$users = get_users();
$data = wp_list_pluck( $users, 'data' );
$usernames = wp_list_pluck( $data, 'user_login' );
print_r( $usernames );
<style>.row-fluid :first-child{margin-left: 0;}</style>
<h3>Welcome the most advanced WordPress theme based on twitter's Bootstrap</h3>
<center style="display: none;"><a href="http://shoestrap.org/downloads/shoestrap/"><img alt="" src="http://shoestrap.org/assets/shoestrap-newsletter-logo1.png" /></a></center>
An open-source WordPress theme that’s based on <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a> and <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>. It is a fork of the amazing <a href="http://rootstheme.com/">Roots theme</a> with many customizations and additions, allowing you to use Wordpress's built-in theme customizer to control every aspect of your theme!
With a staggering total of more than 55 controls, you can easily change almost everything, from the number of sidebars to the color of your navbar and everything in between!
<center style="margin: 20px 0;"><span class="lead">To see all the settings available, you can </span><br />
<a class="btn btn-primary b
<?php
/**
* Return HTML for a single blog user for the widget.
*
* @uses apply_filters() Calls 'wpwhosonline_author_link' on the author link element
* @return string HTML for the user row
*/
function wpwhosonline_user( $last_online_ts, $user ) {
$avatar = get_avatar( $user->user_email, 32 );
$name = $user->display_name;
@michaelaguiar
michaelaguiar / functions.php
Created March 23, 2013 18:29
Wordpress XMLRPC Authentication from external app
<?php
add_filter('xmlrpc_methods', 'wpse39662_add_login_method');
function wpse39662_add_login_method($methods)
{
$methods['wpse39662.login'] = 'wpse39662_check_login';
return $methods;
}
function wpse39662_check_login($args)
@jameskoster
jameskoster / functions.php
Last active April 17, 2016 17:09
WooCommerce - Rename country
// Rename 'Republic of Ireland' to 'Ireland'
add_filter( 'woocommerce_countries', 'rename_ireland' );
function rename_ireland( $countries ) {
$countries['IE'] = 'Ireland';
return $countries;
}