Plugin Directory

Changeset 2285358


Ignore:
Timestamp:
04/17/2020 02:35:26 AM (6 years ago)
Author:
tazziedave
Message:

Updated tested to - WP - 5.4.0, WC - 4.0.1

Location:
wysiwyg-custom-products
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • wysiwyg-custom-products/tags/1.2/readme.txt

    r2233022 r2285358  
    44Tags: WYSIWYG, wysiwyg, custom, customised, customized, preview, live, update, view, woocommerce
    55Requires at least: 4.9.0
    6 Tested up to: 5.3.2
     6Tested up to: 5.4.0
    77Requires PHP: 5.6.0
    88Stable tag: 1.2
  • wysiwyg-custom-products/tags/1.2/wysiwyg-custom-products.php

    r2233022 r2285358  
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 3.9.0
     14 * WC tested up to: 4.0.1
    1515 * This program is free software: you can redistribute it and/or modify
    1616 * it under the terms of the GNU General Public License as published by
  • wysiwyg-custom-products/trunk/admin/class-layout.php

    r2233022 r2285358  
    8383        $htmlEcho->tag( 'p', $htmlBuild->get_html(), 'form-field' );
    8484
     85
    8586        $htmlEcho->popDoEscape();
    8687        $htmlEcho->c_div();
     
    9192     *
    9293     * @since    1.1.0 Refactored
     94     * @updated  1.2.7
    9395     */
    9496    public function line_format_meta_box() {
     
    154156        $htmlEcho->o_tag( 'table', 'hidden', 'line_formats' );
    155157
    156         $headerAttributes = [ 'width' => intdiv( 100, 6 ) . '%' ];
     158        $headerAttributes = [ 'width' => '17%' ];
    157159        $htmlEcho->o_tag( 'tr' );
    158160
  • wysiwyg-custom-products/trunk/assets/js/admin/line-manager.js

    r2011778 r2285358  
    55 *
    66 * @since   1.0.0
    7  * @updated 1.2.0
     7 * @updated 1.2.7
    88 */
    99
     
    2828
    2929
    30     var keepSame = {
     30    var keepSame           = {
    3131        0: false, // Y
    3232        1: true,  // X
     
    7474     *
    7575     * @since   1.0.0
    76      * @updated 1.2.0
     76     * @updated 1.2.7
    7777     */
    7878    $wcpA.LineManagerLine.prototype.setLine = function (line) {
     
    8989        this.drawVisuals();
    9090    };
     91    /**
     92     * Sets a value associated with an action
     93     *
     94     * @param action
     95     * @param value
     96     *
     97     * @since   1.0.0
     98     * @updated 1.2.7
     99     */
    91100
    92101    $wcpA.LineManagerLine.prototype.setValue = function (action, value) {
     
    461470     * @param action One of the actions enumerated in line-manager.js
    462471     *
    463      * @returns int
    464      *
    465      * @since   1.0.0
    466      * @updated 1.0.0
     472     * @returns int | string
     473     *
     474     * @since   1.0.0
     475     * @updated 1.2.7
    467476     */
    468477    $wcpA.LineManagerLine.prototype.getVal = function (action) {
  • wysiwyg-custom-products/trunk/assets/js/admin/settings-layout.js

    r2233022 r2285358  
    33 *
    44 * @since   1.2.0
    5  * @updated 1.2.6
     5 * @updated 1.2.7
    66 */
    77
     
    4343     *
    4444     * @since   1.0.0
    45      * @updated 1.2.6
     45     * @updated 1.2.7
    4646     */
    4747    function reloadLayout() {
     
    112112
    113113    /**
    114      * Ajax call to fetch the selected layout. initialise is set during initialisation
     114     * Ajax call to fetch the selected layout.
    115115     *
    116116     *
     
    797797     *
    798798     * @since   1.0.0
    799      * @updated 1.2.0
     799     * @updated 1.2.7
    800800     */
    801801    $wcpA.initialise = function () {
  • wysiwyg-custom-products/trunk/assets/stylesheets/settings.css

    r2011778 r2285358  
    8282}
    8383
     84.woocommerce_options_panel textarea {
     85    height: auto !important;
     86}
     87
    8488/* Make sure entry table is suitably sized */
    8589td input[type=number], td input[type=text], td select {
  • wysiwyg-custom-products/trunk/common/class-layout.php

    r2233022 r2285358  
    3939 *
    4040 * @since      1.0.0
    41  * @updated    1.2.5
     41 * @updated    1.2.7
    4242 */
    4343class Layout {
     
    129129                'SinglelineReformat' => '',
    130130                'IeMessage'          => '',
     131                'EffectUUID'         => '',
    131132                'InkColor'           => 0x000000,  // Black
    132133                'ActiveMouseColor'   => 0x00FFFF,  // Aqua
     
    135136                    'Lines1' => [
    136137                        [
    137                             'Y'            => 300, // self::DEFAULT_IMAGE_SIZE / 2, PHP < 5.6 fiddle
    138                             'X'            => 300, // self::DEFAULT_IMAGE_SIZE / 2,
    139                             'Width'        => 300, // self::DEFAULT_IMAGE_SIZE / 2,
     138                            'Y'            => self::DEFAULT_IMAGE_SIZE / 2,
     139                            'X'            => self::DEFAULT_IMAGE_SIZE / 2,
     140                            'Width'        => self::DEFAULT_IMAGE_SIZE / 2,
    140141                            'Align'        => 'C',
    141142                            'MinFont'      => 45,
     
    144145                            'Css'          => '',
    145146                            'TextPathUUID' => '',
     147                            'EffectUUID'   => '',
    146148                        ],
    147149                    ],
     
    180182     */
    181183    private $ieMsg;
     184    /**
     185     * @var string Layout wide SVG Effect
     186     */
     187    private $effectUUID;
    182188    /**
    183189     * @var int $setupWidth of layout, Used for scaling
     
    340346     *
    341347     * @since   1.0.1
    342      * @updated 1.2.5
     348     * @updated 1.2.7
    343349     */
    344350    public static function is_layout_valid( array &$layout, $sanitize = false ) {
     
    355361        if ( ( ! isset( $layout['IeMessage'] ) || ( $layout['IeMessage'] === '' ) ) ) { // 1.2.5 Format update
    356362            $layout['IeMessage'] = self::get_customer_message( 'IeMessage' );
     363        }
     364
     365        if ( ! isset( $layout['EffectUUID'] ) ) { // 1.2.7 Format update
     366            $layout['EffectUUID'] = '';
    357367        }
    358368
     
    373383        self::is_string( $layout['SinglelineReformat'] );
    374384        self::is_string( $layout['IeMessage'] );
     385        self::is_string( $layout['EffectUUID'] );
    375386        self::int_check( $layout['InkColor'], 0, 0xFFFFFF );
    376387        self::int_check( $layout['ActiveMouseColor'], 0, 0xFFFFFF );
     
    563574    }
    564575
     576    /**
     577     * Layout wide SVG Effect getter
     578     *
     579     * @return string
     580     *
     581     * @since   1.2.7
     582     * @updated 1.2.7
     583     */
     584    public function getEffectUUID() {
     585        return $this->effectUUID;
     586    }
     587
     588    /**
     589     * Layout wide SVG Effect setter
     590     *
     591     * @param string $effectUUID
     592     *
     593     * @since   1.2.7
     594     * @updated 1.2.7
     595     */
     596    public function setEffectUUID( $effectUUID ) {
     597        $this->effectUUID = $effectUUID;
     598    }
    565599    /**
    566600     * Gets the a hex string representation of the requested color
     
    606640     *
    607641     * @since   1.0.0
    608      * @updated 1.2.5
     642     * @updated 1.2.7
    609643     */
    610644    public function load_layout( $layout, $layoutName ) {
     
    630664        $this->setSingleLineReformatMsg( $layout['SinglelineReformat'] );
    631665        $this->setIeMessage( $layout['IeMessage'] );
     666        $this->setEffectUUID( $layout['EffectUUID'] );
    632667
    633668        $this->formats = $layout['Formats'];
     
    660695        $result['SinglelineReformat'] = $this->singleLineReformatMsg;
    661696        $result['IeMessage']          = $this->ieMsg;
     697        $result['EffectUUID']         = $this->effectUUID;
    662698
    663699        $result = apply_filters( 'layout_as_array', $result );
     
    736772     *
    737773     * @since   1.0.0
     774     * @updated 1.2.7
    738775     */
    739776    public function compact_format( $numberOfLines ) {
     
    817854     *
    818855     * @since   1.0.1
    819      * @updated 1.2.0
     856     * @updated 1.2.7
    820857     */
    821858    private static function is_format_valid( array &$formatArray, $lines, array $formatKeys, $maxFontSize, $sanitize ) {
     
    844881            }
    845882
     883            if ( ! isset( $line['EffectUUID'] ) ) { // 1.2.7 Format update
     884                $line['EffectUUID'] = '';
     885            }
     886
    846887            if ( array_diff( $formatKeys, array_keys( $line ) ) !== [] ) {
    847888                throw new LayoutException( self::$exceptionMsg . __LINE__ );
     
    861902            self::is_string( $line['Css'] );
    862903            self::is_string( $line['TextPathUUID'] );
     904            self::is_string( $line['EffectUUID'] );
    863905
    864906            if ( $sanitize ) {
  • wysiwyg-custom-products/trunk/readme.txt

    r2233022 r2285358  
    44Tags: WYSIWYG, wysiwyg, custom, customised, customized, preview, live, update, view, woocommerce
    55Requires at least: 4.9.0
    6 Tested up to: 5.3.2
     6Tested up to: 5.4.0
    77Requires PHP: 5.6.0
    88Stable tag: 1.2
  • wysiwyg-custom-products/trunk/wysiwyg-custom-products.php

    r2233022 r2285358  
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 3.9.0
     14 * WC tested up to: 4.0.1
    1515 * This program is free software: you can redistribute it and/or modify
    1616 * it under the terms of the GNU General Public License as published by
Note: See TracChangeset for help on using the changeset viewer.