Best way to create multi-step form with data saved to user account for later updating?

If you are working on a custom theme, I believe it is easier to be done with a page template and WordPress’s wp_ajax function. The form can be included in the page using <?php get_template_part(‘form’,’0f-50-question’) ?>. Here is the pseudo code for the form <form id=”quite-a-long-form” action=”<?php echo admin_url(‘admin-ajax.php’); ?>” method=”post” class=”form” > $step = … Read more

Gravity Forms Custom Templates [closed]

You can change a bunch in one hit with the gform_address_types filter, like this: /** * customise the Address field labels * @param array $addressTypes * @return array */ add_filter(‘gform_address_types’, function ($addressTypes) { $addressTypes[‘international’][‘zip_label’] = ‘Postcode’; $addressTypes[‘international’][‘state_label’] = ‘State’; return $addressTypes; });

Removing an admin page added by a 3rd party plugin. Gravity forms in this example

Ok, Eugene’s Answer works in the case of a plugin that doesn’t deals with custom capabilities. http://codex.wordpress.org/Roles_and_Capabilities The WordPress Plugin API allows Roles and Capabilities to be added, removed and changed. Since Plugins might change Roles and Capabilities, just the default ones are addressed in this article. So, if his code works without checking for … Read more

How to get the Gravityform entry ID from current user’s form submission? [closed]

You can use the gform_after_submission hook[1] to add the Entry ID (and probably the Form ID to minimize confusion if you have multiple forms) to the user’s meta information using add_user_meta(). <?php add_action( ‘gform_after_submission’, ‘wpse96468_map_user_to_entry’, 10, 2 ); // to tie it to a specific form, use the format below, // replacing ‘{$form_id}’ with the … Read more

Delete the original big size image after upload and leave only 3 images crunched by media gallery

How about this: add_filter( ‘wp_generate_attachment_metadata’, ‘delete_fullsize_image’ ); function delete_fullsize_image( $metadata ) { $upload_dir = wp_upload_dir(); $full_image_path = trailingslashit( $upload_dir[‘basedir’] ) . $metadata[‘file’]; $deleted = unlink( $full_image_path ); return $metadata; } Not 100% sure everything will work ok without the main image, but it does the trick. You wont be able to regenerate the thumbnails / … Read more

Set cookie using GET variable

Just check if the variable is set, using the code from your link: add_action( ‘init’, ‘set_agent_cookie’ ); function set_agent_cookie() { if (isset($_GET[‘code’])) { $name=”agent”; $id = $_GET[‘code’]; setcookie( $name, $id, time() + 3600, “https://wordpress.stackexchange.com/”, COOKIE_DOMAIN ); } }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)