PluginProbe
Weather Effect / 1.5.4
Weather Effect v1.5.4
1.6.1 1.1.9 1.2.0 1.2.10 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 All 90 releases
weather-effect / weather-effect.php

weather-effect.php in Weather Effect 1.5.4, at weather-effect.php

74 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: Weather Effect
4 Plugin URI: https://awplife.com/
5 Description: This is Weather Effect Widget.
6 Version: 1.5.4
7 Author: A WP Life
8 Author URI: https://awplife.com/
9 License: GPLv2 or later
10 Text Domain: weather-effect
11 Domain Path: /languages
12
13 Weather Effect is free software: you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 2 of the License, or
16 any later version.
17
18 Weather Effect is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with User Registration. If not, see https://www.gnu.org/licenses/gpl-2.0.html.
25 */
26
27 define( 'WE_PLUGIN_PATH', plugin_dir_url( __FILE__ ) );
28
29 // Plugin Text Domain
30 define( 'WE_TXTD', 'weather-effect' );
31
32 // Load text domain
33 add_action( 'plugins_loaded', 'WE_load_textdomain' );
34
35 function WE_load_textdomain() {
36 load_plugin_textdomain( 'weather-effect', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
37 }
38
39 require_once 'settings.php';
40
41 // Default settings
42 function weather_effect_default_settings() {
43 $weather_effect_settings = get_option( 'weather_effect_settings' );
44 add_option( 'weather_effect_settings', $_POST );
45 }
46 register_activation_hook( __FILE__, 'weather_effect_default_settings' );
47
48 // load jQuery
49 function awplife_we_script() {
50 wp_enqueue_script( 'jquery' );
51 }
52 add_action( 'wp_enqueue_scripts', 'awplife_we_script' );
53
54 function awplife_we_scripts_load_in_head() {
55 wp_enqueue_script( 'jquery' );
56 wp_enqueue_script( 'awplife-we-snow-christmas-snow-js', WE_PLUGIN_PATH . 'assets/js/christmas-snow/christmas-snow.js' );
57 wp_enqueue_script( 'awplife-we-snow-snow-falling-js', WE_PLUGIN_PATH . 'assets/js/snow-falling/snow-falling.js' );
58 wp_enqueue_script( 'awplife-we-snow-snowfall-master-js', WE_PLUGIN_PATH . 'assets/js/snowfall-master/snowfall-master.min.js', array( 'jquery' ), '', true );
59
60 $weather_effect_settings = get_option( 'weather_effect_settings' );
61 if ( isset( $weather_effect_settings['enable_weather_effect'] ) ) {
62 $enable_weather_effect = $weather_effect_settings['enable_weather_effect'];
63 } else {
64 $enable_weather_effect = 1;
65 }
66
67 // check weather effect ON / OFF
68 if ( $enable_weather_effect == 1 ) {
69 require_once 'output.php';
70 }
71 }
72 add_action( 'wp_head', 'awplife_we_scripts_load_in_head' );
73
74