maryisdead
Forum Replies Created
-
For anyone still looking for this, here’s update-proof code to get the correct search url in the search form:
add_action('elementor/widget/render_content', function($content, $widget) { if ($widget->get_name() == 'search-form' && function_exists('PLL')) { $dom = new DomDocument; $dom->loadHTML($content); $nodes = $dom->getElementsByTagName('form'); $node = $nodes[0]; $node->setAttribute('action', PLL()->curlang->search_url); $content = $dom->saveHTML($node); } return $content; }, 10, 2);Forum: Plugins
In reply to: [WP API SwaggerUI] Support Other Plugins that provide REST API+1
Forum: Plugins
In reply to: [YUZO] Plugin Redirecting to Weird Sites@floriante See my reply to the other thread where you replied. In short: I don’t think so but don’t take my word for it.
Forum: Plugins
In reply to: [YUZO] Uninstall before you get hacked!From another thread in here:
Same issue. People, uninstall, this plug-in has been compromised.
Check the wp_options table:
-- Show "infected" rows SELECT * FROM wp_options WHERE option_value LIKE '%eval(String.fromCharCode%'; -- Delete rows DELETE FROM wp_options WHERE option_value LIKE '%eval(String.fromCharCode%'; -- Delete all data related to the plug-in DELETE FROM wp_options WHERE option_name LIKE '%yuzo%';I couldn’t find any other infected resources (like files). Luckily I had a pretty recent backup of my site from before the hack, did a file-level compare and didn’t find any changes. So it seems to only inject stuff into the database. But don’t take my word for it.
Forum: Plugins
In reply to: [YUZO] Plugin Redirecting to Weird SitesSame issue. People, uninstall, this plug-in has been compromised.
Check the wp_options table:
-- Show "infected" rows SELECT * FROM wp_options WHERE option_value LIKE '%eval(String.fromCharCode%'; -- Delete rows DELETE FROM wp_options WHERE option_value LIKE '%eval(String.fromCharCode%'; -- Delete all data related to the plug-in DELETE FROM wp_options WHERE option_name LIKE '%yuzo%';- This reply was modified 7 years, 1 month ago by maryisdead. Reason: Code formatting
That’s what I wanted to address, sardattack. Simply stating that the (free) plug-in “has everything you need, is really easy and really works fine” and then giving only 4/5 is really misleading.
Glad you followed up. 🙂
So why no five stars then? People these days …
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitGlad to hear you got it working!
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitJust tried the exact same code here, works like a charme.
If you just get a blank page, you should figure out where your error logs are and see what the problem is.
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitLooks fine to me. Any errors shown?
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitThen I think
wp_redirectis doing some non-sense sanitizing on the URL.You could try this line instead of
wp_redirect:header("Location: " . trim($on_sent_ok[0]) . '?email=' . $wpcf7->posted_data['user-email'], true, 302);Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitIt would’ve been helpful if you’d have posted your code, mate. 🙂
Anyways, I just took a look at one of my installations and you’ll get your fields this way:
add_action('wpcf7_mail_sent', 'ip_wpcf7_mail_sent'); function ip_wpcf7_mail_sent($wpcf7) { $on_sent_ok = $wpcf7->additional_setting('ip_on_sent_ok', false); if (is_array($on_sent_ok) && count($on_sent_ok)) { wp_redirect(trim($on_sent_ok[0]) . '?email=' . $wpcf7->posted_data['user-email']); exit; } }See that
$wpcf7->posted_datathing? It seems to hold all the information the user submitted with the form.Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submitHey, Mohi69!
Have you tried inspecting the callback parameter that gets passed?
Something along the lines of this:
add_action('wpcf7_mail_sent', 'ip_wpcf7_mail_sent'); function ip_wpcf7_mail_sent($wpcf7) { var_dump($wpcf7); die(); $on_sent_ok = $wpcf7->additional_setting('ip_on_sent_ok', false); if (is_array($on_sent_ok) && count($on_sent_ok) > 0) { wp_redirect(trim($on_sent_ok[0])); exit; } }Maybe it has the stuff you need. You could then do the redirect like this (untested code, I’m guessing the properties here):
add_action('wpcf7_mail_sent', 'ip_wpcf7_mail_sent'); function ip_wpcf7_mail_sent($wpcf7) { $on_sent_ok = $wpcf7->additional_setting('ip_on_sent_ok', false); if (is_array($on_sent_ok) && count($on_sent_ok) > 0) { wp_redirect(trim($on_sent_ok[0]) . '?email=' . $wpcf7->form_vars['user-email']); exit; } }Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] How to: Redirect after submit@waterworks2: Yes, of course, functions.php. My bad!
@harrisitservices, @nina.martinez: It seems like you’re using the Ajax submit stuff that CF7 uses by default. I forgot to mention that my solution only works when this is disabled, sorry! My workaround relies on a “real” roundtrip to the server.
I don’t like the JavaScript and CSS stuff CF7 provides very much and removed it at some point with the following code in wp-config.php:
define('WPCF7_LOAD_CSS', false); // Removes CF7 CSS define('WPCF7_LOAD_JS', false); // Removes all CF7 related JavaScript and thus disables the Ajax submitting define('WPCF7_AUTOP', false); // Disables putting frickin' paragraphs around everythingIf you’re using that, you will have to go with the official way (which should then just work fine).
Forum: Plugins
In reply to: [Simple Fields] [WordPress 3.3] Could not load simple-fields option.Fix in posting #2 works like a charme. Thanks, NicoR!