This file contains hidden or 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 get_the_first_image() { | |
$files = get_children('post_parent='.get_the_ID().'&post_type=attachment&post_mime_type=image'); | |
if($files) : | |
$keys = array_reverse(array_keys($files)); | |
$j=0; | |
$num = $keys[$j]; | |
$image=wp_get_attachment_image($num, 'large', false); | |
$imagepieces = explode('"', $image); | |
$imagepath = $imagepieces[1]; | |
$thumb=wp_get_attachment_thumb_url($num); |
This file contains hidden or 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 | |
/* | |
* Roni Pinili | |
* 12/17/2017 | |
* Laravel treebuilding (Parent - Child Collection) | |
Params child collection, parent collection | |
*/ | |
This file contains hidden or 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
var files = [ | |
"file.ext", | |
] | |
var i; | |
var targets_count = files.length; | |
for (i = 0; i < targets_count; i++) { | |
files[i] | |
var partsArr = files[i].split('/'); | |
console.log(partsArr); |
NewerOlder