This file contains hidden or 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 Browser-Detection | |
function mv_browser_body_class($classes) { | |
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; | |
if($is_lynx) $classes[] = 'lynx'; | |
elseif($is_gecko) $classes[] = 'gecko'; | |
elseif($is_opera) $classes[] = 'opera'; | |
elseif($is_NS4) $classes[] = 'ns4'; | |
elseif($is_safari) $classes[] = 'safari'; | |
elseif($is_chrome) $classes[] = 'chrome'; |
This file contains hidden or 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 | |
$myArray = array(); | |
foreach ($this->sinonimo as $s){ | |
$myArray[] = '<span>'.ucfirst($s->sinonimo).'</span>'; | |
} | |
echo implode( ', ', $myArray ); | |
/* OUTPUT | |
* <span>Text1<span>, <span>Text2<span>, <span>Text3<span> |
This file contains hidden or 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
//--------------------------------------------------- | |
// LESS Prefixer | |
//--------------------------------------------------- | |
// | |
// All of the CSS3 fun, none of the prefixes! | |
// | |
// As a rule, you can use the CSS properties you | |
// would expect just by adding a '.': | |
// | |
// box-shadow => .box-shadow(@args) |
This file contains hidden or 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
/////////////////////////////// | |
// Mobile Detection | |
/////////////////////////////// | |
function isMobile(){ | |
return ( | |
(navigator.userAgent.match(/Android/i)) || | |
(navigator.userAgent.match(/webOS/i)) || | |
(navigator.userAgent.match(/iPhone/i)) || | |
(navigator.userAgent.match(/iPod/i)) || | |
(navigator.userAgent.match(/iPad/i)) || |
This file contains hidden or 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
/** * Load jQuery from Google CDN, fallback to local */// http://wp.tutsplus.com/tutorials/load-jquery-from-google-cdn-with-local-fallback-for-wordpress/if( !is_admin()){ // Don't do this for admin area, since Google's jQuery isn't in noConflict mode and will interfere with WP's admin area. $url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'; // the URL to check against $test_url = @fopen($url,'r'); // test parameters if($test_url !== false) { // test if the URL exists function load_external_jQuery() { // load external file wp_deregister_script( 'jquery' ); // deregisters the default WordPress jQuery wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'); // register the external file wp_enqueue_script('jquery'); // enqueue the external file } add_action('wp_enqueue_scripts', 'load_external_jQuery'); // initiate the function } else { function load_local_jQuery() { wp_deregister_script('jquery'); // dereg |
This file contains hidden or 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
$(".panel").toggle( | |
function() | |
{ | |
$(this).animate({width:'300px',height:'300px'}, 200); | |
}, | |
function() | |
{ | |
$(this).animate({width:'152px',height:'152px'}, 200); | |
} | |
); |
This file contains hidden or 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
// Register CPT | |
Add 'page-attributes' | |
// 'supports' => array( 'title', 'editor','thumbnail','page-attributes' ) | |
// Landingpage/Template | |
Add '&orderby=menu_order' | |
//$portfolio_query = new WP_Query( 'post_type=portfolio&orderby=menu_order&posts_per_page=-1' ); |
This file contains hidden or 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
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'WP_DEBUG_LOG', true ); |
This file contains hidden or 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
<!-- ****** faviconit.com favicons ****** --> | |
<!-- Basic favicons --> | |
<link rel="shortcut icon" sizes="16x16 32x32 48x48 64x64" href="/favicon.ico"> | |
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> | |
<!--[if IE]><link rel="shortcut icon" href="/favicon.ico"><![endif]--> | |
<!-- For Opera Speed Dial --> | |
<link rel="icon" type="image/png" sizes="195x195" href="/favicon-195.png"> | |
<!-- For iPad with high-resolution Retina Display running iOS ≥ 7 --> | |
<link rel="apple-touch-icon" sizes="152x152" href="/favicon-152.png"> | |
<!-- For iPad with high-resolution Retina Display running iOS ≤ 6 --> |
This file contains hidden or 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 // Alternate without "404.php" if(is_404()) {header('Location: ' . esc_url(home_url('/')), true, 301);} ?> | |
<!doctype html> | |
<!--[if lt IE 7]> <html <?php body_class( 'no-js ie6 ie6-7 oldie' ); ?> <?php language_attributes(); ?>> <![endif]--> | |
<!--[if IE 7]> <html <?php body_class( 'no-js ie7 ie6-7 oldie' ); ?> <?php language_attributes(); ?>> <![endif]--> | |
<!--[if IE 8]> <html <?php body_class( 'no-js ie8 oldie' ); ?> <?php language_attributes(); ?>> <![endif]--> | |
<!--[if IE 9 ]> <html <?php body_class( 'no-js ie9' ); ?> <?php language_attributes(); ?>> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html <?php body_class( 'no-js' ); ?> <?php language_attributes(); ?>> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |