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 | |
/** | |
* Returns the number of posts from a category | |
* | |
* | |
* @version 1.0 | |
* @since 2010-03-23 | |
* @author Oncle Tom <http://case.oncle-tom.net> | |
* @param integer $category_id |
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 | |
/** | |
* Returns the number of candidate posts for the current query | |
* | |
* Written because I saw some heavy code like that to do the same thing: http://theandystratton.com/2009/show-total-search-results-wordpress-search-template/ | |
* | |
* @version 1.0 | |
* @since 2010-05-23 | |
* @author Oncle Tom <http://case.oncle-tom.net> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CSS vertical-align sample</title> | |
<style type="text/css" media="all"> | |
body{ | |
font: 80%/1.5em Verdana, sans-serif; | |
} | |
.multicolumn li{ |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> | |
<Document> | |
<name>content/view/kml/62</name> | |
<open>0</open> | |
<Placemark id="winery-66"> | |
<name>La Tour de By</name> | |
<visibility>1</visibility> | |
<open>0</open> | |
<address>5 route de la tour de By |
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 comment_reply_link( array_merge( $args, array( 'reply_text' => __('Reply to this comment'), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> |
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 | |
if (!is_admin()){ | |
add_action('init', 'theme_init_stylesheets'); | |
} | |
/** | |
* Registers stylesheets for the current (child) theme | |
* | |
* @wordpress:action init |
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 | |
add_action('init', 'alwaysdata_ssl'); | |
/** | |
* Enables proper HTTPS detection with WordPress and Alwaysdata | |
*/ | |
function alwaysdata_ssl() | |
{ | |
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') |
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
var host = 'test.om'; | |
/^.+\.[^\.]+\.om$/.exec(host); // returns 'null' | |
/* | |
* The move: | |
* 1) new RegExp(/^.+\.[^\.]+\.om$/).exec(host); | |
* 2) (new RegExp(/^.+\.[^\.]+\.om$/)).exec(host); | |
* 3) (new RegExp('^.+\.[^\.]+\.om$')).exec(host); | |
*/ |
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
casper.start(); | |
casper.open('http://twitter.github.com/bootstrap/javascript.html#dropdowns'); | |
casper.then(function(){ | |
this.test.assertExists('#navbar-example'); | |
this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle'); | |
this.wait(2000, function(){ | |
this.test.assertExists('#dropdowns .nav-pills .open', 'Dropdown is open'); | |
}); |
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
var casper = require('casper').create(); | |
casper.start(); | |
casper.open('http://borisschapira.com/'); | |
casper.then(function dumpHeaders(){ | |
this.currentResponse.headers.forEach(function(header){ | |
console.log(header.name +': '+ header.value); | |
}); | |
}); |
OlderNewer