Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor changes #86

Merged
merged 4 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function wpcf7cf_editor_panel_conditional($form) {

$wpcf7cf_entries = CF7CF::getConditions($form_id);

if (!is_array($wpcf7cf_entries)) $wpcf7cf_entries = array();

$wpcf7cf_entries = array_values($wpcf7cf_entries);

Expand Down Expand Up @@ -177,7 +176,7 @@ function wpcf7cf_after_save($contact_form) {
function wpcf7cf_save_contact_form( $contact_form )
{

if ( ! isset( $_POST ) || empty( $_POST ) || ! isset( $_POST['wpcf7cf-settings-text'] ) ) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to keep this for usage in end to end tests and when calling methods directly from command line.

if ( ! isset( $_POST['wpcf7cf-settings-text'] ) ) {
return;
}
$post_id = $contact_form->id();
Expand Down
6 changes: 2 additions & 4 deletions wpcf7cf-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function wpcf7cf_reset_options() {

add_action( 'admin_enqueue_scripts', 'wpcf7cf_load_page_options_wp_admin_style' );
function wpcf7cf_load_page_options_wp_admin_style() {
wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), false, WPCF7CF_VERSION );
wp_register_style( 'wpcf7cf_admin_css', plugins_url('admin-style.css',__FILE__), array(), WPCF7CF_VERSION );
wp_enqueue_style( 'wpcf7cf_admin_css' );
}

Expand Down Expand Up @@ -205,8 +205,6 @@ function wpcf7cf_input_field($slug, $args) {
$args = wp_parse_args( $args, $defaults );
extract($args);

$label; $description; $default; $label_editable;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping this as a helper for development.


if (!key_exists($slug, $settings)) {
$settings[$slug] = $default;
$settings[$slug.'_label'] = $label;
Expand Down Expand Up @@ -294,4 +292,4 @@ function wpcf7cf_dismiss_notice() {
$settings = wpcf7cf_get_settings();
$settings['notice_dismissed'.$notice_suffix] = true;
wpcf7cf_set_options($settings);
}
}