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 | |
$last_changed = wp_cache_get( 'last_changed', 'posts' ); | |
if ( ! $last_changed ) { | |
$last_changed = microtime(); | |
wp_cache_set( 'last_changed', $last_changed, 'posts' ); | |
} | |
global $wpdb; |
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 | |
/** | |
* Font Awesome Icons Array (4.3.0) | |
* @author Monzurul Haque | |
* @author_uri https://github.com/farukham | |
**/ | |
$icons_arr = array( | |
__("None", "fifothemes") => "none", | |
__("Adjust", "fifothemes") => "fa-adjust", |
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 | |
/* | |
* © WTFPL | |
* by necenzurat | |
* Updated: 19 May 2013 | |
*/ | |
$id = @$_GET["id"]; | |
//$id = "108520002754793822340"; |
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 | |
// Stand-alone WordPress.org plugin api access | |
$url = 'http://api.wordpress.org/plugins/info/1.0/'; | |
$fields = array( | |
'action' => 'query_plugins', | |
'request' => serialize( (object) array( | |
'author' => 'trepmal', | |
//'search' => 'howdy', |
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
/** | |
* Pure CSS, accessible like button (inspired by Medium) | |
*/ | |
.like { | |
position: absolute; | |
clip: rect(0,0,0,0); | |
} | |
.like + label { |
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 | |
# Load slim WP | |
define( 'WP_USE_THEMES', false ); | |
require( './wp-load.php' ); | |
# http://phpexcel.codeplex.com/ | |
require_once dirname(__FILE__) . '/Classes/PHPExcel.php'; | |
global $wpdb; | |
$query = "SELECT * FROM $wpdb->comments |
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 | |
// REQUIRED PARAMETERS | |
$status = 'http://www.mylink.com'; | |
$email = 'your@email.com'; | |
$pass = 'yourpassw0rd'; |
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
#gradient { | |
.vertical(@startColor: #555, @endColor: #333, @colorStop: 100%) { | |
background-color: mix(@startColor, @endColor, 60%); | |
background-image: -moz-linear-gradient(top, @startColor, @endColor @colorStop); // FF 3.6+ | |
background-image: -ms-linear-gradient(top, @startColor, @endColor @colorStop); // IE10 | |
background-image: -webkit-gradient(linear, 0 0, 0 @colorStop, from(@startColor), to(@endColor)); // Android 2.3, Safari 4+, Chrome 2+ | |
background-image: -webkit-linear-gradient(top, @startColor, @endColor @colorStop); // Safari 5.1+, Chrome 10+ | |
background-image: -o-linear-gradient(top, @startColor, @endColor @colorStop); // Opera 11.10 | |
background-image: linear-gradient(top, @startColor, @endColor @colorStop); // The standard | |
} |
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 | |
/** | |
* Example for writing a WP plugin that adds a custom post type and flushes | |
* rewrite rules only once on initialization. | |
*/ | |
/** | |
* On activation, we'll set an option called 'my_plugin_name_flush' to true, | |
* so our plugin knows, on initialization, to flush the rewrite rules. | |
*/ |
OlderNewer