Plugin Directory

Changeset 2606628


Ignore:
Timestamp:
09/29/2021 10:01:52 AM (4 years ago)
Author:
custom4web
Message:

Fix saving embed meta fields
Update embed html link and embed shortcode on edit page after saving

Location:
affiliate-links/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • affiliate-links/trunk/admin/class-affiliate-links-metabox.php

    r1477024 r2606628  
    283283        }
    284284
     285        foreach ( $this->get_embedded_metabox_fields() as $field ) {
     286
     287            // Update the meta field.
     288            update_post_meta( $post_id, $field['name'], $this->get_sanitized_value( $field ) );
     289
     290        }
     291
    285292        // reset stat count
    286293        if ( isset( $_POST['_affiliate_links_stat'] ) ) {
     
    354361        return array(
    355362            array(
     363                'name'        =>'_embedded_add_rel',
    356364                'thead'       => __( 'Add rel="nofollow"', 'affiliate-links' ),
    357365                'class'       => 'affiliate_links_control',
     
    362370            ),
    363371            array(
     372                'name'        =>'_embedded_add_target',
    364373                'thead'       => __( 'Add target="_blank', 'affiliate-links' ),
    365374                'class'       => 'affiliate_links_control',
     
    370379            ),
    371380            array(
     381                'name'        =>'_embedded_add_link_title',
    372382                'thead'       => __( 'Add link title', 'affiliate-links' ),
    373383                'class'       => 'affiliate_links_control',
     
    377387            ),
    378388            array(
     389                'name'        =>'_embedded_add_link_class',
    379390                'thead'       => __( 'Add link class', 'affiliate-links' ),
    380391                'class'       => 'affiliate_links_control',
     
    384395            ),
    385396            array(
     397                'name'        =>'_embedded_add_link_anchor',
    386398                'thead'       => __( 'Add link anchor', 'affiliate-links' ),
    387399                'class'       => 'affiliate_links_control',
     
    519531                <label>
    520532                    <input type="<?php echo esc_attr( trim( $field['type'], 'embed_' ) ) ?>"
     533                           name="<?php echo esc_attr( $field['name'] ) ?>"
    521534                           class="<?php echo esc_attr( $field['class'] ) ?>"
    522535                           data-attr="<?php echo esc_attr( $field['data-attr'] ) ?>"
    523536                           data-value="<?php echo esc_attr( $field['data-value'] ) ?>"
     537                           value="1"
     538                           <?php checked( $value, 1 ) ?>
    524539                    >
    525540                    <?php echo esc_html( $field['description'] ) ?>
     
    539554                <label>
    540555                    <input type="<?php echo esc_attr( trim( $field['type'], 'embed_' ) ) ?>"
     556                           name="<?php echo esc_attr( $field['name'] ) ?>"
    541557                           class="<?php echo esc_attr( $field['class'] ) ?>"
    542558                           data-attr="<?php echo esc_attr( $field['data-attr'] ) ?>"
     559                           value="<?php echo esc_attr__( $value ) ?>"
    543560                    >
    544561                    <p class="description"><?php echo esc_html( $field['description'] ) ?></p>
  • affiliate-links/trunk/admin/js/affiliate-links-admin.js

    r1448498 r2606628  
    392392
    393393            });
     394            jQuery('.affiliate_links_control').trigger('change');
     395            jQuery('.affiliate_links_control').trigger('input');
    394396        }
    395397    };
  • affiliate-links/trunk/affiliate-links.php

    r1919198 r2606628  
    44 * Plugin URI:  http://affiliatelinkswp.com/
    55 * Description: Create any redirect links to any website from your WordPress Admin. Perfect for the affiliate links masking.
    6  * Version:     2.3
     6 * Version:     2.4
    77 * Author:      Custom4Web
    88 * Author URI:  https://www.custom4web.com/
  • affiliate-links/trunk/readme.txt

    r2462907 r2606628  
    44Donate link: https://codecanyon.net/item/affiliate-links-wordpress-plugin-for-link-shortening-and-masking/16917669?ref=teamdev-ltd
    55Requires at least: 4.0
    6 Tested up to: 5.6.0
     6Tested up to: 5.8.1
    77Stable tag: trunk
    88License: GPL-2.0+
Note: See TracChangeset for help on using the changeset viewer.