🔥 HOT: Changeset/ - Collection

Changeset 2281335


Ignore:
Timestamp:
04/11/2020 08:46:02 AM (6 years ago)
Author:
JIHAD SINNAOUR
Message:

Update

Location:
fantazy-sidebar
Files:
2 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • fantazy-sidebar/trunk/core/Framework.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/Plugin.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
     
    5861        $this->config = new Config();
    5962        // Define plugin Dir and plugin Name : plugin/plugin
    60         $const = "{$this->config->rootName}/{$this->config->rootName}";
     63        $const = "{$this->config->root}/{$this->config->root}";
    6164        // Define plugin main file
    6265        $root = $this->getRoot("/{$const}.php");
     
    148151    public function addLink($links)
    149152    {
    150         array_push($links,'<a href="options-general.php?page='. $this->config->rootName .'">' . __( 'Settings' ) . '</a>');
     153        array_push($links,'<a href="options-general.php?page='. $this->config->root .'">' . __( 'Settings' ) . '</a>');
    151154        return $links;
    152155    }
  • fantazy-sidebar/trunk/core/system/includes/Config.php

    r2281327 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
     
    1922     */
    2023    public $root = '/fantazy-sidebar';
    21     public $rootName;
    2224    public $baseUri;
    2325    public $ajaxUrl;
     
    8183
    8284    /**
     85     * Update option
     86     *
     87     * @param array $var
     88     * @return void
     89     */
     90    public function update($var = [])
     91    {
     92        $json = File::read("{$this->root}/core/storage/config/global.json");
     93        $update = Json::decode($json);
     94        foreach ($var as $option => $value)
     95        {
     96            if ( isset($update['option'][$option]) ) {
     97                $update['option'][$option] = $value;
     98            }
     99        }
     100        $update = Json::format($update);
     101        File::write("{$this->root}/core/storage/config/global.json", $update);
     102    }
     103
     104    /**
    83105     * init configuration
    84106     *
     
    92114        $this->baseUri = WP_PLUGIN_URL . $this->root;
    93115        $this->root    = WP_PLUGIN_DIR . $this->root;
    94         $this->file    = new Json("{$this->root}/core/storage/config/global.json");
     116        $this->file    = File::read("{$this->root}/core/storage/config/global.json");
    95117
    96         static::$global   = $this->file->decode(true);
    97         $this->rootName   = static::$global->rootName;
     118        static::$global   = Json::decode($this->file, true);
    98119        $this->pluginName = static::$global->name;
    99120        $this->namespace  = static::$global->namespace;
     
    102123
    103124        // activate debug
    104         if ( static::$global->option->debug )
    105         {
     125        if ( static::$global->option->debug ) {
    106126            ini_set('display_errors', 1);
    107127            ini_set('display_startup_errors', 1);
  • fantazy-sidebar/trunk/core/system/includes/Get.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/includes/Post.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/includes/Response.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/includes/View.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Admin.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Ajax.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Front.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Menu.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Page.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/Settings.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/AdminInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/AjaxInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/ConfigInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/FrontInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/PluginInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/core/system/libraries/interfaces/SettingsInterface.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
  • fantazy-sidebar/trunk/uninstall.php

    r2169878 r2281335  
    33 * @author    : JIHAD SINNAOUR
    44 * @package   : VanillePlugin
    5  * @version   : 1.0.0
    6  * @copyright : (c) 2018 JIHAD SINNAOUR <[email protected]>
     5 * @version   : 1.1.0
     6 * @copyright : (c) 2018 - 2020 JIHAD SINNAOUR <[email protected]>
    77 * @link      : https://jakiboy.github.io/VanillePlugin/
    88 * @license   : MIT
     9 *
     10 * This file if a part of VanillePlugin Framework
     11 * Allowed to edit for plugin customization
    912 */
    1013
Note: See TracChangeset for help on using the changeset viewer.