wordpress-popup
Last commit date
css
11 years ago
img
11 years ago
inc
11 years ago
js
11 years ago
lang
11 years ago
views
11 years ago
changelog.txt
11 years ago
humans.txt
11 years ago
license.txt
15 years ago
popover.php
11 years ago
readme.txt
11 years ago
screenshot-1.png
14 years ago
screenshot-2.png
14 years ago
screenshot-3.png
14 years ago
popover.php
85 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: WordPress PopUp |
| 4 | Plugin URI: http://premium.wpmudev.org/project/the-pop-over-plugin/ |
| 5 | Description: Allows you to display a fancy PopUp to visitors sitewide or per blog. A *very* effective way of advertising a mailing list, special offer or running a plain old ad. |
| 6 | Version: 4.6 |
| 7 | Author: WPMU DEV |
| 8 | Author URI: http://premium.wpmudev.org |
| 9 | Textdomain: popover |
| 10 | WDP ID: 123 |
| 11 | |
| 12 | Copyright 2007-2013 Incsub (http://incsub.com) |
| 13 | Author - Barry (Incsub) |
| 14 | Contributors - Marko Miljus (Incsub), Ve Bailovity (Incsub) |
| 15 | This program is free software; you can redistribute it and/or modify |
| 16 | it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by |
| 17 | the Free Software Foundation. |
| 18 | |
| 19 | This program is distributed in the hope that it will be useful, |
| 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 | GNU General Public License for more details. |
| 23 | |
| 24 | You should have received a copy of the GNU General Public License |
| 25 | along with this program; if not, write to the Free Software |
| 26 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 27 | */ |
| 28 | |
| 29 | add_action( |
| 30 | 'plugins_loaded', |
| 31 | 'inc_popup_free_init' |
| 32 | ); |
| 33 | |
| 34 | function inc_popup_free_init() { |
| 35 | // Check if the PRO plugin is present and activated. |
| 36 | if ( defined( 'PO_VERSION' ) && PO_VERSION == 'pro' ) { |
| 37 | return false; |
| 38 | } |
| 39 | |
| 40 | if ( ! defined( 'PO_LANG' ) ) { |
| 41 | // Used for more readable i18n functions: __( 'text', PO_LANG ); |
| 42 | define( 'PO_LANG', 'popover' ); |
| 43 | define( 'PO_VERSION', '4.6' ); |
| 44 | |
| 45 | /** |
| 46 | * The current DB/build version. NOT THE SAME AS THE PLUGIN VERSION! |
| 47 | * Increase this when DB structure changes, migration code is required, etc. |
| 48 | * See IncPopupDatabase: db_is_current() and db_update() |
| 49 | */ |
| 50 | define( 'PO_BUILD', 6 ); |
| 51 | |
| 52 | $plugin_dir = trailingslashit( dirname( __FILE__ ) ); |
| 53 | $plugin_dir_rel = trailingslashit( dirname( plugin_basename( __FILE__ ) ) ); |
| 54 | $plugin_url = plugin_dir_url( __FILE__ ); |
| 55 | |
| 56 | define( 'PO_LANG_DIR', $plugin_dir_rel . 'lang/' ); |
| 57 | define( 'PO_TPL_DIR', $plugin_dir . 'css/tpl/' ); |
| 58 | define( 'PO_INC_DIR', $plugin_dir . 'inc/' ); |
| 59 | define( 'PO_JS_DIR', $plugin_dir . 'js/' ); |
| 60 | define( 'PO_CSS_DIR', $plugin_dir . 'css/' ); |
| 61 | define( 'PO_VIEWS_DIR', $plugin_dir . 'views/' ); |
| 62 | |
| 63 | define( 'PO_TPL_URL', $plugin_url . 'css/tpl/' ); |
| 64 | define( 'PO_JS_URL', $plugin_url . 'js/' ); |
| 65 | define( 'PO_CSS_URL', $plugin_url . 'css/' ); |
| 66 | define( 'PO_IMG_URL', $plugin_url . 'img/' ); |
| 67 | |
| 68 | // Include function library. |
| 69 | if ( file_exists( PO_INC_DIR . 'external/wpmu-lib/core.php' ) ) { |
| 70 | require_once PO_INC_DIR . 'external/wpmu-lib/core.php'; |
| 71 | } |
| 72 | |
| 73 | require_once( PO_INC_DIR . 'config-defaults.php'); |
| 74 | if ( is_admin() ) { |
| 75 | // Defines class 'IncPopup'. |
| 76 | require_once( PO_INC_DIR . 'class-popup-admin.php'); |
| 77 | } else { |
| 78 | // Defines class 'IncPopup'. |
| 79 | require_once( PO_INC_DIR . 'class-popup-public.php'); |
| 80 | } |
| 81 | |
| 82 | // Initialize the plugin as soon as we have identified the current user. |
| 83 | add_action( 'set_current_user', array( 'IncPopup', 'instance' ) ); |
| 84 | } |
| 85 | } |