MaybeYesMaybeNo
Forum Replies Created
-
Thank you, your code works perfectly.
One more question, is it possible to remove not only the uploaded file, but also the file structure from the server after a email has been sent:
In the upload folder remains a folder of random name, with a css folder etc.
The code I’m using is:
if ( ! defined( 'ABSPATH' ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) { return; } add_action( 'forminator_custom_form_mail_admin_sent', 'delete_upload_after_email', 99, 5 ); function delete_upload_after_email( $instance, $custom_form, $data, $entry, $recipients ) { foreach ( $entry->meta_data as $field_name => $field ) { if ( false !== strpos( $field_name, 'upload' ) ) { foreach ( $field['value']['file'] as $key => $value ) { if ( 'file_path' === $key && ! empty( $value ) ) { if ( is_array( $value ) ) { foreach ( $value as $path ) { wp_delete_file( $path ); } } else { wp_delete_file( $value ); } } } } } }
Thank you, I double checked and there was a css conflict caused on my side. Sorry for that.
Thank you for your response. I wanted to apply a class to all .forminator-button which also include the pagination buttons. I solved this via jquery for now. If there is a more elegant solution, please let me know. I’m looking for a global solution, without the need of adding classes to individual fields (also pagination fields don’t have the option to add custom classes)
$( document ).on( “ajaxComplete”, function() {
$(“.forminator-button”).addClass(“myclass”);
});
- This reply was modified 1 year, 9 months ago by MaybeYesMaybeNo.
Forum: Fixing WordPress
In reply to: Styling password protected area login formForum: Fixing WordPress
In reply to: Styling password protected area login formAny advice?
Forum: Fixing WordPress
In reply to: Styling password protected area login formI would be interested in the answer, as well.
The code that I’m currently using in functions.php (this doesn’t work anymore in WP 3.4)function kb_ind_pw_form () { $output = ' <form action="'.get_option('siteurl').'/wp-pass.php" method="post"><fieldset>'."\n" .'<label for="post_password">Bitte Passwort eingeben:</label>'."\n" .'<input name="post_password" type="password" size="10" />'."\n" .'<input type="submit" name="Submit" value="'.__("Einloggen").'" />'."\n" .'</p>'."\n" .'</fieldset></form>'."\n"; return $output; } add_filter("the_password_form","kb_ind_pw_form");