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
theme updater add_action( 'init', 'kit_check_theme_update' ); | |
function kit_check_theme_update(){ | |
$versionInfo = 'http://kallzu.s3.amazonaws.com/_kallzu_wp_updates/ppl-ninja/meta.json'; | |
$theme = $theme_data = is_child_theme() ? wp_get_theme()->parent() : wp_get_theme(); | |
$themeDir = $theme->Template; | |
$updater = new ThemeUpdateChecker( $themeDir, $versionInfo ); | |
$updater->addResultFilter( 'show_data' ); |
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
// Get stat data that is older then 30 days | |
$args = array( | |
'post_type' => 'site', | |
'post_per_page' => 1, | |
'meta_key' => 'stat_updated', | |
'meta_value_num' => time() - 60*60*24*30, // one month before | |
'meta_compare' => '<' | |
); | |
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
function kallzu_parse_csv2($csv_url){ | |
ini_set('auto_detect_line_endings', true); | |
$result = array(); | |
$file = fopen($csv_url, 'r'); | |
while (($line = fgetcsv($file)) !== FALSE) { | |
//$line is an array of the csv elements | |
$result[] = $line; | |
} | |
fclose($file); |
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
/* =WordPress Core | |
-------------------------------------------------------------- */ | |
.alignnone { | |
margin: 5px 20px 20px 0; | |
} | |
.aligncenter, | |
div.aligncenter { | |
display: block; | |
margin: 5px auto 5px auto; |
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 | |
/* | |
Plugin Name: WPSE Search Data Feed | |
Plugin URI: http://wordpress.stackexchange.com | |
Description: Provides interface to search and get result in JSON data | |
Author: Sisir | |
Version: 1.0 | |
Author URI: http://developerpage.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
/** | |
* 7.Sort data function | |
* Allows you to sort the data by the variables set in the $_GET | |
* @return Mixed | |
*/ | |
private function sort_data( $a, $b ) { | |
// Set defaults | |
$orderby = 'ID'; | |
$order = 'asc'; |
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
* calendar widget */ | |
.widget_calendar {float: left;} | |
#wp-calendar {width: 100%; } | |
#wp-calendar caption { text-align: right; color: #333; font-size: 12px; margin-top: 10px; margin-bottom: 15px; } | |
#wp-calendar thead { font-size: 10px; } | |
#wp-calendar thead th { padding-bottom: 10px; } | |
#wp-calendar tbody { color: #aaa; } | |
#wp-calendar tbody td { background: #f5f5f5; border: 1px solid #fff; text-align: center; padding:8px;} | |
#wp-calendar tbody td:hover { background: #fff; } | |
#wp-calendar tbody .pad { background: none; } |
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 | |
namespace Numstock\Models; | |
use Sunra\PhpSimple\HtmlDomParser; | |
class Dse_News{ | |
protected $url = 'http://dsebd.org/display_news.php'; | |
public function __construct(){ |
OlderNewer