• 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/duplicator/classes/class.settings.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
            $default['installer_name_mode']      = isset(self::$Data['installer_name_mode']) ? self::$Data['installer_name_mode'] : self::INSTALLER_NAME_MODE_SIMPLE;
     
    1
    <?php
    2
    defined('ABSPATH') || defined('DUPXABSPATH') || exit;
    3
    // Exit if accessed directly
    4
    if (!defined('DUPLICATOR_VERSION'))
    5
        exit;
    6
    ​
    7
    abstract class DUP_Archive_Build_Mode
    8
    {
    9
    ​
    10
        const Unconfigured = -1;
    11
        const Auto         = 0; // should no longer be used
    12
        //  const Shell_Exec   = 1;
    13
        const ZipArchive   = 2;
    14
        const DupArchive   = 3;
    15
    ​
    16
    }
    17
    ​
    18
    class DUP_Settings
    19
    {
    20
    ​
    21
        const OPT_SETTINGS                  = 'duplicator_settings';
    22
        const INSTALLER_NAME_MODE_WITH_HASH = 'withhash';
    23
        const INSTALLER_NAME_MODE_SIMPLE    = 'simple';
    24
        const STORAGE_POSITION_LECAGY       = 'legacy';
    25
        const STORAGE_POSITION_WP_CONTENT   = 'wpcont';
    26
        const SSDIR_NAME_LEGACY             = 'wp-snapshots';
    27
        const SSDIR_NAME_NEW                = 'backups-dup-lite';
    28
    ​
    29
        protected static $Data;
    30
        protected static $ssDirPath = null;
    31
        protected static $ssDirUrl  = null;
    32
    ​
    33
        /**
    34
         *  Class used to manage all the settings for the plugin
    35
         */
    36
        public static function init()
    37
        {
    38
            self::$Data = get_option(self::OPT_SETTINGS);
    39
            //when the plugin updated, this will be true
    40
            if (empty(self::$Data) || empty(self::$Data['version']) || version_compare(DUPLICATOR_VERSION, self::$Data['version'], '>')) {
    41
                self::SetDefaults();
    42
            }
    43
        }
    44
    ​
    45
        /**
    46
         *  Find the setting value
    47
         *  @param string $key  The name of the key to find
    48
         *  @return The value stored in the key returns null if key does not exist
    49
         */
    50
        public static function Get($key = '')
    51
        {
    52
            $result = null;
    53
            if (isset(self::$Data[$key])) {
    54
                $result = self::$Data[$key];
    55
            } else {
    56
                $defaults = self::GetAllDefaults();
    57
                if (isset($defaults[$key])) {
    58
                    $result = $defaults[$key];
    59
                }
    60
            }
    61
            return $result;
    62
        }
    63
    ​
    • 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.