Plugin Directory

Changeset 3004093


Ignore:
Timestamp:
12/01/2023 07:48:57 AM (2 years ago)
Author:
shakeelu
Message:

Background Image added
add image by upload image

Location:
confetti-fall-animation
Files:
19 added
3 edited

Legend:

Unmodified
Added
Removed
  • confetti-fall-animation/trunk/assets/css/popup-plugin.css

    r3002023 r3004093  
    11/* Styling for the overlay */
    2 #confetti-popup-overlay {
     2.confetti-popup-overlay {
    33    position: fixed;
    44    top: 0;
     
    1818    transform: translate(-50%, -50%);
    1919    background-color: #fff;
    20     padding: 20px;
    21     height: auto;
     20    padding: 15px;
     21    height: -webkit-fill-available;
    2222    width: 35%;
    2323    text-align: center;
    2424    box-shadow: -50px 0 200px -50px #504bff, 50px 0 200px -50px #4cfa63;
    2525    border-radius: 6px;
    26     display: none;
     26    display: flex;
     27    align-items: center;
     28    justify-content: center;
    2729    z-index: 9999;
    2830    transition: all ease-in .4s;
  • confetti-fall-animation/trunk/confetti-fall-animation.php

    r3002023 r3004093  
    2020
    2121/* --- */
    22 
    2322if (!function_exists("add_action")) {
    2423    exit;
    2524}
    26 
    2725/* --- */
    2826
    2927define("cfa_dir_url", plugin_dir_url(__FILE__));
    30 
    31 /* --- */
    32 
     28define("cfa_dir_path", plugin_dir_path(__FILE__));
     29require_once cfa_dir_path . 'inc/popupBackgroundImage.php';
     30
     31/* --- */
    3332$cfa_can_loaded = 0;
    3433
     
    4039    }
    4140}
    42 
    4341add_action("template_redirect", "cfa_templete_redirect");
    4442
    4543/* --- */
    46 
    4744function cfa_enqueue_scripts(){
    4845    global $cfa_can_loaded;
     
    5249        wp_enqueue_script("confetti-fall-animation",cfa_dir_url . "assets/js/confetti-fall-animation.js",array("jquery", "confetti-js"));
    5350    }
    54 
    5551    wp_enqueue_script('confetti-popup-script', cfa_dir_url . 'assets/js/popup-plugin.js', array('jquery'), '1.0', true);
    56 
    5752    // Define JavaScript variable
    5853    $delayInSeconds = get_option('confetti-popup-delay', 5); // Get delay time from WordPress settings
     
    6055        'delayInSeconds' => $delayInSeconds
    6156    ));
    62 
    6357    wp_enqueue_style('custom-popup-style', cfa_dir_url . 'assets/css/popup-plugin.css', array(), '1.0');
    6458}
    65 
    6659add_action("wp_enqueue_scripts", "cfa_enqueue_scripts");
    6760
    6861/* --- */
    69 
    7062function confetti_backend_scripts(){
    7163    wp_register_style( 'confetti-style', cfa_dir_url . 'assets/css/popup-plugin.css', array(), '1.0', 'all' );
     
    7668
    7769/* --- */
    78 
    7970function cfa_html_view_page($props)
    8071{
     
    120111    $icon_url = 'dashicons-buddicons-community';
    121112    add_menu_page('CF Animation','CF Animation','manage_options', $parent_url,'confetti_animation_page', $icon_url, 80);
    122     add_submenu_page( $parent_url, 'Popup Settings', 'Popup Settings', 'manage_options', 'popup-settings', 'confetti_popup_setting_page');
     113    add_submenu_page( $parent_url, 'Popup Settings', 'Popup Settings', 'manage_options', 'popup-settings', 'render_plugin_background_settings_page');
    123114
    124115}
     
    143134
    144135
    145 // Define the Settings for Popup
    146 function confetti_popup_setting_page() {
    147     ?>
    148     <div class="wrap">
    149         <?php settings_errors();?>
    150         <h2>Confetti Popup Settings</h2>
    151         <form method="post" action="options.php">
    152             <?php
    153             settings_fields('confetti-animation');
    154             do_settings_sections('confetti-animation');
    155             submit_button();
    156             ?>
    157         </form>
    158     </div>
    159     <?php
    160 }
    161 
    162136// Create settings fields and sections
    163 add_action('admin_init', 'confetti_popup_settings');
    164 
    165137function confetti_popup_settings() {
    166138
     
    182154    register_setting('confetti-animation', 'confetti-popup-pages');
    183155}
     156// Create settings fields and sections
     157add_action('admin_init', 'confetti_popup_settings');
    184158
    185159// Callback functions for settings fields
     
    190164function confetti_popup_content_callback() {
    191165    $content = get_option('confetti-popup-content', '');
    192     $value  = !empty($content) ?  $content : '<h2> Welcome to Confetti Animation</h2>';
     166    $value  = !empty($content) ?  $content : '<h2>Welcome to Confetti Animation</h2>';
    193167    echo '<textarea name="confetti-popup-content" rows="5" cols="50">' . esc_textarea($value) . '</textarea>';
    194168    echo '<br><small>You can use html tags as well</small>';
     
    213187        // Display the popup content here
    214188        ?>
    215         <div id="confetti-popup" style="display: none;"> <?php echo wp_kses_post($content); ?> <a id="confetti-popup-close"> <i class="fa fa-close"></i></a> </div>; <?php
     189        <div id="confetti-popup" style="display: none;"> <?php echo wp_kses_post($content); ?> <a id="confetti-popup-close"> <i class="fa fa-close"></i>Close</a></div>
     190        <?php
    216191    }
    217192}
  • confetti-fall-animation/trunk/readme.txt

    r3002023 r3004093  
    4848= 1.2.1 =
    4949* Some Popup bugs fixed.
     50* New Feature added.
     51* Background Image upload Option added.
     52* add/remove option added.
     53* add image by button from plugin option.
     54
     55= 1.2.1 =
     56* Some Popup bugs fixed.
    5057* Easy customization added.
    5158
Note: See TracChangeset for help on using the changeset viewer.