| 1 |
<?php |
| 2 |
/** |
| 3 |
* The Popup Settings Meta-box configurations. |
| 4 |
* |
| 5 |
* @package Smart_Post_Show |
| 6 |
* @subpackage Smart_Post_Show/admin |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
die; } // Cannot access pages directly. |
| 11 |
|
| 12 |
/** |
| 13 |
* The Popup settings class. |
| 14 |
*/ |
| 15 |
class SPS_DetailSettings { |
| 16 |
|
| 17 |
/** |
| 18 |
* Popup settings section metabox. |
| 19 |
* |
| 20 |
* @param string $prefix The metabox key. |
| 21 |
* @return void |
| 22 |
*/ |
| 23 |
public static function section( $prefix ) { |
| 24 |
SP_PC::createSection( |
| 25 |
$prefix, |
| 26 |
array( |
| 27 |
'title' => __( 'Detail page Settings', 'smart-post-show' ), |
| 28 |
'icon' => 'fa fa-external-link-square', |
| 29 |
'fields' => array( |
| 30 |
array( |
| 31 |
'id' => 'pcp_page_link_type', |
| 32 |
'class' => 'pcp_page_link_type', |
| 33 |
'type' => 'radio', |
| 34 |
'title' => __( 'Detail Page Link Type', 'smart-post-show' ), |
| 35 |
'subtitle' => __( 'Choose a link type for the (item) detail page.', 'smart-post-show' ), |
| 36 |
'desc' => __( 'To unlock the more amazing popup settings, <a href="https://smartpostshow.com/" target="_blank"><strong>Upgrade To Pro!</strong></a>', 'smart-post-show' ), |
| 37 |
'options' => array( |
| 38 |
'popup' => __( 'Popup (Pro)', 'smart-post-show' ), |
| 39 |
'single_page' => __( 'Single Page', 'smart-post-show' ), |
| 40 |
'none' => __( 'None (no link action)', 'smart-post-show' ), |
| 41 |
), |
| 42 |
'default' => 'single_page', |
| 43 |
), |
| 44 |
array( |
| 45 |
'id' => 'pcp_link_target', |
| 46 |
'type' => 'radio', |
| 47 |
'title' => __( 'Target', 'smart-post-show' ), |
| 48 |
'subtitle' => __( 'Set a target for the item link.', 'smart-post-show' ), |
| 49 |
'options' => array( |
| 50 |
'_self' => __( 'Current Tab', 'smart-post-show' ), |
| 51 |
'_blank' => __( 'New Tab', 'smart-post-show' ), |
| 52 |
'_parent' => __( 'Parent', 'smart-post-show' ), |
| 53 |
'_top' => __( 'Top', 'smart-post-show' ), |
| 54 |
), |
| 55 |
'default' => '_self', |
| 56 |
'dependency' => array( 'pcp_page_link_type', '==', 'single_page' ), |
| 57 |
), |
| 58 |
array( |
| 59 |
'id' => 'pcp_link_rel', |
| 60 |
'type' => 'checkbox', |
| 61 |
'title' => __( 'Add rel="nofollow" to item links', 'smart-post-show' ), |
| 62 |
'default' => 'false', |
| 63 |
), |
| 64 |
), // End of fields array. |
| 65 |
) |
| 66 |
); // Display settings section end. |
| 67 |
} |
| 68 |
} |
| 69 |
|