Version Description
- Fix API setup so it doesn't conflict with WP API plugin
- Fix bug where export menu item was shown to non authorized users
Download this release
Release Info
| Developer | tlovett1 |
| Plugin | |
| Version | 6.6.4 |
| Comparing to | |
| See all releases | |
Code changes from version 6.6.3 to 6.6.4
- classes/class-ccf-custom-contact-forms.php +14 -5
- classes/class-ccf-export.php +5 -2
- custom-contact-forms.php +1 -1
- readme.txt +5 -1
classes/class-ccf-custom-contact-forms.php
CHANGED
|
@@ -15,7 +15,7 @@ class CCF_Custom_Contact_Forms {
|
|
| 15 |
* @since 6.0
|
| 16 |
*/
|
| 17 |
public function setup() {
|
| 18 |
-
add_action( 'plugins_loaded', array( $this, 'manually_load_api' ),
|
| 19 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
| 20 |
add_filter( 'plugin_action_links', array( $this, 'filter_plugin_action_links' ), 10, 2 );
|
| 21 |
add_action( 'admin_notices', array( $this, 'permalink_warning' ) );
|
|
@@ -85,13 +85,22 @@ class CCF_Custom_Contact_Forms {
|
|
| 85 |
* @since 6.0
|
| 86 |
*/
|
| 87 |
public function manually_load_api() {
|
| 88 |
-
|
| 89 |
-
add_filter( 'json_url', 'set_url_scheme' );
|
| 90 |
|
| 91 |
-
|
|
|
|
| 92 |
|
| 93 |
-
|
|
|
|
|
|
|
|
|
|
| 94 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
}
|
| 96 |
|
| 97 |
/**
|
| 15 |
* @since 6.0
|
| 16 |
*/
|
| 17 |
public function setup() {
|
| 18 |
+
add_action( 'plugins_loaded', array( $this, 'manually_load_api' ), 1000 );
|
| 19 |
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
|
| 20 |
add_filter( 'plugin_action_links', array( $this, 'filter_plugin_action_links' ), 10, 2 );
|
| 21 |
add_action( 'admin_notices', array( $this, 'permalink_warning' ) );
|
| 85 |
* @since 6.0
|
| 86 |
*/
|
| 87 |
public function manually_load_api() {
|
| 88 |
+
global $pagenow;
|
|
|
|
| 89 |
|
| 90 |
+
add_action( 'wp_json_server_before_serve', array( $this, 'api_init' ) );
|
| 91 |
+
add_filter( 'json_url', 'set_url_scheme' );
|
| 92 |
|
| 93 |
+
if ( ! empty( $pagenow ) ) {
|
| 94 |
+
if ( 'plugins.php' === $pagenow && ( ! empty( $_GET['action'] ) && 'activate' === $_GET['action'] || ! empty( $_POST['checked'] ) ) ) {
|
| 95 |
+
return;
|
| 96 |
+
}
|
| 97 |
}
|
| 98 |
+
|
| 99 |
+
if ( function_exists( 'json_api_init' ) ) {
|
| 100 |
+
return;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
require( dirname( __FILE__ ) . '/../vendor/wp-api/wp-api/plugin.php' );
|
| 104 |
}
|
| 105 |
|
| 106 |
/**
|
classes/class-ccf-export.php
CHANGED
|
@@ -84,8 +84,11 @@ class CCF_Export {
|
|
| 84 |
* @since 6.5
|
| 85 |
*/
|
| 86 |
public function action_admin_menu() {
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
| 89 |
}
|
| 90 |
|
| 91 |
/**
|
| 84 |
* @since 6.5
|
| 85 |
*/
|
| 86 |
public function action_admin_menu() {
|
| 87 |
+
if ( current_user_can( 'edit_posts' ) ) {
|
| 88 |
+
global $submenu;
|
| 89 |
+
|
| 90 |
+
$submenu['edit.php?post_type=ccf_form'][] = array( esc_html__( 'Import', 'custom-contact-forms' ), 'manage_options', esc_url( admin_url( 'import.php' ) ) );
|
| 91 |
+
}
|
| 92 |
}
|
| 93 |
|
| 94 |
/**
|
custom-contact-forms.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Plugin URI: http://www.taylorlovett.com
|
| 5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
| 6 |
* Author: Taylor Lovett
|
| 7 |
-
* Version: 6.6.
|
| 8 |
* Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
| 10 |
|
| 4 |
* Plugin URI: http://www.taylorlovett.com
|
| 5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
| 6 |
* Author: Taylor Lovett
|
| 7 |
+
* Version: 6.6.4
|
| 8 |
* Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
| 10 |
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
| 5 |
Requires at least: 3.9
|
| 6 |
Tested up to: 4.2
|
| 7 |
-
Stable tag: 6.6.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -35,6 +35,10 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
| 35 |
|
| 36 |
== Changelog ==
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
= 6.6.3 =
|
| 39 |
* Fix form submission download bug
|
| 40 |
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
| 5 |
Requires at least: 3.9
|
| 6 |
Tested up to: 4.2
|
| 7 |
+
Stable tag: 6.6.4
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 35 |
|
| 36 |
== Changelog ==
|
| 37 |
|
| 38 |
+
= 6.6.4 =
|
| 39 |
+
* Fix API setup so it doesn't conflict with WP API plugin
|
| 40 |
+
* Fix bug where export menu item was shown to non authorized users
|
| 41 |
+
|
| 42 |
= 6.6.3 =
|
| 43 |
* Fix form submission download bug
|
| 44 |
|
