mklusak
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Upgrade to 4.7.2 breaks jquery in Menu admin pageYes, I had this error too, and it was caused by calling
$woocommerce->cart->get_shipping_packages();
inwoocommerce_available_payment_gateways
filter.I added
if( ! $woocommerce || !isset($woocommerce->cart) ) return;
and it works now!Forum: Plugins
In reply to: [WP Super Cache] WP Super Cache seems to cache Error pagesI have exactly the same feeling. Notice (HTML comment) about caching was even in source code.
But I don’t understand how is this possible.
Forum: Plugins
In reply to: [Disable Real MIME Check] not fixed in 4.7.3 for file type: ogvYep, I am unable to upload XLS file in 4.7.3 without this plugin … so it’s staying activated.
Forum: Plugins
In reply to: [Filenames to latin] Filenames with accents and Mac OSI was dealing with this before – renaming already uploaded files, and used this code that seems to work well:
$file = 'zs? barrandov.png'; $sanitized_file = preg_replace('/\pM+/u', '', $file);
Maybe you could use that somehow in your plugin – in this special case.
- This reply was modified 8 years ago by mklusak.
Forum: Plugins
In reply to: [Visual Form Builder] Spam getting throughSame here, last two days. Antispam field has no effect now.
Forum: Plugins
In reply to: [WP Term Order] Need helpFinally, there is a messy solution – I have to get all taxonomy terms (that are ordered by WP-Term-Order plugin). Then I have to get all post terms (unordered). And I extract those ordered terms that are connected to the post.
global $post; $correctly_ordered_post_terms = array(); $used_terms = array(); $post_terms_unordered = get_the_terms( $post, 'my_taxonomy' ); // if( ! $post_terms_unordered ) return false; // post has no term foreach( $post_terms_unordered as $post_term ) { $used_terms[ $post_term->term_id ] = $post_term; } $all_taxonomy_terms_ordered = get_terms( 'my_taxonomy', array('orderby' => 'order') ); foreach( $all_taxonomy_terms_ordered as $ordered_term ) { if( isset($used_terms[ $ordered_term->term_id ]) ) { $correctly_ordered_post_terms[] = $used_terms[ $ordered_term->term_id ]; } } $correctly_ordered_post_terms // ... array with ordered post terms.
Forum: Plugins
In reply to: [WP Term Order] Need helpOh God no, I was wrong! I too use WP-Term-Order, but as the
get_the_terms()
is unaffected, thewp_get_object_terms()
is unaffected, too. It only listed terms in different order, that was coincidentally same as my custom order.Well, that sucks.
Forum: Plugins
In reply to: [WP Term Order] Need helpHI @bph,
I think @jmlapam asked how to get terms in correct order when listing ONE POST’s terms. Function
get_the_terms()
has no arguments for this.But! There is solution: don’t use
get_the_terms( $post->ID, 'my_tax )
, use$sorted_terms = wp_get_object_terms( $post->ID, 'my_tax', array( 'orderby' => 'order' ) )
It works!
- This reply was modified 8 years, 6 months ago by mklusak.
Hi, but I was pointing to simple task – for example just counting files in folders (of original WP installation) and comparing that count to corresponding folder of website.
If wp-admin/includes/ has 77 files, and plugin counts to 80 files, then there are probably 3 malicious files in that folder.
I did not mean any “content” scaning of that files.
I thought so. It’s some
pre_get_posts
magic, isn’t it? Am I able to programatically suppres this behavior just in “Insert link” case?My problem has nothing common with “Media” settings. The “Gallery” is custom post type in my scenario.
I am editing post – Page, acutally – (with translations activated), but “Insert link” dialog does not find items of another custom post type, that does not have languages and translations activated (because I don’t want to).
Cool! Thank you! ??
Ha! Rules deactivating did the job, but after re-activating it works too. So there had to be something wrong with the rules in .htaccess file, what repaired itself after .htaccess regeneration. Strange.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Funny error in Czech translationHa! I did not know that. Corrected, and few more string translated!
Ok, that will be great! For now I am “correcting” this behavior with related filter.
Thank for your great plugin!