| 1 |
<?php |
| 2 |
/** |
| 3 |
* Library for admin settings |
| 4 |
* |
| 5 |
* @package WordPress |
| 6 |
* @author David Perez <david@closemarketing.es> |
| 7 |
* @copyright 2019 Closemarketing |
| 8 |
* @version 1.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
defined( 'ABSPATH' ) || exit; |
| 12 |
|
| 13 |
/** |
| 14 |
* Library for WooCommerce Settings |
| 15 |
* |
| 16 |
* Settings in order to sync products |
| 17 |
* |
| 18 |
* @package WordPress |
| 19 |
* @author David Perez <david@closemarketing.es> |
| 20 |
* @copyright 2019 Closemarketing |
| 21 |
* @version 0.1 |
| 22 |
*/ |
| 23 |
class FORMSCRM_Admin { |
| 24 |
|
| 25 |
/** |
| 26 |
* Construct of class |
| 27 |
*/ |
| 28 |
public function __construct() { |
| 29 |
add_action( 'admin_menu', array( $this, 'add_plugin_page' ) ); |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
/** |
| 34 |
* Adds plugin page. |
| 35 |
* |
| 36 |
* @return void |
| 37 |
*/ |
| 38 |
public function add_plugin_page() { |
| 39 |
|
| 40 |
add_menu_page( |
| 41 |
__( 'FormsCRM', 'formscrm' ), |
| 42 |
__( 'FormsCRM', 'formscrm' ), |
| 43 |
'manage_options', |
| 44 |
'formscrm', |
| 45 |
array( $this, 'create_admin_page' ), |
| 46 |
'dashicons-table-col-after', |
| 47 |
99 |
| 48 |
); |
| 49 |
} |
| 50 |
|
| 51 |
/** |
| 52 |
* Create admin page. |
| 53 |
* |
| 54 |
* @return void |
| 55 |
*/ |
| 56 |
public function create_admin_page() { |
| 57 |
?> |
| 58 |
<div class="wrap"> |
| 59 |
<h2><?php esc_html_e( 'Page information for FormsCRM', 'formscrm' ); ?></h2> |
| 60 |
<p></p> |
| 61 |
<p><strong><?php esc_html_e( 'Forms supported:', 'formscrm' ); ?></strong></p> |
| 62 |
<ul> |
| 63 |
<li><?php esc_html_e( 'GravityForms', 'formscrm' ); ?></li> |
| 64 |
</ul> |
| 65 |
<p><strong><?php esc_html_e( 'CRMs supported:', 'formscrm' ); ?></strong></p> |
| 66 |
<ul> |
| 67 |
<li>Holded</li> |
| 68 |
<li>Odoo (premium)</li> |
| 69 |
</ul> |
| 70 |
</div> |
| 71 |
<?php |
| 72 |
} |
| 73 |
|
| 74 |
} |
| 75 |
if ( is_admin() ) { |
| 76 |
$formscrm_admin = new FORMSCRM_Admin(); |
| 77 |
} |
| 78 |
|