Jezze
Forum Replies Created
-
Forum: Plugins
In reply to: [Enhanced Media Library] grouping MIME type labelsI was able to implement the feature in your plugin. I changed the function wpuxss_eml_post_mime_types() in mime-types.php to this.
function wpuxss_eml_post_mime_types( $post_mime_types ) { $wpuxss_eml_mimes = get_option('wpuxss_eml_mimes'); if ( !empty($wpuxss_eml_mimes) ) { $mineGroups = array(); foreach ( $wpuxss_eml_mimes as $type => $mime ) { if ( $mime['filter'] == 1 ) { $key = $mime['singular']; if ( !isset($mineGroups[$key]) ) { $mineGroups[$key] = array( 'singular' => $mime['singular'], 'plural' => $mime['plural'], 'mime' => $mime['mime'], ); } else { $mineGroups[$key]['mime'] .= ',' . $mime['mime']; } } } if ( !empty($mineGroups) ) { foreach ( $mineGroups as $type => $mineGroup ) { $post_mime_types[$mineGroup['mime']] = array( __($mineGroup['singular']), __('Manage ' . $mineGroup['singular']), _n_noop($mineGroup['singular'] . ' <span class="count">(%s)</span>', $mineGroup['plural'] . ' <span class="count">(%s)</span>') ); } } } return $post_mime_types; }Basically it creates comma separated MIME-type keys in $post_mime_types, which should work according to this blog http://ageekandhisblog.com/wordpress-how-to-add-more-upload-categories-filter/
But unfortunately, there seems to be a bug (?) in /wp-admin/includes/class-wp-media-list-table.php in function get_views() and I had to change a few lines, which would be a quite bad requirement for the plugin. Anyway, I changed the following lines.
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));to
$post_mime_types_piped = array_keys($post_mime_types); foreach ($post_mime_types_piped as $key => $value) $post_mime_types_piped[$key] = str_replace(",", "|", $value); $matches = wp_match_mime_types($post_mime_types_piped, array_keys($_num_posts));and
if ( !empty( $num_posts[$mime_type] ) ) $type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';to
$mime_type_piped = str_replace(',', '|', $mime_type); if ( !empty( $num_posts[$mime_type_piped] ) ) $type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type_piped] ), number_format_i18n( $num_posts[$mime_type_piped] )) . '</a>';I hope this will help you.
Forum: Fixing WordPress
In reply to: Auto Embed Youtube not workingMostly I use the visual editor, but this time I also checked if some mark-up was placed around the URL in the text view.
Anyway, I found the problem. It has nothing to do with WordPress itself. The problem was myself… I served my blog over HTTPS and Firefox as most browsers do not allow embedded plain HTTP content within pages served over HTTPS.
Maybe WordPress should check if the blog is served over HTTPS and adjust the URL of embedded content if possible.
Thanks for trying to help and sorry for my dump mistake.
Forum: Fixing WordPress
In reply to: Auto Embed of Videos Not WorkingI have the same problem and no other plugin is causing it. WordPress just creates an iframe with src=”http://…”, but it should be https.
Forum: Plugins
In reply to: [Shortcodes Ultimate - Content Elements] Performance problemI could trace the problem back to .\inc\core\data.php line 2092.
‘values’ => Su_Tools::get_users()
The stacktrace is the following:
do_action(‘init’), Shortcodes_Ultimate::register(), Su_Data::shortcodes(), Su_Tools::get_users(), get_users(), WP_User_Query->__construct(), WP_User_Query->query(), WP_User->__construct(), WP_User->init(), WP_User->for_blog(), WP_User->_init_caps(), get_user_meta(), get_metadata(), update_meta_cache()
Forum: Plugins
In reply to: [Shortcodes Ultimate - Content Elements] Performance problemSome additional info.
My blog/bbpress has nearly than 3000 users and for each of them the following query will be executed every time the website is loaded.
SELECT user_id, meta_key, meta_value
FROM wp_usermeta
WHERE user_id IN (<user_id>)Forum: Alpha/Beta/RC
In reply to: 3.1 RC2: Missing "Show on screen" option in link-managerThanks for your quick response. I submitted an enhancement request.