WordPress.org

Plugin Directory

Changeset 1777301


Ignore:
Timestamp:
11/28/17 21:49:46 (8 weeks ago)
Author:
mariovalney
Message:

Version 1.1.0

Location:
cf7-to-zapier
Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • cf7-to-zapier/trunk/cf7-to-zapier.php

    r1733390 r1777301  
    88 * Plugin URI:        https://github.com/Vizir/cf7-to-zapier 
    99 * Description:       Use Contact Form 7 as a trigger to Zapier! 
    10  * Version:           1.0.0 
     10 * Version:           1.1.0 
    1111 * Author:            Vizir Software Studio 
    1212 * Author URI:        http://vizir.com.br/en 
  • cf7-to-zapier/trunk/modules/zapier/class-module-zapier.php

    r1733390 r1777301  
    5757         */ 
    5858        public function pull_the_trigger( array $data, $hook_url ) { 
     59            $content_type = 'application/json'; 
     60            if ( ! empty( get_option( 'blog_charset' ) ) ) { 
     61                $content_type .= '; charset=' . get_option( 'blog_charset' ); 
     62            } 
     63 
    5964            $args = array( 
    6065                'method'    => 'POST', 
    6166                'body'      => json_encode( $data ), 
     67                'headers'   => array( 
     68                    'Content-Type'  => $content_type, 
     69                ), 
    6270            ); 
    6371 
    64             wp_remote_post( $hook_url, $args ); 
     72            /** 
     73             * Filter: ctz_post_request_args 
     74             * 
     75             * The 'ctz_post_request_args' filter POST args so developers 
     76             * can modify the request args if any service demands a particular header or body. 
     77             * 
     78             * @since    1.1.0 
     79             */ 
     80            wp_remote_post( $hook_url, apply_filters( 'ctz_post_request_args', $args ) ); 
    6581        } 
    6682 
  • cf7-to-zapier/trunk/readme.txt

    r1733390 r1777301  
    11=== CF7 to Zapier === 
    2 Contributors: vizir, mariovalney 
     2Contributors: mariovalney, vizir 
    33Donate link: https://github.com/Vizir/cf7-to-zapier 
    44Tags: cf7, contact form, zapier, integration, contact form 7, webhook, vizir, mariovalney 
    55Requires at least: 4.7 
    6 Tested up to: 4.8.2 
    7 Stable tag: 1.0.0 
     6Tested up to: 4.9 
     7Stable tag: 1.1.0 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    9090== Changelog == 
    9191 
     92= 1.1 = 
     93 
     94* Added the 'application/json' header by default to POST request 
     95* Added 'ctz_post_request_args' filter to POST request args 
     96* Tested against WP 4.9 
     97 
    9298= 1.0 = 
    9399 
     
    99105== Upgrade Notice == 
    100106 
    101 = 1.0 = 
     107= 1.1 = 
    102108 
    103 * It's alive! :D 
     109Added the 'application/json' header by default to POST request and 'ctz_post_request_args' filter to POST args. 
     110This way developers can modify the request args if any service demands a particular header or body. 
Note: See TracChangeset for help on using the changeset viewer.