Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Got it working by ripping up the More-Fields plugin but now I need some help getting to play nice with filters. Can’t seem to get them to fire. Anyone have tips on this code block?

    I’ve got this running in a folder/file I created called more-uploads.php and this is all that’s in there so far except for comments, does it need to be wrapped in a class to properly execute? Thanks!

    add_filter('more_fields_field_types', 'mu_add_upload_field_type');
    
    	function mu_add_upload_field_type($f){
    		//$f = array();
    		$f['upload']['label'] = __('Uploader', 'more-plugins');
    		$upload_html .= "
    			<input type='hidden' id='%key%' name='%key%' value='%value%'>
    			<div class='mf_file_list_show' id='mf_file_list_show_%key%'>
    				<a href='%value%'>%value%</a> <input type='button' class='button file_list_update' id='mf_file_list_edit_button_%key%' value='Edit' />
    			</div>
    			<div class='mf_file_list_edit' id='mf_file_list_edit_%key%'>
    				<label class='mf_filelist' for='%key%'>%title%</label>
    				<input type='file' class='%class%' id='%key%_temp' name='%key%' />";
    		$upload_html .= "</div>";
    		$f['upload']['html_item'] = $upload_html;
    		$f['upload']['html_selected'] = 'checked="checked"';
    		$f['upload']['html_after'] = '%caption%';
    		$f['upload']['values'] = true;
    		$f['upload']['comment'] = __('Upload files to the media library and use them all in one place.', 'more-plugins');
    		return $f;
    	}

    @kalstrom where can we find the docs for adding custom field types to #MoreFields? Looked on labs. but didn’t see it. I’m gonna try to write the solution this thread seems to be craving (me too!)

    Thread Starter jared83

    (@jared83)

    Helloooooooo?

Viewing 3 replies - 1 through 3 (of 3 total)