Changeset 3368850
- Timestamp:
- 09/27/2025 10:18:30 AM (4 months ago)
- Location:
- kotaqx-poster/trunk
- Files:
-
- 3 edited
-
Readme.txt (modified) (2 diffs)
-
includes/utils.php (modified) (3 diffs)
-
kotaqx-poster.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kotaqx-poster/trunk/Readme.txt
r3364882 r3368850 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 105 105 == Changelog == 106 106 107 = 1.0.6 = 108 * Update: Add default settings if not present. 109 * Refactor: Refactored settings option name into a `SETTINGS` constant for better maintainability. 110 107 111 = 1.0.5 = 108 112 * Update: Show different message when Pro plugin is installed but license not activated. -
kotaqx-poster/trunk/includes/utils.php
r3351682 r3368850 5 5 6 6 class Utils { 7 // Option name for storing settings 8 const SETTINGS = 'kotaqx_poster_settings'; 9 7 10 // Load settings from the database 8 11 public static function load_settings() { 9 $settings = get_option( 'kotaqx_poster_settings', []);12 $settings = get_option(self::SETTINGS, []); 10 13 if (!is_array($settings)) { 11 14 $settings = []; … … 24 27 $settings = self::load_settings(); 25 28 $settings[$key] = $value; 26 update_option( 'kotaqx_poster_settings', $settings);29 update_option(self::SETTINGS, $settings); 27 30 } 28 31 … … 31 34 $settings = self::load_settings(); 32 35 $settings = array_merge($settings, $new_settings); 33 update_option( 'kotaqx_poster_settings', $settings);36 update_option(self::SETTINGS, $settings); 34 37 } 35 38 -
kotaqx-poster/trunk/kotaqx-poster.php
r3364882 r3368850 5 5 * Plugin URI: https://kotakdigital.com/downloads/kotaqx-poster/ 6 6 * Description: Automatically recover missed schedule posts, and share published content to other platforms. 7 * Version: 1.0. 57 * Version: 1.0.6 8 8 * Author: Kotak Digital 9 9 * Author URI: https://kotakdigital.com … … 20 20 21 21 if (!defined('KOTAQX_POSTER_VERSION')) { 22 define('KOTAQX_POSTER_VERSION', '1.0. 5');22 define('KOTAQX_POSTER_VERSION', '1.0.6'); 23 23 } 24 24 if (!defined('KOTAQX_POSTER_URL')) { … … 133 133 require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); 134 134 dbDelta($sql); 135 136 //Add default settings if not present 137 $settings = get_option('kotaqx_poster_settings', []); 138 if (!$settings || !is_array($settings)) { 139 //Set post_types to ['post'] by default 140 Utils::update_setting('post_types', ['post']); 141 } 135 142 136 143 //Run the cron
Note: See TracChangeset
for help on using the changeset viewer.