This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*** beginning of the code to paste in your functions.php ***/ | |
function imath_pm_button_only_if_friends( $button ) { | |
if( is_super_admin() ) | |
return $button; | |
if( 'is_friend' != friends_check_friendship_status( bp_displayed_user_id(), bp_loggedin_user_id() ) ) | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Description: Adds a taxonomy filter in the admin list page for a custom post type. | |
Written for: http://wordpress.stackexchange.com/posts/582/ | |
By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins | |
Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps... | |
*/ | |
add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list'); | |
function add_businesses_column_to_listing_list( $posts_columns ) { | |
if (!isset($posts_columns['author'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ========================================================================== | |
PAGE 404 ERROR | |
========================================================================== */ | |
#text-404{ | |
width: 66.6%; | |
margin: 2.5% auto; | |
text-align: center; | |
} | |
#container-404{ | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cssTransitionModernizr(){ | |
if(!Modernizr.csstransitions) { // Test if CSS transitions are supported | |
$(function() { | |
$('a').hover(function(){ | |
$(this).animate({padding:'34.277% 0 0'},{queue:false,duration:500}); | |
$(this).find('p').animate({top:'0', opacity:'1'},{queue:false,duration:500}); | |
}, function(){ | |
$(this).animate({padding:'36% 0 0'},{queue:false,duration:500}); | |
$(this).find('p').animate({top:'100px',opacity:'0'},{queue:false,duration:500}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hack-resalf.js | |
//septembre 2012 - lasouris et le piano | |
//use the resalf popin if not on a touch device, or redirect to a new page if on a touch device | |
//based on modernizr.touch | |
//this avoids having to remove class resalf | |
// 1rst : Include this modernizr custom built before the plugin code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add getElementsByClassName method to IE browsers that do not support it | |
if (!document.getElementsByClassName) { | |
document.getElementsByClassName = function (cn) { | |
var rx = new RegExp("\\b" + cn + "\\b"), allT = document.getElementsByTagName("*"), allCN = [], i = 0, a; | |
while (a = allT[i++]) { | |
if (a.className && a.className.indexOf(cn) + 1) { | |
if(a.className===cn){ allCN[allCN.length] = a; continue; } | |
rx.test(a.className) ? (allCN[allCN.length] = a) : 0; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<base href="http://www.monsite.com/base/" /> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png"> | |
<link rel="icon" type="image/png" href="speed-dial-icon.png"> | |
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> | |
<link rel="shortcut icon" type="image/png" href="favicon.png" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function array_swap_back($arr,$elem){ | |
$ndx = array_search($elem,$arr); | |
$b4 = array_slice($arr,0,$ndx); | |
$mid = array_reverse(array_slice($arr,$ndx,2)); | |
$after = array_slice($arr,$ndx + 2); | |
return array_merge($b4,$mid,$after); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
else { |
OlderNewer