deadelvis
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Theme localisation without changing admin panel languageCan someone please help me and tell me why pasting this to my theme’s functions.php does NOT work? Admin still shows in local language instead of en_US π
PS: Running WP 3.3
Forum: Plugins
In reply to: [amr users] [Plugin: amr-users] Broken on PHP 5.3 ?Thanks a lot… that would be great.
Want to avoid hacking a fix myself.Forum: Plugins
In reply to: [Super Simple Quotes] [Plugin: Super Simple Quotes] Displaying punctuationSince author doesn’t seem to care about it anymore.. here’s the fix…
Replace:
<td><textarea name="super_simple_quotes[quotes]" cols="150" rows="25"><?php echo implode("\n", $options['quotes']) ?></textarea></td>
with:
<td><textarea name="super_simple_quotes[quotes]" cols="150" rows="25"><?php echo stripslashes(implode("\n", $options['quotes'])) ?></textarea></td>Replace:
$input['quotes'] = explode("\n", wp_filter_nohtml_kses($input['quotes']));
with:
$input['quotes'] = explode("\n", stripslashes(wp_filter_nohtml_kses($input['quotes'])));FIY…
Just found there is a much easier and cleaner way to do the post formats listing:$args=$args = array( 'taxonomy' => 'post_format', 'orderby' => 'name', 'show_count' => 1, 'hierarchical' => 0, 'title_li' => '' ); echo wp_list_categories( $args );Also… found a nasty bug with the counting of total posts. Both your code and mine will show incorrect counts, that include draft/pending/trashed posts. Seems to be a know issue with WP:
http://wordpress.org/support/topic/custom-taxonomy-post-count-incorrect?replies=11
http://wordpress.stackexchange.com/questions/28966/wp-list-categories-show-count-includes-publisheddraft-posts-with-custom-taxonomKeeping counts hidden for now. Hope a fix comes soon.
Regards
Couldn’t wait… so here’s how I did it:
For the LIST… replace:
echo '<li class="post-format-item"><a title="' . str_replace('%format', $string, $tooltip) . '" href="' . get_post_format_link($slug) . '">' . $string . '</a>' . $count . $format_id . '</li>';with:
$class = ''; if(is_tax('post_format') && get_post_format()==str_replace('post-format-', '', $post_format->slug)){ $class = ' current_format_item'; } echo '<li class="post-format-item'.$class.'"><a title="' . str_replace('%format', $string, $tooltip) . '" href="' . get_post_format_link($slug) . '">' . $string . '</a>' . $count . $format_id . '</li>';For the DROPDOWN… replace:
echo '<option class="level-0" value="' . $slug . '">' . $string . $count . $format_id . '</option>';with:
$selected = ''; if(is_tax('post_format') && get_post_format()==str_replace('post-format-', '', $post_format->slug)){ $selected = 'selected'; } echo '<option '.$selected.' class="level-0" value="' . $slug . '">' . $string . $count . $format_id . '</option>';Also… too bad that for links the DROPDOWN uses – http://name.tld/?post_format=image – and LIST uses – http://name.tld/archives/type/image – (or whatever other permalink customizations is defined). Consistency would be nice too, but didn’t bother fixing.
Let me know if you can consider implementing and releasing updated version.
ThxThanks! Looking fwd to it!
cheers! got it working
Good question… can’t seem to get it to work on multisite π
Forum: Plugins
In reply to: [Super Simple Quotes] [Plugin: Super Simple Quotes] Displaying punctuationLove the simplicity of this plugin (tested quite a few before picking this one)… but am experiencing the exact same issue here! Backslashes before special char show both on admin side (input field) and display side (widget).
Please please please fix?