// jQuery
$(document).ready(function() {
// code
})
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
$json = file_get_contents('https://api.pinterest.com/v3/pidgets/boards/Globetrawter/natural-homes/pins/'); | |
$jsonIterator = new RecursiveIteratorIterator( | |
new RecursiveArrayIterator(json_decode($json, TRUE)), | |
RecursiveIteratorIterator::SELF_FIRST); | |
foreach ($jsonIterator as $key) { | |
// get only url you can var_dump($key) and see what you like ;-) | |
if(isset($key['url']) && strpos($key['url'], '.jpg') !== false) { |
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 | |
/* Batch delete all fields containing order_ in name */ | |
foreach($fields->find("name%=order_") as $field) { | |
$fields->delete($field); | |
if (!$fields->get($field)) echo "<p>field {$field->name} was deleted.</p>"; | |
} | |
/* list all templates and provide ability to delete unused ones */ | |
if ($input->post->submit) { |
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
// Override limit based on user input | |
if($userLimit = (int) $input->get->limit) { | |
$remeberLimit = "?limit=$userLimit"; | |
$limit = $userLimit; | |
$input->whitelist('limit', $limit); | |
} | |
// Get year filter | |
if($userYear = (int) $sanitizer->selectorValue($input->get->year)) { | |
$year = $userYear; |
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 | |
/** | |
* Roskis | |
* | |
* Adds custom trash view that can be also accessed by defined roles | |
* Pages in trash can be searched, sorted and restored. | |
* | |
* | |
* Copyright 2013 by Antti Peisa |
NewerOlder