Plugin Directory

Changeset 3357498


Ignore:
Timestamp:
09/07/2025 06:44:34 PM (7 months ago)
Author:
md10
Message:

Minor updates: Updated Delay Before Close default value, added shortcode for settings page under plugins and updated description text.

Location:
custom-smart-modal/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • custom-smart-modal/trunk/admin/settings.php

    r3357124 r3357498  
    22
    33if ( ! defined('ABSPATH') ) { exit; }
     4
     5// Add settings link to plugins page
     6add_filter('plugin_action_links_' . plugin_basename(dirname(__FILE__, 2) . '/custom-welcome-modal.php'), 'custsmmo_add_plugin_action_links');
     7
     8function custsmmo_add_plugin_action_links($links) {
     9    $menu_location = get_option('custsmmo_menu_location', 'sidebar');
     10   
     11    if ($menu_location === 'appearance') {
     12        $settings_link = '<a href="' . esc_url(admin_url('themes.php?page=custsmmo-smart-modal')) . '">' . __('Settings', 'custom-smart-modal') . '</a>';
     13    } else {
     14        $settings_link = '<a href="' . esc_url(admin_url('admin.php?page=custsmmo-smart-modal')) . '">' . __('Settings', 'custom-smart-modal') . '</a>';
     15    }
     16   
     17    // Add the settings link to the beginning of the array
     18    array_unshift($links, $settings_link);
     19   
     20    return $links;
     21}
    422
    523add_action('admin_init', 'custsmmo_register_plugin_settings');
     
    6381        'type' => 'integer',
    6482        'sanitize_callback' => 'custsmmo_sanitize_int',
    65         'default' => 1000
     83        'default' => 2500
    6684    ));
    6785    register_setting('custsmmo_options_group', 'custsmmo_side_spacing', array(
     
    165183        <p>If you need help, have questions or have improvement suggestions, please reach out!</p>
    166184        <p><a href="mailto:[email protected]">[email protected]</a></p>
    167         <b><p>To disable the modal please delete the sentence and turn off start as visible checkbox</p></b>
     185        <b><p>To disable the modal please delete the welcome message and turn off start as visible checkbox</p></b>
    168186        <form method="post" action="options.php">
    169187            <?php settings_fields('custsmmo_options_group'); ?>
     
    178196                    <table class="form-table">
    179197                        <tr valign="top">
    180                             <th scope="row">Sentence</th>
     198                            <th scope="row">Welcome Message</th>
    181199                            <td>
    182200                                <input type="text" name="custsmmo_sentence" value="<?php echo esc_attr(get_option('custsmmo_sentence')); ?>" size="50"/>
     
    345363                            <td>
    346364                                <span class="description">1000 milliseconds = 1 second.</span><br>
    347                                 <input type="number" name="custsmmo_delay_before_close" value="<?php echo esc_attr(get_option('custsmmo_delay_before_close', 1000)); ?>" min="0" step="100" />
     365                                <input type="number" name="custsmmo_delay_before_close" value="<?php echo esc_attr(get_option('custsmmo_delay_before_close', 2500)); ?>" min="0" step="100" />
    348366                                <span class="description">How long to wait after all words are visible before closing the modal.</span>
    349367                            </td>
     
    407425        plugin_dir_url(dirname(__FILE__)) . 'css/admin-style.css',
    408426        array(),
    409         '1.0'
     427        defined('CUSTSMMO_VERSION') ? CUSTSMMO_VERSION : '1.1'
    410428    );
    411429
     
    415433        plugin_dir_url(__FILE__) . 'js/admin-settings.js',
    416434        array('jquery'),
    417         defined('CUSTSMMO_VERSION') ? CUSTSMMO_VERSION : '1.0',
     435        defined('CUSTSMMO_VERSION') ? CUSTSMMO_VERSION : '1.1',
    418436        true
    419437    );
  • custom-smart-modal/trunk/custom-welcome-modal.php

    r3357124 r3357498  
    22/**
    33 * Plugin Name: Custom Smart Modal
    4  * Description: A simple yet powerful way to add elegance to your website.
     4 * Description: A simple yet powerful way to add elegance to your website with a customizable animated welcome modal.
    55 * Requires at least: 6.4
    66 * Requires PHP: 7.4
    77 * Author: Martin Dimitrov
    88 * Author URI: https://martindimitrov.dk
    9  * Version: 1.0
     9 * Version: 1.1
    1010 * License: GPLv2 or later
    1111 * Text Domain: custom-smart-modal
     
    1717
    1818if ( ! defined( 'CUSTSMMO_VERSION' ) ) {
    19     define( 'CUSTSMMO_VERSION', '1.0' );
     19    define( 'CUSTSMMO_VERSION', '1.1' );
    2020}
    2121
  • custom-smart-modal/trunk/readme.txt

    r3357135 r3357498  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0
     8Stable tag: 1.1
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6464== Changelog ==
    6565
     66= 1.1 =
     67* Minor updates: Updated Delay Before Close default value, added shortcode for settings page under plugins and updated description text.
     68
    6669= 1.0 =
    6770* Initial release: animated modal, full settings panel, TranslatePress support, responsive design.
    6871
    6972== Upgrade Notice ==
     73
     74= 1.1 =
     75Plese update to latest version 1.1 to address all new updates.
    7076
    7177= 1.0 =
Note: See TracChangeset for help on using the changeset viewer.