| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Datafeedr API |
| 4 |
Plugin URI: https://www.datafeedr.com |
| 5 |
Description: Connect to the Datafeedr API and configure your API settings. |
| 6 |
Author: datafeedr.com |
| 7 |
Author URI: https://www.datafeedr.com |
| 8 |
License: GPL v3 |
| 9 |
Requires at least: 3.8 |
| 10 |
Tested up to: 5.7-alpha |
| 11 |
Version: 1.1.0 |
| 12 |
|
| 13 |
Datafeedr API Plugin |
| 14 |
Copyright (C) 2021, Datafeedr - help@datafeedr.com |
| 15 |
|
| 16 |
This program is free software: you can redistribute it and/or modify |
| 17 |
it under the terms of the GNU General Public License as published by |
| 18 |
the Free Software Foundation, either version 3 of the License, or |
| 19 |
(at your option) any later version. |
| 20 |
|
| 21 |
This program is distributed in the hope that it will be useful, |
| 22 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 |
GNU General Public License for more details. |
| 25 |
|
| 26 |
You should have received a copy of the GNU General Public License |
| 27 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 28 |
*/ |
| 29 |
|
| 30 |
if ( defined( 'DATAFEEDR_DEV' ) && true === DATAFEEDR_DEV ) { |
| 31 |
|
| 32 |
add_action( 'admin_notices', 'dfrapi_development_version_notice' ); |
| 33 |
function dfrapi_development_version_notice() { |
| 34 |
$class = 'notice notice-error'; |
| 35 |
$title = 'WARNING!!!'; |
| 36 |
$message = 'You are now using a development version of the Datafeedr API plugin. Things WILL BREAK. We do NOT recommend using this version of the plugin! You have been warned.'; |
| 37 |
echo sprintf( |
| 38 |
'<div class="%1$s"><p><strong>%2$s</strong><br />%3$s</p></div>', |
| 39 |
esc_attr( $class ), |
| 40 |
esc_html( $title ), |
| 41 |
esc_html( $message ) |
| 42 |
); |
| 43 |
} |
| 44 |
|
| 45 |
include( 'datafeedr-api-v2.php' ); |
| 46 |
|
| 47 |
} else { |
| 48 |
include( 'datafeedr-api-v1.php' ); |
| 49 |
} |
| 50 |
|