JoshKay
Forum Replies Created
-
Forum: Plugins
In reply to: [Frontend Uploader] [Plugin: Frontend Uploader] Layout and collecting dataHey, I know this is old, but if you want to use $_POST to update the description of the updated file, you can use the following code. $_POST[‘name’] corresponds to name=”name”?in the shortcode form, and ‘post_content’ is the description field (‘post_excerpt’ is the caption field). Hope that helps somebody!
add_action( 'fu_after_upload', 'my_fu_after_upload' ); function my_fu_after_upload( $attachment_ids ) { // do something with freshly uploaded files // This happens on POST request, so $_POST will also be available for you foreach( $attachment_ids as $att_id ) { // Format the title $author = $_POST['name']; $author .= ' ' . $_POST['email']; // Change the description $description = 'Upload by ' . $_POST['name']; $description .= ', ' . $_POST['email']; $description .= ' ' . $_POST['post_title']; // Sanitize input from user $author = sanitize_text_field( $author ); wp_update_post( array( 'ID' => $att_id, 'post_title' => $author, 'post_content' => $description ) ); } }
Forum: Plugins
In reply to: Flexible uploadI have the same problem here. Throws an error same as above. Any fix for this on 2.8?
J
Forum: Fixing WordPress
In reply to: add special character using link_before or link_afterAnd I have another question…
I am using link_after in wp_list_pages and trying to incorporate the meta data from each page. In this case it’s part of a url to an image in order to reconstruct an img tag.
So
<?php wp_list_pages('title_li=&child_of=3&link_after=<img src="' . bloginfo('siteurl') . get_post_custom_values('the_key', $id) . '.jpg'); ?>
Obviously this is wrong, but how do I retrieve that data during the wp_list_pages function?
Forum: Fixing WordPress
In reply to: add special character using link_before or link_after@vasilescu_anton the easiest way is probably through CSS. Just identify the container (probably something like ‘#sidebar ul li’ in your theme’s ‘style.css’) and change the li:before and put in the hex code for the character you want.
Try adding
#sidebar ul ul li:before {
content: “0BB 020”;
}