<td class="field_info" title="<?php esc_attr_e('Add placeholders to create a template for the filestructure you\'d like. Separate folders with \'/\'.');?>" ><label for="template"><?php esc_html_e('Build a path template:');?></label></td>
<td class="field_info" title="<?php esc_attr_e('Add placeholders to create a template for the filestructure you\'d like. Separate folders with \'/\'.');?>" ><label for="template"><?php esc_html_e('Build a path template:');?></label></td>
<td><input id="template" name='custom_upload_dir[template]' type='text' class='code' value='<?php esc_attr_e($options['template']); ?>' size='60' title="<?php esc_attr_e('Add placeholders to create a template for the filestructure you\'d like. Separate folders with \'/\'.');?>"/></td>
<td><input id="template" name='custom_upload_dir[template]' type='text' class='code' value='<?php esc_attr_e($options['template']); ?>' size='60' title="<?php esc_attr_e('Add placeholders to create a template for the filestructure you\'d like. Separate folders with \'/\'.');?>"/></td>
</tr>
</tr>
<tr>
<tr>
<td class="field_info" valign="top" title="<?php esc_attr_e('These are replaced with specific values when you upload something.');?>">Use any of these placeholders:</td>
<td class="field_info" valign="top" title="<?php esc_attr_e('These are replaced with specific values when you upload something.');?>">Use any of these placeholders:</td>
<td valign="top"><input name='custom_upload_dir[wp_use_yearmonth]' type='checkbox' id='wp_use_yearmonth' <?php checked(get_option('uploads_use_yearmonth_folders'), 1); ?> /><label for='wp_use_yearmonth' title="<?php esc_attr_e('These are built-in settings found at WordPress \'Media\' screen. Feel free to edit them here too.');?>"><?php esc_html_e('Organize my uploads into month- and year-based folders','cud'); ?></label></td>
<td valign="top"><input name='custom_upload_dir[wp_use_yearmonth]' type='checkbox' id='wp_use_yearmonth' <?php checked(get_option('uploads_use_yearmonth_folders'), 1); ?> /><label for='wp_use_yearmonth' title="<?php esc_attr_e('These are built-in settings found at WordPress \'Media\' screen. Feel free to edit them here too.');?>"><?php esc_html_e('Organize my uploads into month- and year-based folders','cud'); ?></label></td>
</tr>
</tr>
<tr><td> </td></tr>
<tr><td> </td></tr>
<tr>
<tr>
<td valign="top" class="field_info">Settings for taxonomy hierarchies:</td>
<td valign="top" class="field_info">Settings for taxonomy hierarchies:</td>
<label for='flatten_hierarchy' title="<?php esc_attr_e('Don\'t split taxonomy hierarchies into subfolders (folders will be like: "categoryA-categoryB").');?>">
<label for='flatten_hierarchy' title="<?php esc_attr_e('Don\'t split taxonomy hierarchies into subfolders (folders will be like: "categoryA-categoryB").');?>">
<?php esc_html_e('Flat filesystem (no subfolders for children)','cud'); ?>
<?php esc_html_e('Flat filesystem (no subfolders for children)','cud'); ?>
<label for='only_base_nodes' title="<?php esc_attr_e('Even if post belongs to multiple levels of a hierarchy, use only the top most ancestor.');?>">
<label for='only_base_nodes' title="<?php esc_attr_e('Even if post belongs to multiple levels of a hierarchy, use only the top most ancestor.');?>">
<?php esc_html_e('Ignore children (use only the root of hierarchy)','cud'); ?>
<?php esc_html_e('Ignore children (use only the root of hierarchy)','cud'); ?>
</label>
</label>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td valign="top" colspan="2" style="text-align:center;font-weight:bold;"><br><font color="orange"><?php esc_html_e('Try to always name and save your post before uploading attachments.');?></font></td>
<td valign="top" colspan="2" style="text-align:center;font-weight:bold;"><br><font color="orange"><?php esc_html_e('Try to always name and save your post before uploading attachments.');?></font></td>
</tr>
</tr>
<tr>
<tr>
<td><h3><?php esc_html_e('Test it:');?></h3></td>
<td><h3><?php esc_html_e('Test it:');?></h3></td>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$test_ids = explode(',', $options['test_ids']);
$test_ids = explode(',', $options['test_ids']);
foreach($test_ids as $post_id){
foreach($test_ids as $post_id){
$_REQUEST['post_id'] = $post_id;
$_REQUEST['post_id'] = $post_id;
$post_title = get_the_title($post_id);
$post_title = get_the_title($post_id);
$url = get_permalink($post_id);
$url = get_permalink($post_id);
if($post_title && $url){
if($post_title && $url){
echo "<tr><td class=\"field_info\"><strong>Post {$post_id}, \"<a href='{$url}'>{$post_title}</a>\"</strong> would upload to:</td><td><code>".cud_wp_upload_dir().cud_generate_dir().'</code></td></tr>';
echo "<tr><td class=\"field_info\"><strong>Post {$post_id}, \"<a href='{$url}'>{$post_title}</a>\"</strong> would upload to:</td><td><code>".cud_wp_upload_dir().cud_generate_dir().'</code></td></tr>';
}
}
}
?>
<td class="field_info"><label for="test_ids" title="<?php esc_attr_e('A comma separated list of post IDs that you\'d like to test.');?>"><?php esc_html_e('Enter some post IDs to test the path gene