| 1 |
<?php |
| 2 |
class PostXBeaverTemplate extends FLBuilderModule { |
| 3 |
|
| 4 |
public function __construct() { |
| 5 |
parent::__construct( |
| 6 |
array( |
| 7 |
'name' => __( 'PostX Template', 'ultimate-post' ), |
| 8 |
'description' => __( 'An basic example module using jQuery TwentyTwenty.', 'fl-builder' ), |
| 9 |
'category' => __( 'Basic', 'ultimate-post' ), |
| 10 |
'dir' => __DIR__, |
| 11 |
'partial_refresh' => true, |
| 12 |
'url' => plugins_url( '', __FILE__ ), |
| 13 |
) |
| 14 |
); |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
FLBuilder::register_module( |
| 20 |
'PostXBeaverTemplate', |
| 21 |
array( |
| 22 |
'general' => array( |
| 23 |
'title' => __( 'General', 'ultimate-post' ), |
| 24 |
'sections' => array( |
| 25 |
'general' => array( |
| 26 |
'title' => __( 'Template Settings', 'ultimate-post' ), |
| 27 |
'fields' => array( |
| 28 |
'template' => array( |
| 29 |
'type' => 'select', |
| 30 |
'label' => __( 'Select Your Template', 'ultimate-post' ), |
| 31 |
'default' => '', |
| 32 |
'options' => ultimate_post()->get_all_lists( 'ultp_templates' ), |
| 33 |
'multi-select' => false, |
| 34 |
), |
| 35 |
'edit_template' => array( |
| 36 |
'type' => 'raw', |
| 37 |
'label' => __( 'Edit Template', 'ultimate-post' ), |
| 38 |
'content' => '<a href="' . admin_url( 'admin.php?page=ultp-settings#saved-templates' ) . '" style="color:#fff; background-color:#0c0d0e; padding:10px 20px; border-radius:4px; display:inline-block;" target="_blank"><span style="color:#fff; font-size:12px; width:12px; height:12px;" class="dashicons dashicons-edit"></span> ' . __( 'Edit This Template', 'ultimate-post' ) . '</a>', |
| 39 |
), |
| 40 |
'add_new_template' => array( |
| 41 |
'type' => 'raw', |
| 42 |
'label' => 'Add New Template', |
| 43 |
'content' => '<a href="' . admin_url( 'post-new.php?post_type=ultp_templates' ) . '" style="color:#fff; background-color:#0c0d0e; padding:10px 20px; border-radius:4px; display:inline-block;" target="_blank"><span style="color:#fff; font-size:12px; width:12px; height:12px;" class="dashicons dashicons-plus-alt2"></span> ' . __( 'Add New Template', 'ultimate-post' ) . '</a>', |
| 44 |
), |
| 45 |
), |
| 46 |
), |
| 47 |
), |
| 48 |
), |
| 49 |
) |
| 50 |
); |
| 51 |
|