Changeset 2592120
- Timestamp:
- 09/01/2021 01:39:28 PM (4 years ago)
- Location:
- button-visually-impaired/trunk
- Files:
-
- 3 edited
-
Button-visually-impaired.php (modified) (1 diff)
-
include/src/Core/Activate.php (modified) (1 diff)
-
include/src/Core/Upgrade.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
button-visually-impaired/trunk/Button-visually-impaired.php
r2592115 r2592120 71 71 */ 72 72 register_activation_hook( BVI_FILE, function () { 73 Bvi\Core\Activate::getInstance()-> registerActive();73 Bvi\Core\Activate::getInstance()->activation(); 74 74 } ); 75 75 } -
button-visually-impaired/trunk/include/src/Core/Activate.php
r2592115 r2592120 38 38 * Activate plugin. 39 39 */ 40 public function registerActive() { 41 $this->setOption( Option::getInstance()->options() )->registerOption(); 40 public function activation() { 41 $this->setOption( [ 42 'bviActive' => 'false', 43 'bviScriptLocation' => 'false', 44 'bviTheme' => 'white', 45 'bviFont' => 'arial', 46 'bviFontSize' => '16', 47 'bviLetterSpacing' => 'normal', 48 'bviLineHeight' => 'normal', 49 'bviImages' => 'true', 50 'bviReload' => 'false', 51 'bviSpeech' => 'true', 52 'bviBuiltElements' => 'true', 53 'bviPanelHide' => 'false', 54 'bviPanelFixed' => 'true', 55 'bviLang' => 'ru-RU', 56 'bviLinkText' => 'Версия сайта для слабовидящих', 57 'bviLinkColor' => '#ffffff', 58 'bviLinkBg' => '#e53935', 59 ] )->registerOption(); 42 60 } 43 61 } -
button-visually-impaired/trunk/include/src/Core/Upgrade.php
r2592116 r2592120 61 61 public function updatePlugin() { 62 62 if ( get_transient( 'bvi_updated' ) && current_user_can( 'administrator' ) ) { 63 $this->setOption( Option::getInstance()->options() )->registerOption();63 Activate::getInstance()->activation(); 64 64 } 65 65 }
Note: See TracChangeset
for help on using the changeset viewer.