| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: Info Cards |
| 5 |
* Description: Create beautiful cards with text and image. |
| 6 |
* Requires at least: 6.5 |
| 7 |
* Requires PHP: 7.4 |
| 8 |
* Version: 3.0.1 |
| 9 |
* Author: bPlugins |
| 10 |
* Author URI: http://bplugins.com |
| 11 |
* Plugin URI: https://wordpress.org/plugins/info-cards/ |
| 12 |
* License: GPLv3 or later |
| 13 |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html |
| 14 |
* Text Domain: info-cards |
| 15 |
*/ |
| 16 |
if ( !defined( 'ABSPATH' ) ) { |
| 17 |
exit; |
| 18 |
} |
| 19 |
if ( function_exists( 'info_cards_fs' ) ) { |
| 20 |
register_activation_hook( __FILE__, function () { |
| 21 |
if ( !function_exists( 'is_plugin_active' ) ) { |
| 22 |
require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 23 |
} |
| 24 |
if ( is_plugin_active( 'info-cards/info-cards.php' ) ) { |
| 25 |
deactivate_plugins( 'info-cards/info-cards.php' ); |
| 26 |
} |
| 27 |
if ( is_plugin_active( 'info-cards-pro/info-cards.php' ) ) { |
| 28 |
deactivate_plugins( 'info-cards-pro/info-cards.php' ); |
| 29 |
} |
| 30 |
} ); |
| 31 |
} else { |
| 32 |
define( 'INFO_CARDS_PRO', file_exists( dirname( __FILE__ ) . '/vendor/freemius/start.php' ) ); |
| 33 |
define( 'ICB_VERSION', ( isset( $_SERVER['HTTP_HOST'] ) && 'localhost' === $_SERVER['HTTP_HOST'] ? time() : '3.0.1' ) ); |
| 34 |
define( 'ICB_DIR_URL', plugin_dir_url( __FILE__ ) ); |
| 35 |
define( 'ICB_DIR_PATH', plugin_dir_path( __FILE__ ) ); |
| 36 |
define( 'ICB_DIR', ICB_DIR_URL ); |
| 37 |
define( 'ICB_DIR_PATH_LEGACY', ICB_DIR_PATH ); |
| 38 |
if ( !function_exists( 'info_cards_fs' ) ) { |
| 39 |
function info_cards_fs() { |
| 40 |
global $info_cards_fs; |
| 41 |
if ( !isset( $info_cards_fs ) ) { |
| 42 |
if ( INFO_CARDS_PRO ) { |
| 43 |
require_once dirname( __FILE__ ) . '/vendor/freemius/start.php'; |
| 44 |
} else { |
| 45 |
require_once dirname( __FILE__ ) . '/vendor/freemius-lite/start.php'; |
| 46 |
} |
| 47 |
$apbConfig = [ |
| 48 |
'id' => '17727', |
| 49 |
'slug' => 'info-cards', |
| 50 |
'type' => 'plugin', |
| 51 |
'public_key' => 'pk_a98bc1d71dc1e0a8bf0aede3af3e0', |
| 52 |
'is_premium' => false, |
| 53 |
'premium_suffix' => 'Pro', |
| 54 |
'has_premium_version' => true, |
| 55 |
'has_addons' => false, |
| 56 |
'has_paid_plans' => true, |
| 57 |
'trial' => [ |
| 58 |
'days' => 7, |
| 59 |
'is_require_payment' => false, |
| 60 |
], |
| 61 |
'menu' => [ |
| 62 |
'slug' => 'info-cards-dashboard', |
| 63 |
'first-path' => 'admin.php?page=info-cards-dashboard#/welcome', |
| 64 |
'support' => false, |
| 65 |
], |
| 66 |
]; |
| 67 |
$info_cards_fs = ( INFO_CARDS_PRO ? fs_dynamic_init( $apbConfig ) : fs_lite_dynamic_init( $apbConfig ) ); |
| 68 |
} |
| 69 |
return $info_cards_fs; |
| 70 |
} |
| 71 |
|
| 72 |
info_cards_fs(); |
| 73 |
do_action( 'info_cards_fs_loaded' ); |
| 74 |
} |
| 75 |
if ( INFO_CARDS_PRO ) { |
| 76 |
require_once ICB_DIR_PATH . 'includes/LicenseActivation.php'; |
| 77 |
} |
| 78 |
require_once ICB_DIR_PATH . 'includes/utility/functions.php'; |
| 79 |
require_once ICB_DIR_PATH . 'includes/rootPlugin/plugin.php'; |
| 80 |
// ----------------------------------------------------------------------- |
| 81 |
// Plugin action links |
| 82 |
// ----------------------------------------------------------------------- |
| 83 |
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), function ( $links ) { |
| 84 |
if ( !is_array( $links ) ) { |
| 85 |
$links = []; |
| 86 |
} |
| 87 |
$dashboard_link = '<a href="' . admin_url( 'admin.php?page=info-cards-dashboard' ) . '" style="color:#f18500;font-weight:bold;">Help And Demo</a>'; |
| 88 |
array_unshift( $links, $dashboard_link ); |
| 89 |
return $links; |
| 90 |
} ); |
| 91 |
} |