Changeset 2278790
- Timestamp:
- 04/07/2020 09:19:35 PM (6 years ago)
- Location:
- widgets-bundle/trunk
- Files:
-
- 1 added
- 14 edited
-
assets/admin/js/admin.js (modified) (4 diffs)
-
inc/admin/views/header.php (modified) (1 diff)
-
inc/admin/views/settings-about.php (modified) (2 diffs)
-
inc/admin/views/settings-options.php (modified) (9 diffs)
-
inc/admin/views/settings-support.php (modified) (1 diff)
-
inc/admin/views/settings.php (modified) (2 diffs)
-
inc/class-admin.php (modified) (3 diffs)
-
inc/class-config.php (modified) (2 diffs)
-
inc/widgets/subscribe.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (added)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (3 diffs)
-
vendor/composer/autoload_static.php (modified) (2 diffs)
-
widgets-bundle.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
widgets-bundle/trunk/assets/admin/js/admin.js
r2269726 r2278790 106 106 107 107 // ID 108 var id = $(this).attr('data-tab').replace('#', '');108 var id = $(this).attr('data-tab').replace('#', ''); 109 109 110 110 // Form data … … 123 123 beforeSend: function() { 124 124 $('#' + id).block({ 125 message: '<div class="as-strong" style="background: #ecf0f1; padding: 10px 6px; color: #000;"> Processing..</div>',125 message: '<div class="as-strong" style="background: #ecf0f1; padding: 10px 6px; color: #000;">' + widgetsbundle_admin_l10n.processing + '</div>', 126 126 css: { 127 127 border: 'none', … … 139 139 $('#' + id).unblock(); 140 140 141 // Success 142 if (data.code == 'success') { 143 toastr.success('<strong>Hey!</strong> ' + data.response); 144 145 // Remove input class 146 $('input, textarea, select').removeClass('changed-input'); 147 } else { 148 // Error 149 toastr.error('<strong>Oops!</strong> ' + data.response); 150 } 141 // Notification 142 toastr[data.code](data.response); 143 144 // Remove input class 145 $('input, textarea, select').removeClass('changed-input'); 151 146 }); 152 147 }); … … 201 196 202 197 if ($('.changed-input').length) { 203 toastr.error( '<strong>Hey!</strong> You haven\'t saved your changes.');198 toastr.error(widgetsbundle_admin_l10n.save_changes); 204 199 } else { 205 200 // Change menu selection -
widgets-bundle/trunk/inc/admin/views/header.php
r2269726 r2278790 20 20 21 21 <div class="as-header-right"> 22 <input type="submit" id="<?php echo Config::PREFIX . 'submit'; ?>" name="<?php echo Config::PREFIX . 'submit'; ?>" class="as-btn" value="<?php esc_html_e( 'Save Changes', 'widgets-bundle' ); ?>" data-tab=" options">22 <input type="submit" id="<?php echo Config::PREFIX . 'submit'; ?>" name="<?php echo Config::PREFIX . 'submit'; ?>" class="as-btn" value="<?php esc_html_e( 'Save Changes', 'widgets-bundle' ); ?>" data-tab="#options"> 23 23 </div><!-- .as-header-right --> 24 24 </div><!-- .as-header --> -
widgets-bundle/trunk/inc/admin/views/settings-about.php
r2269726 r2278790 6 6 * @since 1.0.0 7 7 */ 8 9 use AkshitSethi\Plugins\WidgetsBundle\Config; 8 10 9 11 ?> … … 17 19 <p><?php esc_html_e( 'Show me some love and connect with me via social channels.', 'widgets-bundle' ); ?></p> 18 20 <a href="https://twitter.com/akshitsethi" target="_blank"> 19 <img src="<?php echo AkshitSethi\Plugins\WidgetsBundle\Config::$plugin_url; ?>assets/admin/images/twitter.png" alt="<?php esc_attr_e( 'Twitter', 'widgets-bundle' ); ?>" />21 <img src="<?php echo Config::$plugin_url; ?>assets/admin/images/twitter.png" alt="<?php esc_attr_e( 'Twitter', 'widgets-bundle' ); ?>" /> 20 22 </a> 21 23 22 24 <a href="https://www.facebook.com/akshitsethi" target="_blank"> 23 <img src="<?php echo AkshitSethi\Plugins\WidgetsBundle\Config::$plugin_url; ?>assets/admin/images/facebook.png" alt="<?php esc_attr_e( 'Facebook', 'widgets-bundle' ); ?>" />25 <img src="<?php echo Config::$plugin_url; ?>assets/admin/images/facebook.png" alt="<?php esc_attr_e( 'Facebook', 'widgets-bundle' ); ?>" /> 24 26 </a> 25 27 </div><!-- .as-share --> -
widgets-bundle/trunk/inc/admin/views/settings-options.php
r2269726 r2278790 21 21 <div class="as-form-group"> 22 22 <label for="<?php echo Config::PREFIX . 'ads'; ?>" class="as-strong"><?php esc_html_e( 'Ads Widget', 'widgets-bundle' ); ?></label> 23 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'ads'; ?>" value="1"<?php checked( true, absint( $options['ads'] ) ); ?>>23 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'ads'; ?>" value="1"<?php checked( true, esc_attr( $options['ads'] ) ); ?>> 24 24 25 25 <p class="as-form-help-block"><?php esc_html_e( 'Widget for displaying "Sponsored" ads.', 'widgets-bundle' ); ?></p> … … 28 28 <div class="as-form-group"> 29 29 <label for="<?php echo Config::PREFIX . 'facebook'; ?>" class="as-strong"><?php esc_html_e( 'Facebook Widget', 'widgets-bundle' ); ?></label> 30 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'facebook'; ?>" value="1"<?php checked( true, absint( $options['facebook'] ) ); ?>>30 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'facebook'; ?>" value="1"<?php checked( true, esc_attr( $options['facebook'] ) ); ?>> 31 31 32 32 <p class="as-form-help-block"><?php esc_html_e( 'This widget helps you display your Facebook page feed.', 'widgets-bundle' ); ?></p> … … 37 37 <div class="as-form-group"> 38 38 <label for="<?php echo Config::PREFIX . 'personal'; ?>" class="as-strong"><?php esc_html_e( 'Personal Widget', 'widgets-bundle' ); ?></label> 39 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'personal'; ?>" value="1"<?php checked( true, absint( $options['personal'] ) ); ?>>39 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'personal'; ?>" value="1"<?php checked( true, esc_attr( $options['personal'] ) ); ?>> 40 40 41 41 <p class="as-form-help-block"><?php esc_html_e( 'Widget for displaying "About Me" information on the website.', 'widgets-bundle' ); ?></p> … … 44 44 <div class="as-form-group"> 45 45 <label for="<?php echo Config::PREFIX . 'posts'; ?>" class="as-strong"><?php esc_html_e( 'Posts Widget', 'widgets-bundle' ); ?></label> 46 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'posts'; ?>" value="1"<?php checked( true, absint( $options['posts'] ) ); ?>>46 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'posts'; ?>" value="1"<?php checked( true, esc_attr( $options['posts'] ) ); ?>> 47 47 48 48 <p class="as-form-help-block"><?php esc_html_e( 'Display posts with thumbnails with the flexibility of selecting between different styles.', 'widgets-bundle' ); ?></p> … … 53 53 <div class="as-form-group"> 54 54 <label for="<?php echo Config::PREFIX . 'quote'; ?>" class="as-strong"><?php esc_html_e( 'Quote Widget', 'widgets-bundle' ); ?></label> 55 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'quote'; ?>" value="1"<?php checked( true, absint( $options['quote'] ) ); ?>>55 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'quote'; ?>" value="1"<?php checked( true, esc_attr( $options['quote'] ) ); ?>> 56 56 57 57 <p class="as-form-help-block"><?php esc_html_e( 'Display your favourite quotes with the help of this widget.', 'widgets-bundle' ); ?></p> … … 60 60 <div class="as-form-group"> 61 61 <label for="<?php echo Config::PREFIX . 'social'; ?>" class="as-strong"><?php esc_html_e( 'Social Widget', 'widgets-bundle' ); ?></label> 62 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'social'; ?>" value="1"<?php checked( true, absint( $options['social'] ) ); ?>>62 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'social'; ?>" value="1"<?php checked( true, esc_attr( $options['social'] ) ); ?>> 63 63 64 64 <p class="as-form-help-block"><?php esc_html_e( 'Widget for displaying social media links on your website.', 'widgets-bundle' ); ?></p> … … 69 69 <div class="as-form-group"> 70 70 <label for="<?php echo Config::PREFIX . 'subscribe'; ?>" class="as-strong"><?php esc_html_e( 'Subscribe Widget', 'widgets-bundle' ); ?></label> 71 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'subscribe'; ?>" value="1"<?php checked( true, absint( $options['subscribe'] ) ); ?>>71 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'subscribe'; ?>" value="1"<?php checked( true, esc_attr( $options['subscribe'] ) ); ?>> 72 72 73 73 <p class="as-form-help-block"><?php esc_html_e( 'Mailchimp subscription form with AJAX functionality.', 'widgets-bundle' ); ?></p> … … 76 76 <div class="as-form-group"> 77 77 <label for="<?php echo Config::PREFIX . 'instagram'; ?>" class="as-strong"><?php esc_html_e( 'Instagram Widget', 'widgets-bundle' ); ?></label> 78 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'instagram'; ?>" value="1"<?php checked( true, absint( $options['instagram'] ) ); ?>>78 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'instagram'; ?>" value="1"<?php checked( true, esc_attr( $options['instagram'] ) ); ?>> 79 79 80 80 <p class="as-form-help-block"><?php esc_html_e( 'This widget helps you display your photos from Instagram.', 'widgets-bundle' ); ?></p> … … 85 85 <div class="as-form-group"> 86 86 <label for="<?php echo Config::PREFIX . 'twitter'; ?>" class="as-strong"><?php esc_html_e( 'Twitter Widget', 'widgets-bundle' ); ?></label> 87 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'twitter'; ?>" value="1"<?php checked( true, absint( $options['twitter'] ) ); ?>>87 <input type="checkbox" class="as-form-ios" name="<?php echo Config::PREFIX . 'twitter'; ?>" value="1"<?php checked( true, esc_attr( $options['twitter'] ) ); ?>> 88 88 89 89 <p class="as-form-help-block"><?php esc_html_e( 'This widget helps you display your profile feed from Twitter.', 'widgets-bundle' ); ?></p> -
widgets-bundle/trunk/inc/admin/views/settings-support.php
r2269726 r2278790 20 20 <div class="as-form-group"> 21 21 <label for="<?php echo Config::PREFIX . 'support_email'; ?>" class="as-strong"><?php esc_html_e( 'Email Address', 'widgets-bundle' ); ?></label> 22 <input type="text" name="<?php echo Config::PREFIX . 'support_email'; ?>" id="<?php echo Config::PREFIX . 'support_email'; ?>" value="<?php echo esc_attr _e( $admin_email ); ?>" placeholder="<?php esc_html_e( 'Please provide your email address', 'widgets-bundle' ); ?>" class="as-form-control">22 <input type="text" name="<?php echo Config::PREFIX . 'support_email'; ?>" id="<?php echo Config::PREFIX . 'support_email'; ?>" value="<?php echo esc_attr( $admin_email ); ?>" placeholder="<?php esc_html_e( 'Please provide your email address', 'widgets-bundle' ); ?>" class="as-form-control"> 23 23 24 24 <p class="as-form-help-block"><?php esc_html_e( 'You will receive support response at this email address.', 'widgets-bundle' ); ?></p> -
widgets-bundle/trunk/inc/admin/views/settings.php
r2269726 r2278790 7 7 */ 8 8 9 use AkshitSethi\Plugins\WidgetsBundle\Config; 9 10 require_once 'header.php'; 10 11 … … 15 16 <div class="as-mobile-menu"> 16 17 <a href="javascript:void;"> 17 <img src="<?php echo AkshitSethi\Plugins\WidgetsBundle\Config::$plugin_url; ?>assets/admin/images/toggle.png" alt="<?php esc_attr_e( 'Menu', 'widgets-bundle' ); ?>" />18 <img src="<?php echo Config::$plugin_url; ?>assets/admin/images/toggle.png" alt="<?php esc_attr_e( 'Menu', 'widgets-bundle' ); ?>" /> 18 19 </a> 19 20 </div><!-- .as-mobile-menu --> -
widgets-bundle/trunk/inc/class-admin.php
r2269726 r2278790 91 91 'image_preview_text' => esc_html__( 'Image preview will show over here.', 'widgets-bundle' ), 92 92 'ad_preview_text' => esc_html__( 'Ad preview will show over here.', 'widgets-bundle' ), 93 'save_changes' => esc_html__( 'Please save your changes first.', 'widgets-bundle' ), 94 'processing' => esc_html__( 'Processing..' ), 95 'nonce' => wp_create_nonce( Config::PREFIX . 'nonce' ), 93 96 ); 94 97 … … 139 142 'response' => esc_html__( 'Options have been updated successfully.', 'widgets-bundle' ), 140 143 ); 144 145 // Check for _nonce 146 if ( empty( $_POST['_nonce'] ) || ! wp_verify_nonce( $_POST['_nonce'], Config::PREFIX . 'nonce' ) ) { 147 $response['code'] = 'error'; 148 $response['response'] = esc_html__( 'Request does not seem to be a valid one. Try again by refreshing the page.', 'widgets-bundle' ); 149 } 141 150 142 151 // Filter and sanitize … … 178 187 $admin_email = sanitize_text_field( $_POST[ Config::PREFIX . 'support_email' ] ); 179 188 $issue = htmlentities( $_POST[ Config::PREFIX . 'support_issue' ] ); 180 $subject = '[ Widgets Bundlev' . Config::VERSION . '] by ' . $admin_email;189 $subject = '[' . Config::get_plugin_name() . ' v' . Config::VERSION . '] by ' . $admin_email; 181 190 $body = "Email: $admin_email \r\nIssue: $issue"; 182 191 $headers = 'From: ' . $admin_email . "\r\n" . 'Reply-To: ' . $admin_email; -
widgets-bundle/trunk/inc/class-config.php
r2269726 r2278790 18 18 const PLUGIN_SLUG = 'widgets-bundle'; 19 19 const SHORT_SLUG = 'as-wb'; 20 const VERSION = ' @##VERSION##@';20 const VERSION = '2.0.2'; 21 21 const DB_OPTION = 'as_widgetsbundle'; 22 22 const PREFIX = 'widgetsbundle_'; … … 42 42 } 43 43 44 45 /** 46 * Get plugin name. 47 * 48 * @since 1.0.0 49 */ 50 public static function get_plugin_name() { 51 return esc_html__( 'Widgets Bundle', 'widgets-bundle' ); 52 } 53 44 54 } 45 55 -
widgets-bundle/trunk/inc/widgets/subscribe.php
r2269726 r2278790 8 8 namespace AkshitSethi\Plugins\WidgetsBundle\Widgets; 9 9 10 use Exception; 10 11 use WP_Widget; 11 12 use AkshitSethi\Plugins\WidgetsBundle\Config; 12 13 13 use DrewM\MailChimp\MailChimp; 14 14 … … 47 47 if ( ! empty( $api_key ) && ! empty( $list_id ) ) { 48 48 if ( isset( $_POST[ Config::PREFIX . 'subscribe_email' ] ) ) { 49 // Default response 50 $response = array( 51 'code' => 'error', 52 'text' => esc_html__( 'There was an error processing your request.', 'widgets-bundle' ), 53 ); 54 49 55 // Process information 50 56 $email = sanitize_text_field( $_POST[ Config::PREFIX . 'subscribe_email' ] ); 51 57 52 58 if ( empty( $email ) ) { 53 $response['code'] = 'error';54 59 $response['text'] = esc_html__( 'Please provide your email address.', 'widgets-bundle' ); 55 60 } else { 56 61 $email = filter_var( strtolower( trim( $email ) ), FILTER_SANITIZE_EMAIL ); 57 62 58 if ( strpos( $email, '@' ) ) { 59 // API call 60 $mailchimp = new MailChimp( $api_key ); 61 $connect = $mailchimp->post( 62 'lists/' . $list_id . '/members', 63 array( 64 'email_address' => $email, 65 'status' => 'subscribed', 66 ) 67 ); 68 69 // Show the response 70 if ( $mailchimp->success() ) { 71 $response['code'] = 'success'; 72 73 // Show the success message if not empty 74 if ( ! empty( $success_message ) ) { 75 $response['text'] = $success_message; 63 if ( $email ) { 64 try { 65 // API call 66 $mailchimp = new MailChimp( sanitize_text_field( $api_key ) ); 67 68 // Send data via POST 69 $connect = $mailchimp->post( 70 'lists/' . sanitize_text_field( $list_id ) . '/members', 71 array( 72 'email_address' => $email, 73 'status' => 'subscribed', 74 ) 75 ); 76 77 // Show the response 78 if ( $mailchimp->success() ) { 79 $response['code'] = 'success'; 80 81 // Show the success message if not empty 82 if ( ! empty( $success_message ) ) { 83 $response['text'] = esc_html( $success_message ); 84 } else { 85 $response['text'] = esc_html__( 'Thank you! We\'ll be in touch!', 'widgets-bundle' ); 86 } 76 87 } else { 77 $response['text'] = esc_html__( 'Thank you! We\'ll be in touch!', 'widgets-bundle' ); 88 if ( 400 === $mailchimp->getLastResponse()['headers']['http_code'] ) { 89 $response['code'] = 'success'; 90 $response['text'] = esc_html__( 'You are already subscribed. We will reach you shortly.', 'widgets-bundle' ); 91 } else { 92 $response['text'] = esc_html( $mailchimp->getLastError() ); 93 } 78 94 } 79 } else { 80 $response['code'] = 'error'; 81 $response['text'] = $mailchimp->getLastError(); 95 } catch ( Exception $e ) { 96 $response['text'] = $e->getMessage(); 82 97 } 83 98 } else { 84 $response['code'] = 'error';85 99 $response['text'] = esc_html__( 'Please provide a valid email address.', 'widgets-bundle' ); 86 100 } -
widgets-bundle/trunk/readme.txt
r2269726 r2278790 5 5 Requires at least: 4.8 6 6 Tested up to: 5.3.2 7 Stable tag: 2.0. 07 Stable tag: 2.0.2 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 52 52 == Changelog == 53 53 54 = 2.0.2 = 55 * Minor bug fixes 56 54 57 = 2.0.0 = 55 56 58 * Code has been completely refactored 57 59 * Supports the latest version of WordPress 58 * New plugins added60 * Improved the Subscribe widget 59 61 60 62 = 1.1 = -
widgets-bundle/trunk/vendor/autoload.php
r2269726 r2278790 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 37bd34aa4c10bcbe8bdd22a11d9295fb::getLoader();7 return ComposerAutoloaderInitd8349644e5810970bb83f136809ba9da::getLoader(); -
widgets-bundle/trunk/vendor/composer/autoload_real.php
r2269726 r2278790 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 37bd34aa4c10bcbe8bdd22a11d9295fb5 class ComposerAutoloaderInitd8349644e5810970bb83f136809ba9da 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 37bd34aa4c10bcbe8bdd22a11d9295fb', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInitd8349644e5810970bb83f136809ba9da', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 37bd34aa4c10bcbe8bdd22a11d9295fb', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInitd8349644e5810970bb83f136809ba9da', 'loadClassLoader')); 28 28 29 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 31 31 require_once __DIR__ . '/autoload_static.php'; 32 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit 37bd34aa4c10bcbe8bdd22a11d9295fb::getInitializer($loader));33 call_user_func(\Composer\Autoload\ComposerStaticInitd8349644e5810970bb83f136809ba9da::getInitializer($loader)); 34 34 } else { 35 35 $classMap = require __DIR__ . '/autoload_classmap.php'; -
widgets-bundle/trunk/vendor/composer/autoload_static.php
r2269726 r2278790 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 37bd34aa4c10bcbe8bdd22a11d9295fb7 class ComposerStaticInitd8349644e5810970bb83f136809ba9da 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 55 55 { 56 56 return \Closure::bind(function () use ($loader) { 57 $loader->prefixLengthsPsr4 = ComposerStaticInit 37bd34aa4c10bcbe8bdd22a11d9295fb::$prefixLengthsPsr4;58 $loader->prefixDirsPsr4 = ComposerStaticInit 37bd34aa4c10bcbe8bdd22a11d9295fb::$prefixDirsPsr4;59 $loader->classMap = ComposerStaticInit 37bd34aa4c10bcbe8bdd22a11d9295fb::$classMap;57 $loader->prefixLengthsPsr4 = ComposerStaticInitd8349644e5810970bb83f136809ba9da::$prefixLengthsPsr4; 58 $loader->prefixDirsPsr4 = ComposerStaticInitd8349644e5810970bb83f136809ba9da::$prefixDirsPsr4; 59 $loader->classMap = ComposerStaticInitd8349644e5810970bb83f136809ba9da::$classMap; 60 60 61 61 }, null, ClassLoader::class); -
widgets-bundle/trunk/widgets-bundle.php
r2269726 r2278790 4 4 * Plugin Name: Widgets Bundle 5 5 * Description: The Widgets Bundle plugin allows you to add powerful collection of beautifully crafted widgets to your website. 6 * Version: 2.0. 06 * Version: 2.0.2 7 7 * Runtime: 5.6+ 8 8 * Author: akshitsethi … … 89 89 */ 90 90 public function activate() { 91 // Add to `wp_options` table. 92 update_option( Config::DB_OPTION, Config::DEFAULT_OPTIONS ); 91 // Check for existing options in the database 92 $options = get_option( Config::DB_OPTION ); 93 94 // Present? Overwrite the default options 95 if ( $options ) { 96 $options = array_merge( Config::DEFAULT_OPTIONS, $options ); 97 } else { 98 $options = Config::DEFAULT_OPTIONS; 99 } 100 101 // Update `wp_options` table 102 update_option( Config::DB_OPTION, $options ); 93 103 } 94 104 … … 98 108 */ 99 109 public function deactivate() { 100 // Remove from `wp_options` table. 101 delete_option( Config::DB_OPTION ); 110 /** 111 * @todo Keeping it here as it will be needed in future versions. 112 */ 102 113 } 103 114
Note: See TracChangeset
for help on using the changeset viewer.