Plugin Directory

Changeset 3013787

Timestamp:
12/24/2023 10:40:29 AM (8 months ago)
Author:
nielslange
Message:

Update to version 1.7 from GitHub

Location:
smntcs-pinterest-save-button
Files:
18 added
2 deleted
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • smntcs-pinterest-save-button/tags/1.7/README.md

    r2828067 r3013787  
    2727## Changelog
    2828
     29
     30
     31
     32
    2933### 1.6 (2022.12.03)
    3034
  • smntcs-pinterest-save-button/tags/1.7/README.txt

    r2828067 r3013787  
    33Contributors:       nielslange
    44Tags:               Pinterest, Pinterest Save Button, Pinterest Button
    5 Stable tag:         1.6
    6 Tested up to:       6.1
     5Stable tag:         1.
     6Tested up to:       6.
    77Requires PHP:       5.6
    88Requires at least:  3.4
     
    3131
    3232== Changelog ==
     33
     34
     35
     36
    3337
    3438= 1.6 (2022.12.03) =
  • smntcs-pinterest-save-button/tags/1.7/composer.json

    r2828067 r3013787  
    99    ],
    1010    "homepage": "https://github.com/nielslange/smntcs-pinterest-save-button",
     11
     12
     13
     14
    1115    "license": "GPL-3.0-or-later",
    1216    "authors": [
     
    2024    },
    2125    "require-dev": {
    22         "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
    23         "jakub-onderka/php-parallel-lint": "^1.0",
    24         "wptrt/wpthemereview": "^0.2.1"
     26        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
     27        "wptrt/wpthemereview": "^0.2.1",
    ��28        "humanmade/psalm-plugin-wordpress": "^2.2",
     29        "overtrue/phplint": "^3.4",
     30        "phpcompatibility/phpcompatibility-all": "^1.1",
     31        "squizlabs/php_codesniffer": "^3.8",
     32        "vimeo/psalm": "^4.30",
     33        "wp-coding-standards/wpcs": "^2.3",
     34        "php-parallel-lint/php-parallel-lint": "^1.1"
    2535    },
    2636    "scripts": {
    27         "checkcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-",
    28         "fixcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 5.6-",
    29         "lint": "@php ./vendor/bin/parallel-lint --exclude .git --exclude vendor ."
     37        "phpcbf": "phpcbf --standard=phpcs.xml .",
     38        "phpcs": "phpcs --standard=phpcs.xml .",
     39        "phplint": "phplint",
     40        "psalm": "psalm --no-cache"
    3041    },
    31     "support": {
    32         "issues": "https://github.com/nielslange/smntcs-pinterest-save-button/issues",
    33         "source": "https://github.com/nielslange/smntcs-pinterest-save-button"
     42    "config": {
     43        "allow-plugins": {
     44            "dealerdirect/phpcodesniffer-composer-installer": true
     45        }
    3446    }
    3547}
  • smntcs-pinterest-save-button/tags/1.7/package.json

    r2220934 r3013787  
    1919    },
    2020    "devDependencies": {
    21         "@wordpress/scripts": "^5.0.0"
     21        "@wordpress/prettier-config": "3.5.0",
     22        "@wordpress/scripts": "^5.0.0",
     23        "eslint": "8.56.0",
     24        "npm-run-all": "4.1.5"
    2225    },
    2326    "scripts": {
    24         "lint:pkg-json": "wp-scripts lint-pkg-json"
     27        "lint:pkg-json": "wp-scripts lint-pkg-json",
     28        "test": "npm-run-all --parallel phpcs phplint psalm",
     29        "phpcbf": "composer run phpcbf",
     30        "phpcs": "composer run phpcs",
     31        "phplint": "composer run phplint",
     32        "psalm": "composer run psalm"
    2533    }
    2634}
  • smntcs-pinterest-save-button/tags/1.7/smntcs-pinterest-save-button.php

    r2828067 r3013787  
    77 * Author URI:            https://nielslange.de
    88 * Text Domain:           smntcs-pinterest-save-button
    9  * Version:               1.6
     9 * Version:               1.
    1010 * Requires PHP:          5.6
    1111 * Requires at least:     3.4
     
    1616 */
    1717
     18
    1819defined( 'ABSPATH' ) || exit;
    1920
    20 /**
    21  * Add Pinterest Save Button to WordPress Customizer
    22  *
    23  * @param WP_Customize_Manager $wp_customize The instance of WP_Customize_Manager.
    24  * @return void
    25  * @since 1.0.0
    26  */
    27 function smntcs_pinterest_save_button_register_customize( $wp_customize ) {
    28     $wp_customize->add_section(
    29         'pinterest_save_button_section',
    30         array(
    31             'title'    => __( 'Pinterest Save Button', 'smntcs-pinterest-save-button' ),
    32             'priority' => 150,
    33         )
    34     );
    35 
    36     $wp_customize->add_setting(
    37         'show_button_on_hover',
    38         array(
    39             'default' => false,
    40         )
    41     );
    42 
    43     $wp_customize->add_control(
    44         'show_button_on_hover',
    45         array(
    46             'label'   => __( 'Show button on hover', 'smntcs-pinterest-save-button' ),
    47             'section' => 'pinterest_save_button_section',
    48             'type'    => 'checkbox',
    49         )
    50     );
    51 
    52     $wp_customize->add_setting(
    53         'show_round_button',
    54         array(
    55             'default' => false,
    56         )
    57     );
    58 
    59     $wp_customize->add_control(
    60         'show_round_button',
    61         array(
    62             'label'   => __( 'Show round button', 'smntcs-pinterest-save-button' ),
    63             'section' => 'pinterest_save_button_section',
    64             'type'    => 'checkbox',
    65         )
    66     );
    67 
    68     $wp_customize->add_setting(
    69         'show_large_button',
    70         array(
    71             'default' => false,
    72         )
    73     );
    74 
    75     $wp_customize->add_control(
    76         'show_large_button',
    77         array(
    78             'label'   => __( 'Show large button', 'smntcs-pinterest-save-button' ),
    79             'section' => 'pinterest_save_button_section',
    80             'type'    => 'checkbox',
    81         )
    82     );
    83 }
    84 add_action( 'customize_register', 'smntcs_pinterest_save_button_register_customize' );
    85 
    86 /**
    87  * Enqueue Pinterest script
    88  *
    89  * @since 1.0.0
    90  */
    91 function smntcs_pinterest_save_button_enqueue_pinterest_script() {
    92     if ( true === get_theme_mod( 'show_button_on_hover' ) ) {
    93 
    94         // Prepare standard button.
    95         $script = '<script async defer data-pin-hover="true" data-pin-save="true" ';
    96 
    97         // Display round button (if requested).
    98         if ( true === get_theme_mod( 'show_round_button' ) ) {
    99             $script .= 'data-pin-round="true" ';
    100         }
    101 
    102         // Display large button (if requested).
    103         if ( true === get_theme_mod( 'show_large_button' ) ) {
    104             $script .= 'data-pin-tall="true" ';
    105         }
    106 
    107         // Finalize standard button.
    108         $script .= 'src="//assets.pinterest.com/js/pinit.js"></script>';
    109 
    110         // Show Pinterest Save Button.
    111         print( $script ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    112     }
    113 }
    114 add_action( 'wp_footer', 'smntcs_pinterest_save_button_enqueue_pinterest_script' );
     21// Load plugin classes.
     22require_once plugin_dir_path( __FILE__ ) . 'includes/class-smntcs-pinterest-save-button.php';
  • smntcs-pinterest-save-button/trunk/README.md

    r2828067 r3013787  
    2727## Changelog
    2828
     29
     30
     31
     32
    2933### 1.6 (2022.12.03)
    3034
  • smntcs-pinterest-save-button/trunk/README.txt

    r2828067 r3013787  
    33Contributors:       nielslange
    44Tags:               Pinterest, Pinterest Save Button, Pinterest Button
    5 Stable tag:         1.6
    6 Tested up to:       6.1
     5Stable tag:         1.
     6Tested up to:       6.
    77Requires PHP:       5.6
    88Requires at least:  3.4
     
    3131
    3232== Changelog ==
     33
     34
     35
     36
    3337
    3438= 1.6 (2022.12.03) =
  • smntcs-pinterest-save-button/trunk/composer.json

    r2828067 r3013787  
    99    ],
    1010    "homepage": "https://github.com/nielslange/smntcs-pinterest-save-button",
     11
     12
     13
     14
    1115    "license": "GPL-3.0-or-later",
    1216    "authors": [
     
    2024    },
    2125    "require-dev": {
    22         "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
    23         "jakub-onderka/php-parallel-lint": "^1.0",
    24         "wptrt/wpthemereview": "^0.2.1"
     26        "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
     27        "wptrt/wpthemereview": "^0.2.1",
     28        "humanmade/psalm-plugin-wordpress": "^2.2",
     29        "overtrue/phplint": "^3.4",
     30        "phpcompatibility/phpcompatibility-all": "^1.1",
     31        "squizlabs/php_codesniffer": "^3.8",
     32        "vimeo/psalm": "^4.30",
     33        "wp-coding-standards/wpcs": "^2.3",
     34        "php-parallel-lint/php-parallel-lint": "^1.1"
    2535    },
    2636    "scripts": {
    27         "checkcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-",
    28         "fixcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 5.6-",
    29         "lint": "@php ./vendor/bin/parallel-lint --exclude .git --exclude vendor ."
     37        "phpcbf": "phpcbf --standard=phpcs.xml .",
     38        "phpcs": "phpcs --standard=phpcs.xml .",
     39        "phplint": "phplint",
     40        "psalm": "psalm --no-cache"
    3041    },
    31     "support": {
    32         "issues": "https://github.com/nielslange/smntcs-pinterest-save-button/issues",
    33         "source": "https://github.com/nielslange/smntcs-pinterest-save-button"
     42    "config": {
     43        "allow-plugins": {
     44            "dealerdirect/phpcodesniffer-composer-installer": true
     45        }
    3446    }
    3547}
  • smntcs-pinterest-save-button/trunk/package.json

    r2220934 r3013787  
    1919    },
    2020    "devDependencies": {
    21         "@wordpress/scripts": "^5.0.0"
     21        "@wordpress/prettier-config": "3.5.0",
     22        "@wordpress/scripts": "^5.0.0",
     23        "eslint": "8.56.0",
     24        "npm-run-all": "4.1.5"
    2225    },
    2326    "scripts": {
    24         "lint:pkg-json": "wp-scripts lint-pkg-json"
     27        "lint:pkg-json": "wp-scripts lint-pkg-json",
     28        "test": "npm-run-all --parallel phpcs phplint psalm",
     29        "phpcbf": "composer run phpcbf",
     30        "phpcs": "composer run phpcs",
     31        "phplint": "composer run phplint",
     32        "psalm": "composer run psalm"
    2533    }
    2634}
  • smntcs-pinterest-save-button/trunk/smntcs-pinterest-save-button.php

    r2828067 r3013787  
    77 * Author URI:            https://nielslange.de
    88 * Text Domain:           smntcs-pinterest-save-button
    9  * Version:               1.6
     9 * Version:               1.
    1010 * Requires PHP:          5.6
    1111 * Requires at least:     3.4
     
    1616 */
    1717
     18
    1819defined( 'ABSPATH' ) || exit;
    1920
    20 /**
    21  * Add Pinterest Save Button to WordPress Customizer
    22  *
    23  * @param WP_Customize_Manager $wp_customize The instance of WP_Customize_Manager.
    24  * @return void
    25  * @since 1.0.0
    26  */
    27 function smntcs_pinterest_save_button_register_customize( $wp_customize ) {
    28     $wp_customize->add_section(
    29         'pinterest_save_button_section',
    30         array(
    31             'title'    => __( 'Pinterest Save Button', 'smntcs-pinterest-save-button' ),
    32             'priority' => 150,
    33         )
    34     );
    35 
    36     $wp_customize->add_setting(
    37         'show_button_on_hover',
    38         array(
    39             'default' => false,
    40         )
    41     );
    42 
    43     $wp_customize->add_control(
    44         'show_button_on_hover',
    45         array(
    46             'label'   => __( 'Show button on hover', 'smntcs-pinterest-save-button' ),
    47             'section' => 'pinterest_save_button_section',
    48             'type'    => 'checkbox',
    49         )
    50     );
    51 
    52     $wp_customize->add_setting(
    53         'show_round_button',
    54         array(
    55             'default' => false,
    56         )
    57     );
    58 
    59     $wp_customize->add_control(
    60         'show_round_button',
    61         array(
    62             'label'   => __( 'Show round button', 'smntcs-pinterest-save-button' ),
    63             'section' => 'pinterest_save_button_section',
    64             'type'    => 'checkbox',
    65         )
    66     );
    67 
    68     $wp_customize->add_setting(
    69         'show_large_button',
    70         array(
    71             'default' => false,
    72         )
    73     );
    74 
    75     $wp_customize->add_control(
    76         'show_large_button',
    77         array(
    78             'label'   => __( 'Show large button', 'smntcs-pinterest-save-button' ),
    79             'section' => 'pinterest_save_button_section',
    80             'type'    => 'checkbox',
    81         )
    82     );
    83 }
    84 add_action( 'customize_register', 'smntcs_pinterest_save_button_register_customize' );
    85 
    86 /**
    87  * Enqueue Pinterest script
    88  *
    89  * @since 1.0.0
    90  */
    91 function smntcs_pinterest_save_button_enqueue_pinterest_script() {
    92     if ( true === get_theme_mod( 'show_button_on_hover' ) ) {
    93 
    94         // Prepare standard button.
    95         $script = '<script async defer data-pin-hover="true" data-pin-save="true" ';
    96 
    97         // Display round button (if requested).
    98         if ( true === get_theme_mod( 'show_round_button' ) ) {
    99             $script .= 'data-pin-round="true" ';
    100         }
    101 
    102         // Display large button (if requested).
    103         if ( true === get_theme_mod( 'show_large_button' ) ) {
    104             $script .= 'data-pin-tall="true" ';
    105         }
    106 
    107         // Finalize standard button.
    108         $script .= 'src="//assets.pinterest.com/js/pinit.js"></script>';
    109 
    110         // Show Pinterest Save Button.
    111         print( $script ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    112     }
    113 }
    114 add_action( 'wp_footer', 'smntcs_pinterest_save_button_enqueue_pinterest_script' );
     21// Load plugin classes.
     22require_once plugin_dir_path( __FILE__ ) . 'includes/class-smntcs-pinterest-save-button.php';
Note: See TracChangeset for help on using the changeset viewer.