Plugin Directory

Changeset 3368850


Ignore:
Timestamp:
09/27/2025 10:18:30 AM (4 months ago)
Author:
kotakdigitalcom
Message:

Update v1.0.6

Location:
kotaqx-poster/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kotaqx-poster/trunk/Readme.txt

    r3364882 r3368850  
    55Tested up to: 6.8
    66Requires PHP: 7.2
    7 Stable tag: 1.0.5
     7Stable tag: 1.0.6
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    105105== Changelog ==
    106106
     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
    107111= 1.0.5 =
    108112* Update: Show different message when Pro plugin is installed but license not activated.
  • kotaqx-poster/trunk/includes/utils.php

    r3351682 r3368850  
    55
    66class Utils {
     7    // Option name for storing settings
     8    const SETTINGS = 'kotaqx_poster_settings';
     9
    710    // Load settings from the database
    811    public static function load_settings() {
    9         $settings = get_option('kotaqx_poster_settings', []);
     12        $settings = get_option(self::SETTINGS, []);
    1013        if (!is_array($settings)) {
    1114            $settings = [];
     
    2427        $settings = self::load_settings();
    2528        $settings[$key] = $value;
    26         update_option('kotaqx_poster_settings', $settings);
     29        update_option(self::SETTINGS, $settings);
    2730    }
    2831
     
    3134        $settings = self::load_settings();
    3235        $settings = array_merge($settings, $new_settings);
    33         update_option('kotaqx_poster_settings', $settings);
     36        update_option(self::SETTINGS, $settings);
    3437    }
    3538
  • kotaqx-poster/trunk/kotaqx-poster.php

    r3364882 r3368850  
    55 * Plugin URI:        https://kotakdigital.com/downloads/kotaqx-poster/
    66 * Description:       Automatically recover missed schedule posts, and share published content to other platforms.
    7  * Version:           1.0.5
     7 * Version:           1.0.6
    88 * Author:            Kotak Digital
    99 * Author URI:        https://kotakdigital.com
     
    2020
    2121if (!defined('KOTAQX_POSTER_VERSION')) {
    22     define('KOTAQX_POSTER_VERSION', '1.0.5');
     22    define('KOTAQX_POSTER_VERSION', '1.0.6');
    2323}
    2424if (!defined('KOTAQX_POSTER_URL')) {
     
    133133        require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    134134        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        }
    135142
    136143        //Run the cron
Note: See TracChangeset for help on using the changeset viewer.