Scalable and
Modular
Architecture for
C
S
S
var getRelationship = function(x, y) { | |
// If both arguments are numbers | |
if ( !isNaN(x) && !isNaN(y) ) { | |
if ( x == y ) { // if they are equal, return '=' | |
return '='; | |
} else { // if not, return comparison operator | |
return x < y ? '<' : '>'; |
/*******************************************************/ | |
/ Shared by www.codewordpress.com / | |
/ Add following code to Function.php file in your theme / | |
/*******************************************************/ | |
<?php | |
function getPostViews($postID){ | |
$count_key = 'post_views_count'; | |
$count = get_post_meta($postID, $count_key, true); | |
if($count==''){ |
<?php | |
function my_load_scripts($hook) { | |
// create version codes | |
$my_js_ver = date("ymd-Gis", filemtime( get_stylesheet_directory() .'/js/myscript.js' )); | |
$my_css_ver = date("ymd-Gis", filemtime( get_stylesheet_directory() . '/style.css' )); | |
wp_enqueue_script( 'my-script-name', get_stylesheet_directory() . '/js/myscript.js', array(), $my_js_ver ); | |
Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)
Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !
- AngularJS VS jQuery : http://stackoverflow.com/questions/14994391/how-do-i-think-in-angularjs-if-i-have-a-jquery-background/15012542#15012542 (MUST READ for beginners)
- What are the nuances of scope prototypal / prototypical inheritance in AngularJS? : http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs (MUST READ)
- twitter list maintained here: https://twitter.com/revolunet/angularjs
- must see vidéos :http://egghead.io (MUST SEE)
To connect Jetpack in your local installation, you'll need a way for WP.com servers to reach your server. That can be done in a number of different ways:
- You can open your router's ports and use your public IP
- You can use some kind of Dynamic DNS provider.
But these options fall short of ngrok
, which is a "localhost tunnel". It basically allows the Internet to hit a local port on your machine without worrying about ports or IPs.
As long as ngrok
is running, Jetpack / WP.com will be able to communicate with your local site. This will allow remote modules like Site Search and Manage to work.
<?php | |
/** | |
* When using the WordPress Importer, update existing | |
* posts instead of skipping them. Updates content according | |
* to the import file even if the existing post was updated | |
* more recently. | |
* | |
* To use, drop this file into your /mu-plugins/ folder or | |
* copy this code into your functions.php file. |
Table of Contents generated with DocToc