Skip to content

Commit

Permalink
1.2.4 release changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mutendebrian committed Mar 3, 2020
1 parent e222588 commit 44bbe7d
Show file tree
Hide file tree
Showing 7 changed files with 2,219 additions and 2,190 deletions.
4 changes: 3 additions & 1 deletion includes/admin/class-noptin-admin-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ public function format_imported_subscriber_fields( $subscriber ) {
'date' => 'date_created',
'confirmkey' => 'confirm_key',
'meta' => 'meta',
'fields' => 'meta',
'metafields' => 'meta',
);

Expand Down Expand Up @@ -213,9 +214,10 @@ public function format_imported_subscriber_fields( $subscriber ) {
// Fill in meta fields for missing core fields.
foreach ( $subscriber['meta'] as $key => $value ) {
$sanitized = strtolower( str_ireplace( array( '_', '-', ' ' ), '', $key ) );
$value = maybe_unserialize( $value );

if ( isset( $mappings[ $sanitized ] ) && empty( $subscriber[ $mappings[ $sanitized ] ] ) ) {
$subscriber[ $mappings[ $sanitized ] ] = $value;
$subscriber[ $mappings[ $sanitized ] ] = is_array( $value ) ? $value[0] : $value;
unset( $subscriber['meta'][ $key ] );
}
}
Expand Down
4 changes: 2 additions & 2 deletions includes/admin/class-noptin-form-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ private function get_targeting_settings() {
'label' => __( 'Never show on:', 'newsletter-optin-box' ),
'options' => $this->post->neverShowOn,
'restrict' => '!_onlyShowOn',
'placeholder' => '1,10,25',
'placeholder' => '1,10,25,' . noptin_clean_url( home_url( 'contact' ) ),
'tooltip' => __( 'Use a comma to separate post ids or urls where this form should not be displayed. All post type ids (page, products, etc) are supported, not just blog post ids.', 'newsletter-optin-box' ),
);

$return['onlyShowOn'] = array(
'el' => 'input',
'label' => 'Only show on:',
'placeholder' => '3,14,5',
'placeholder' => '3,14,5,' . noptin_clean_url( home_url( 'about' ) ),
'tooltip' => __( 'If you specify any posts here, all other targeting rule will be ignored, and this form will only be displayed on posts or urls that you specify here.', 'newsletter-optin-box' ),
'options' => $this->post->onlyShowOn,
);
Expand Down
Binary file modified languages/newsletter-optin-box-it_IT.mo
Binary file not shown.
Loading

0 comments on commit 44bbe7d

Please sign in to comment.