Problem trying to list files that are in a directory within child theme and make as select box to choose one of them and have selection saved with the rest of the data.
I have studied your hybrid_get_post_templates and can do something similar but
but only outputting the drop down as normal with a quickly hurried together plugin not within yourmeta-boxes,
Something along the line of
function get_header_images() {
$mythemdir = get_stylesheet_directory();
$dhandle = opendir($mythemdir.'/images/headeraddons/');
// define an array to hold the files
$files = array();
if ($dhandle) {
// loop through all of the files
while (false !== ($fname = readdir($dhandle))) {
// if the file is not this file, and does not start with a '.' or '..',
// then store it for later display
if (($fname != '.') && ($fname != '..') &&
($fname != basename($_SERVER['PHP_SELF']))) {
// store the filename
$files[] = (is_dir( "./$fname" )) ? "(Dir) {$fname}" : $fname;
}
}
// close the directory
closedir($dhandle);
}
// Now loop through the files, echoing out a new select option for each one
foreach( $files as $fname )
return $fname;
}
But then how to get this to work with hybrid_post_meta_box_args
I understand this is outside the scoop of normal support, but any directions or ideas greatly received...