Gravity form to submit to third party application
You can do it as a functions plugin: http://www.doitwithwp.com/create-functions-plugin/ http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users
You can do it as a functions plugin: http://www.doitwithwp.com/create-functions-plugin/ http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users
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
That’s a server permission problem. According to the WP docs: Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress (which may be different than the server account). For example, you may have a user account that lets you FTP files back and forth … Read more
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; });
Do I understand right that you mean featured thumbnail image for a post and not just any attached image? See get_the_post_thumbnail() function and your usage will be something like this: $output .= get_the_post_thumbnail( $authors_post->ID );
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
Perhaps instead of having a repeatable upload field, use conditional logic to tie a dropdown or radio which asks how many uploads the user needs (1, 2, 3, 4, 5…), and then a series of pre-built upload boxes which show up based on what number was selected. It’s not 100% dynamic, but hopefully you have … Read more
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
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
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 ); } }