mensch
Forum Replies Created
-
Forum: Plugins
In reply to: [Hide Posts] No longer worksI’m experiencing the same issue on a development site with WP_DEBUG enabled. When selecting the various hiding options in the metabox in the post edit screen, the AJAX function calling
save_meta_datasilently fails.There appears to be an undefined variable on line 353 of
class-post-hide-metabox.php. It’s this line:$exist = whp_plugin()->get_whp_meta( $post_id, $key,$fallabacke );Neither
$fallabacke, nor$fallaback(which is referenced elsewhere in the plugin file) is available in thesave_meta_datafunction. Removing the last variable in that function call allows the plugin to save the relevant data to the database:$exist = whp_plugin()->get_whp_meta( $post_id, $key );Forum: Plugins
In reply to: [Two Factor Authentication] Adding support for Paid Memberships ProYes, looking at the code there seem to be a lot of hooks in the constructor which will be duplicated this way.
As the plugin adds a global variable of the
Simba_Two_Factor_Authentication_Pluginclass instance (which extendsSimba_Two_Factor_Authentication_1), the enqueue method can be used directly, which should avoid the potential duplication issues:add_filter('do_shortcode_tag', function($output, $tag) {
if ('pmpro_login' == $tag && class_exists('Simba_Two_Factor_Authentication_1')) {
global $simba_two_factor_authentication;
$simba_two_factor_authentication->login_enqueue_scripts();
}
return $output;
}, 10, 2);Forum: Plugins
In reply to: [Woo Donations] Adding a donation on checkout throws a fatal errorJust saw other topics with the same issue. Could this perhaps be due a server configuration where the PHP intl module is missing? The module is currently temporarily inactive on the hosting where my websites is running, so it might cause this issue.
Update: No, this isn’t the case. On my local machine, with all the required modules present the error also occurs. When a donation is added from the cart there is no issue, only when a value is entered in the last checkout screen.
- This reply was modified 1 year, 5 months ago by mensch.
Forum: Plugins
In reply to: [Two Factor Authentication] Adding support for Paid Memberships ProI don’t think requesting official support will be necessary in my case, as supporting the shortcode is enough for me and that can be done by amending the
do_shortcode_tagon line 137 ofsimba-tfa/login-form-integrations.phpas mentioned in my initial post.As those changes will be overwritten with every update of the plugin, I’ve updated the
functions.phpfile of my theme instead with the following filter which ensures the enqueuing of the relevant assets on the login page:/**
* Add support for the Two Factor Authentication plugin
*/
add_filter('do_shortcode_tag', function($output, $tag) {
$tfa = new \Simba_Two_Factor_Authentication_1();
if ('pmpro_login' == $tag) $tfa->login_enqueue_scripts();
return $output;
}, 10, 2);This is because of the JSON LD Schema that gets appended to the REST API output. GraphQL should be able to handle JSON LD Schemas, but it seems to choke on something. A quick solution, which seems to work after some quick tests, is disabling the JSON LD output via a filter:
add_filter('wp_rest_yoast_meta/filter_yoast_json_ld', '__return_false');- This reply was modified 5 years, 11 months ago by mensch.
Forum: Plugins
In reply to: [Polylang] CPT language not saved on publishAh, thank you for the context. I inherited The Events Calendar from the previous maintainer of the website and I’m not that happy about it for obvious reasons…
I think I’ll wait for 4.2, as the mentioned issue seems to have a patch. Otherwise I’ll have to migrate to another plugin. Events Maker seems to be a better WordPress citizen with regards to interoperability with multilingual plugins, I believe?
Forum: Plugins
In reply to: [Polylang] CPT language not saved on publishHi Chouby,
Thanks for getting back to me. I though I did check with all the plugins disabled, but I neglected to deactivate one plugin, of course it turned out to be the culprit… It’s The Events Calendar by Modern Tribe and from what I’ve read on the forums here so far, it doesn’t integrate all that nicely with Polylang.
I’m not sure, but it appears that when The Events Calendar is active the
save_posthook of Polylang isn’t triggered at all. It seems that Modern Tribe updated theiradd_actionpriority, because when I set Polylang’s to a very low number (3) the language starts getting saved again. I’m also using Advanced Custom Fields, so this priority change in admin/admin-filters-post.php is likely going to break something else if I understand the comment on line 34 correctly.