| 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; |
| 11 |
} // Cannot access pages directly. |
| 12 |
|
| 13 |
/** |
| 14 |
* The Popup settings class. |
| 15 |
*/ |
| 16 |
class SPS_DetailSettings { |
| 17 |
|
| 18 |
/** |
| 19 |
* Popup settings section metabox. |
| 20 |
* |
| 21 |
* @param string $prefix The metabox key. |
| 22 |
* @return void |
| 23 |
*/ |
| 24 |
public static function section( $prefix ) { |
| 25 |
SP_PC::createSection( |
| 26 |
$prefix, |
| 27 |
array( |
| 28 |
'title' => __( 'Detail page Settings', 'post-carousel' ), |
| 29 |
'icon' => 'sps-icon-detail-page', |
| 30 |
'fields' => array( |
| 31 |
array( |
| 32 |
'id' => 'pcp_page_link_type', |
| 33 |
'class' => 'pcp_page_link_type', |
| 34 |
'type' => 'radio', |
| 35 |
'title' => __( 'Detail Page Link Type', 'post-carousel' ), |
| 36 |
'subtitle' => __( 'Choose a link type for the (item) detail page.', 'post-carousel' ), |
| 37 |
'options' => array( |
| 38 |
'single_page' => __( 'Single Page', 'post-carousel' ), |
| 39 |
'none' => __( 'None (no link action)', 'post-carousel' ), |
| 40 |
'popup' => __( 'Popup (Pro)', 'post-carousel' ), |
| 41 |
), |
| 42 |
'default' => 'single_page', |
| 43 |
), |
| 44 |
array( |
| 45 |
'id' => 'pcp_link_target', |
| 46 |
'type' => 'select', |
| 47 |
'title' => __( 'Target', 'post-carousel' ), |
| 48 |
'subtitle' => __( 'Set a target for the item link.', 'post-carousel' ), |
| 49 |
'options' => array( |
| 50 |
'_self' => __( 'Current Tab', 'post-carousel' ), |
| 51 |
'_blank' => __( 'New Tab', 'post-carousel' ), |
| 52 |
'_parent' => __( 'Parent', 'post-carousel' ), |
| 53 |
'_top' => __( 'Top', 'post-carousel' ), |
| 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', 'post-carousel' ), |
| 62 |
'default' => false, |
| 63 |
), |
| 64 |
array( |
| 65 |
'type' => 'notice', |
| 66 |
'content' => sprintf( |
| 67 |
/* translators: 1: start link tag, 2: close tag. */ |
| 68 |
__( 'To unlock additional amazing Popup Settings (Single, Multi, Show/Hide Popup Fields, Custom height-width and more customization options), %1$sUpgrade To Pro!%2$s', 'post-carousel' ), |
| 69 |
'<a href="https://wpsmartpost.com/pricing/?ref=1" target="_blank"><b>', |
| 70 |
'</b></a>' |
| 71 |
), |
| 72 |
'class' => 'taxonomy-ajax-filter-notice', |
| 73 |
), |
| 74 |
), // End of fields array. |
| 75 |
) |
| 76 |
); // Display settings section end. |
| 77 |
} |
| 78 |
} |
| 79 |
|