• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-settings-callbacks.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
                // $icl_get_languages = 'a:3:{s:2:"en";a:8:{s:2:"id";s:1:"1";s:6:"active";s:1:"1";s:11:"native_name";s:7:"English";s:7:"missing";s:1:"0";s:15:"translated_name";s:7:"English";s:13:"language_code";s:2:"en";s:16:"country_flag_url";s:43:"http://yourdomain/wpmlpath/res/flags/en.png";s:3:"url";s:23:"http://yourdomain/about";}s:2:"fr";a:8:{s:2:"id";s:1:"4";s:6:"active";s:1:"0";s:11:"native_name";s:9:"Français";s:7:"missing";s:1:"0";s:15:"translated_name";s:6:"French";s:13:"language_code";s:2:"fr";s:16:"country_flag_url";s:43:"http://yourdomain/wpmlpath/res/flags/fr.png";s:3:"url";s:29:"http://yourdomain/fr/a-propos";}s:2:"it";a:8:{s:2:"id";s:2:"27";s:6:"active";s:1:"0";s:11:"native_name";s:8:"Italiano";s:7:"missing";s:1:"0";s:15:"translated_name";s:7:"Italian";s:13:"language_code";s:2:"it";s:16:"country_flag_url";s:43:"http://yourdomain/wpmlpath/res/flags/it.png";s:3:"url";s:26:"http://yourdomain/it/circa";}}';
     
    1
    <?php
    2
    namespace WPO\WC\PDF_Invoices;
    3
    ​
    4
    use WPO\WC\PDF_Invoices\Documents\Sequential_Number_Store;
    5
    ​
    6
    if ( ! defined( 'ABSPATH' ) ) {
    7
        exit; // Exit if accessed directly
    8
    }
    9
    ​
    10
    if ( !class_exists( '\\WPO\\WC\\PDF_Invoices\\Settings_Callbacks' ) ) :
    11
    ​
    12
    class Settings_Callbacks {
    13
        /**
    14
         * Section null callback.
    15
         *
    16
         * @return void.
    17
         */
    18
        public function section() {
    19
        }
    20
    ​
    21
        /**
    22
         * Debug section callback.
    23
         *
    24
         * @return void.
    25
         */
    26
        public function debug_section() {
    27
            _e( '<b>Warning!</b> The settings below are meant for debugging/development only. Do not use them on a live website!' , 'woocommerce-pdf-invoices-packing-slips' );
    28
        }
    29
        
    30
        /**
    31
         * Custom fields section callback.
    32
         *
    33
         * @return void.
    34
         */
    35
        public function custom_fields_section() {
    36
            _e( 'These are used for the (optional) footer columns in the <em>Modern (Premium)</em> template, but can also be used for other elements in your custom template' , 'woocommerce-pdf-invoices-packing-slips' );
    37
        }
    38
    ​
    39
        /**
    40
         * Checkbox callback.
    41
         *
    42
         * args:
    43
         *   option_name - name of the main option
    44
         *   id          - key of the setting
    45
         *   value       - value if not 1 (optional)
    46
         *   default     - default setting (optional)
    47
         *   description - description (optional)
    48
         *
    49
         * @return void.
    50
         */
    51
        public function checkbox( $args ) {
    52
            extract( $this->normalize_settings_args( $args ) );
    53
    ​
    54
            // output checkbox  
    55
            printf( '<input type="checkbox" id="%1$s" name="%2$s" value="%3$s" %4$s %5$s/>', $id, $setting_name, $value, checked( $value, $current, false ), !empty($disabled) ? 'disabled="disabled"' : '' );
    56
    ​
    57
            // print store empty input if true
    58
            if( $store_unchecked ) {
    59
                printf( '<input type="hidden" name="%s[wpo_wcpdf_setting_store_empty][]" value="%s"/>', $option_name, $id );
    60
            }
    61
        
    62
            // output description.
    63
            if ( isset( $description ) ) {
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.