| 1 |
<?php |
| 2 |
/** |
| 3 |
* View permalink settings |
| 4 |
* |
| 5 |
* @package |
| 6 |
*/ |
| 7 |
?> |
| 8 |
<div class="settings-tab-container"> |
| 9 |
<ul class="wpfnl-general-settings-tab-nav"> |
| 10 |
<li class="inner-tab active" data-tab="tab-permalink-preference"><?php esc_html_e('Preference Link', 'wpfnl'); ?></li> |
| 11 |
<li class="inner-tab" data-tab="tab-permalink-base"><?php esc_html_e('Post Type Permalink Base', 'wpfnl'); ?></li> |
| 12 |
</ul> |
| 13 |
</div> |
| 14 |
|
| 15 |
<div class="wpfnl-tab-content active" id="tab-permalink-preference"> |
| 16 |
<div class="wpfnl-field-wrapper"> |
| 17 |
<div class="wpfnl-all-fields"> |
| 18 |
<?php |
| 19 |
$structures = [ |
| 20 |
'default' => __('Default Permalink', 'wpfnl'), |
| 21 |
'funnel-step' => __('Funnel and Step Slug', 'wpfnl'), |
| 22 |
'funnel' => __('Funnel Slug', 'wpfnl'), |
| 23 |
'step' => __('Step Slug', 'wpfnl') |
| 24 |
]; |
| 25 |
foreach ($structures as $slug => $label_title) : |
| 26 |
$id = $slug . '-permalink'; |
| 27 |
?> |
| 28 |
<div class="wpfnl-fields"> |
| 29 |
<div class="wpfnl-radiobtn"> |
| 30 |
<input type="radio" name="wpfunnels-set-permalink" id="<?php echo esc_attr($id); ?>" value="<?php echo esc_attr($slug); ?>" <?php checked($this->permalink_settings['structure'], $slug); ?> /> |
| 31 |
<label for="<?php echo esc_attr($id); ?>"> |
| 32 |
<span class="label-title"><?php echo esc_html($label_title); ?></span> |
| 33 |
<span class="label-subheading"> |
| 34 |
<?php |
| 35 |
switch ($slug) { |
| 36 |
case 'default': |
| 37 |
esc_html_e('Default WordPress Permalink', 'wpfnl'); |
| 38 |
break; |
| 39 |
case 'funnel-step': |
| 40 |
echo home_url(); ?>/<?php echo '<code class="funnelbase"></code>/%funnelname%/<code class="stepbase"></code>/%stepname%/'; |
| 41 |
break; |
| 42 |
case 'funnel': |
| 43 |
echo home_url(); ?>/<?php echo '<code class="funnelbase"></code>/%funnelname%/%stepname%/'; |
| 44 |
break; |
| 45 |
case 'step': |
| 46 |
echo home_url(); ?>/%funnelname%/<?php echo '<code class="stepbase"></code>/%stepname%/'; |
| 47 |
break; |
| 48 |
} |
| 49 |
?> |
| 50 |
</span> |
| 51 |
</label> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
<?php endforeach; ?> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
|
| 59 |
<div class="wpfnl-tab-content" id="tab-permalink-base"> |
| 60 |
<div class="wpfnl-field-wrapper parmalink-base"> |
| 61 |
<div class="wpfnl-parmalink-inputs-wrapper"> |
| 62 |
<div class="wpfnl-fields"> |
| 63 |
<label><?php esc_html_e('Funnel Base', 'wpfnl'); ?></label> |
| 64 |
<input type="text" name="wpfnl-permalink-funnel-base" id="wpfunnels-permalink-funnel-base" value="<?php echo sanitize_text_field($this->permalink_settings['funnel_base']); ?>" /> |
| 65 |
</div> |
| 66 |
|
| 67 |
<div class="wpfnl-fields"> |
| 68 |
<label><?php esc_html_e('Step Base', 'wpfnl'); ?></label> |
| 69 |
<input type="text" name="wpfnl-permalink-step-base" id="wpfunnels-permalink-step-base" value="<?php echo sanitize_text_field($this->permalink_settings['step_base']); ?>" /> |
| 70 |
</div> |
| 71 |
</div> |
| 72 |
</div> |
| 73 |
</div> |
| 74 |
<!-- /settings-box --> |
| 75 |
|