I have updated by deleting some redundant options.
// make the nopic.jpg update possible via child theme.
if ( ! function_exists( 'TaskerDev_get_first_post_image_fnc' ) ) :// I
am using this to overwrite the parent action.
function TaskerDev_get_first_post_image_fnc($pid, $w = /*************************************************************
100, $h = 100) //*{
//* TaskerDev (c) sitemile.com - function
//*
**************************************************************/
function TaskerDev_get_first_post_image($pid, $w = 100, $h = 100)
{
$img = TaskerDev_get_first_post_image_fnc($pid, $w, $h);//---------------------
$img = apply_filters('TaskerDev_get_first_post_image_filter', $img, $pid, $w, $h);
// build the exclude list
return $img;
}
$exclude = /*************************************************************array();
//*
//* TaskerDev (c) sitemile.com - function
//*
**************************************************************/
function TaskerDev_get_first_post_image_fnc($pid, $w = 100, $h$args = 100)array(
{
'order'
=> 'ASC',
//---------------------
//'post_type' build the exclude list
=> 'attachment',
$exclude = array();
'post_parent' => $pid,
$args = array(
'order' 'meta_key' => 'ASC''another_reserved1',
'post_type' => 'attachment',
'meta_value' 'post_parent' => $pid'1',
'meta_key' => 'another_reserved1',
'numberposts' => -1,
'meta_value' => '1',
'numberposts''post_status' => -1null,
'post_status' => null, );
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
$url = $attachment->ID;
array_push($exclude, $url);
}
}
//-----------------
$args = array(
'order' => 'ASC',
'orderby' => 'post_date',
'post_type' => 'attachment',
'post_parent' => $pid,
'exclude' => $exclude,
'post_mime_type' => 'image',
'post_status' => null,
'numberposts' => 1,
);
$attachments = get_posts($args);
if ($attachments) {
foreach ($attachments as $attachment) {
{
//$url = wp_get_attachment_url($attachment->ID);
return TaskerDev_wp_get_attachment_image($attachment->ID, 'thumb_image_thing');
}
}
else #else return get_bloginfo('template_url').'/images/nopic.jpg';
// wanna replace with: else return get_stylesheet_directory_uri().'/images/Picture16.jpg';
}
/*************************************************************
//*
// * TaskerDev (c) sitemile.com - function
//*
************************************************************** /
endif;
///*************************************************************/end
endif;