| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
?> |
| 6 |
|
| 7 |
<div class="wrap propertyhive"> |
| 8 |
<form method="post" id="mainform" action="" enctype="multipart/form-data"> |
| 9 |
<div class="icon32 icon32-propertyhive-settings" id="icon-propertyhive"><br /></div><h2 class="nav-tab-wrapper"> |
| 10 |
<?php |
| 11 |
foreach ( $tabs as $name => $label ) |
| 12 |
echo '<a href="' . esc_url(admin_url( 'admin.php?page=ph-settings&tab=' . $name )) . '" class="nav-tab nav-tab-' . esc_attr(sanitize_title($name)) . ' ' . ( $current_tab == $name ? 'nav-tab-active' : '' ) . '">' . esc_html($label) . '</a>'; |
| 13 |
|
| 14 |
do_action( 'propertyhive_settings_tabs' ); |
| 15 |
?> |
| 16 |
</h2> |
| 17 |
|
| 18 |
<?php |
| 19 |
do_action( 'propertyhive_sections_' . $current_tab ); |
| 20 |
do_action( 'propertyhive_settings_' . $current_tab ); |
| 21 |
do_action( 'propertyhive_settings_tabs_' . $current_tab ); // @deprecated hook |
| 22 |
?> |
| 23 |
|
| 24 |
<p class="submit"> |
| 25 |
<?php |
| 26 |
if ( ! isset( $GLOBALS['hide_save_button'] ) ) |
| 27 |
{ |
| 28 |
$button_text = __( 'Save changes', 'propertyhive' ); |
| 29 |
if ( isset( $GLOBALS['save_button_text'] ) && ! empty( $GLOBALS['save_button_text'] ) ) |
| 30 |
{ |
| 31 |
$button_text = $GLOBALS['save_button_text']; |
| 32 |
} |
| 33 |
?> |
| 34 |
<button name="save" class="button-primary" type="submit" value="<?php echo esc_attr($button_text); ?>"><?php echo esc_html($button_text); ?></button> |
| 35 |
<?php |
| 36 |
} |
| 37 |
?> |
| 38 |
<?php |
| 39 |
if ( isset( $GLOBALS['show_cancel_button'] ) && $GLOBALS['show_cancel_button'] === TRUE ) |
| 40 |
{ |
| 41 |
$cancel_href = 'javascript:history.go(-1);'; |
| 42 |
if ( isset( $GLOBALS['cancel_button_href'] ) && ! empty( $GLOBALS['cancel_button_href'] ) ) |
| 43 |
{ |
| 44 |
$cancel_href = $GLOBALS['cancel_button_href']; |
| 45 |
} |
| 46 |
?> |
| 47 |
<a href="<?php echo esc_url($cancel_href); ?>" class="button"><?php echo esc_html(__( 'Cancel', 'propertyhive' )); ?></a> |
| 48 |
<?php |
| 49 |
} |
| 50 |
?> |
| 51 |
<input type="hidden" name="subtab" id="last_tab" /> |
| 52 |
<input type="hidden" name="redirect" value="<?php echo esc_url( !empty($redirect_after_save) ? $redirect_after_save : '' ); ?>"> |
| 53 |
<?php wp_nonce_field( 'propertyhive-settings' ); ?> |
| 54 |
</p> |
| 55 |
</form> |
| 56 |
</div> |