Changeset 3004093
- Timestamp:
- 12/01/2023 07:48:57 AM (2 years ago)
- Location:
- confetti-fall-animation
- Files:
-
- 19 added
- 3 edited
-
tags/1.2.5 (added)
-
tags/1.2.5/README.md (added)
-
tags/1.2.5/assets (added)
-
tags/1.2.5/assets/css (added)
-
tags/1.2.5/assets/css/popup-plugin.css (added)
-
tags/1.2.5/assets/css/style.css (added)
-
tags/1.2.5/assets/js (added)
-
tags/1.2.5/assets/js/README.md (added)
-
tags/1.2.5/assets/js/confetti-fall-animation.js (added)
-
tags/1.2.5/assets/js/confetti.js (added)
-
tags/1.2.5/assets/js/confetti.min.js (added)
-
tags/1.2.5/assets/js/overlay-fireworks.js (added)
-
tags/1.2.5/assets/js/popup-plugin.js (added)
-
tags/1.2.5/confetti-fall-animation.php (added)
-
tags/1.2.5/inc (added)
-
tags/1.2.5/inc/popupBackgroundImage.php (added)
-
tags/1.2.5/readme.txt (added)
-
trunk/assets/css/popup-plugin.css (modified) (2 diffs)
-
trunk/confetti-fall-animation.php (modified) (10 diffs)
-
trunk/inc (added)
-
trunk/inc/popupBackgroundImage.php (added)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
confetti-fall-animation/trunk/assets/css/popup-plugin.css
r3002023 r3004093 1 1 /* Styling for the overlay */ 2 #confetti-popup-overlay {2 .confetti-popup-overlay { 3 3 position: fixed; 4 4 top: 0; … … 18 18 transform: translate(-50%, -50%); 19 19 background-color: #fff; 20 padding: 20px;21 height: auto;20 padding: 15px; 21 height: -webkit-fill-available; 22 22 width: 35%; 23 23 text-align: center; 24 24 box-shadow: -50px 0 200px -50px #504bff, 50px 0 200px -50px #4cfa63; 25 25 border-radius: 6px; 26 display: none; 26 display: flex; 27 align-items: center; 28 justify-content: center; 27 29 z-index: 9999; 28 30 transition: all ease-in .4s; -
confetti-fall-animation/trunk/confetti-fall-animation.php
r3002023 r3004093 20 20 21 21 /* --- */ 22 23 22 if (!function_exists("add_action")) { 24 23 exit; 25 24 } 26 27 25 /* --- */ 28 26 29 27 define("cfa_dir_url", plugin_dir_url(__FILE__)); 30 31 /* --- */ 32 28 define("cfa_dir_path", plugin_dir_path(__FILE__)); 29 require_once cfa_dir_path . 'inc/popupBackgroundImage.php'; 30 31 /* --- */ 33 32 $cfa_can_loaded = 0; 34 33 … … 40 39 } 41 40 } 42 43 41 add_action("template_redirect", "cfa_templete_redirect"); 44 42 45 43 /* --- */ 46 47 44 function cfa_enqueue_scripts(){ 48 45 global $cfa_can_loaded; … … 52 49 wp_enqueue_script("confetti-fall-animation",cfa_dir_url . "assets/js/confetti-fall-animation.js",array("jquery", "confetti-js")); 53 50 } 54 55 51 wp_enqueue_script('confetti-popup-script', cfa_dir_url . 'assets/js/popup-plugin.js', array('jquery'), '1.0', true); 56 57 52 // Define JavaScript variable 58 53 $delayInSeconds = get_option('confetti-popup-delay', 5); // Get delay time from WordPress settings … … 60 55 'delayInSeconds' => $delayInSeconds 61 56 )); 62 63 57 wp_enqueue_style('custom-popup-style', cfa_dir_url . 'assets/css/popup-plugin.css', array(), '1.0'); 64 58 } 65 66 59 add_action("wp_enqueue_scripts", "cfa_enqueue_scripts"); 67 60 68 61 /* --- */ 69 70 62 function confetti_backend_scripts(){ 71 63 wp_register_style( 'confetti-style', cfa_dir_url . 'assets/css/popup-plugin.css', array(), '1.0', 'all' ); … … 76 68 77 69 /* --- */ 78 79 70 function cfa_html_view_page($props) 80 71 { … … 120 111 $icon_url = 'dashicons-buddicons-community'; 121 112 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'); 123 114 124 115 } … … 143 134 144 135 145 // Define the Settings for Popup146 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 <?php153 settings_fields('confetti-animation');154 do_settings_sections('confetti-animation');155 submit_button();156 ?>157 </form>158 </div>159 <?php160 }161 162 136 // Create settings fields and sections 163 add_action('admin_init', 'confetti_popup_settings');164 165 137 function confetti_popup_settings() { 166 138 … … 182 154 register_setting('confetti-animation', 'confetti-popup-pages'); 183 155 } 156 // Create settings fields and sections 157 add_action('admin_init', 'confetti_popup_settings'); 184 158 185 159 // Callback functions for settings fields … … 190 164 function confetti_popup_content_callback() { 191 165 $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>'; 193 167 echo '<textarea name="confetti-popup-content" rows="5" cols="50">' . esc_textarea($value) . '</textarea>'; 194 168 echo '<br><small>You can use html tags as well</small>'; … … 213 187 // Display the popup content here 214 188 ?> 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 216 191 } 217 192 } -
confetti-fall-animation/trunk/readme.txt
r3002023 r3004093 48 48 = 1.2.1 = 49 49 * 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. 50 57 * Easy customization added. 51 58
Note: See TracChangeset
for help on using the changeset viewer.