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
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
// Enable WP_DEBUG mode | |
define('WP_DEBUG', true); |
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
/* From Chis Coyier: https://css-tricks.com/attribute-selectors/ */ | |
/* | |
Attribute exactly equals certain value | |
<h1 rel="external">Attribute Equals</h1> | |
*/ | |
h1[rel="external"] { color: red; } | |
/* | |
Attribute contains certain value somewhere |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
global $wpdb; | |
$limit = 0; | |
$year_prev = null; | |
$months = $wpdb->get_results("SELECT DISTINCT MONTH( post_date ) AS month , YEAR( post_date ) AS year, COUNT( id ) as post_count FROM $wpdb->posts WHERE post_status = 'publish' and post_date <= now( ) and post_type = 'post' GROUP BY month , year ORDER BY post_date DESC"); | |
foreach($months as $month) : | |
$year_current = $month->year; | |
if ($year_current != $year_prev){ | |
if ($year_prev != null){?> | |
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
// Check if we are in a local environment | |
function is_localhost() { | |
// set the array for testing the local environment | |
$whitelist = array( '127.0.0.1', '::1' ); | |
// check if the server is in the array | |
if ( in_array( $_SERVER['REMOTE_ADDR'], $whitelist ) ) { | |
NewerOlder