106 lines
2.9 KiB
PHP
106 lines
2.9 KiB
PHP
<?php
|
|
/**
|
|
* Provide a settings page view for the plugin
|
|
*
|
|
* This file is used to markup the admin-facing aspects of the plugin.
|
|
*
|
|
* @link https://chykalophia.com/woocommerce-direct-links
|
|
* @since 0.1.0
|
|
*
|
|
* @package Woocommerce_Direct_Links
|
|
* @subpackage Woocommerce_Direct_Links/admin/partials
|
|
*/
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit();
|
|
}
|
|
|
|
?>
|
|
<div class="wrap">
|
|
<h1>
|
|
<?php
|
|
settings_errors( 'urlshortener_messages' );
|
|
echo esc_html( get_admin_page_title() );
|
|
?>
|
|
</h1>
|
|
<div id="cklph-wdl-reply" class=""></div>
|
|
<div class="tab-content">
|
|
|
|
<!-- Bulk Refresh Button -->
|
|
<button class="button button-primary cklph-wdl-bulk" type="button" id="cklph-wdl-bulk-btn" onclick="cklph_wdl_bulk_rest()" >
|
|
<span class="cklph-wdl-btn-text"><?php esc_html_e( 'Refresh All Links', 'woocommerce-direct-links' ); ?></span>
|
|
</button>
|
|
|
|
<?php
|
|
// setting field.
|
|
settings_fields( 'cklph-wdl-option-group' );
|
|
// output settings section.
|
|
do_settings_sections( 'cklph-wdl-settings' );
|
|
?>
|
|
<div id="tab-tinyurl" class="tab-pane">
|
|
<?php
|
|
|
|
// tinyurl setting field.
|
|
settings_fields( 'cklph-wdl-tinyurl-group' );
|
|
|
|
// output tinyurl settings section.
|
|
do_settings_sections( 'cklph-wdl-tinyurl-settings' );
|
|
|
|
?>
|
|
<button class="button button-primary" type="button" id="tinyurl-save-btn" onclick="cklph_wdl_setup_tinyurl()" >
|
|
<span class="cklph-wdl-btn-text">
|
|
<?php esc_html_e( 'Save Settings', 'woocommerce-direct-links' ); ?>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
<div id="tab-bitly" class="tab-pane ">
|
|
<?php
|
|
|
|
// setting field.
|
|
settings_fields( 'cklph-wdl-bitly-group' );
|
|
|
|
// output settings section.
|
|
do_settings_sections( 'cklph-wdl-bitly-settings' );
|
|
|
|
?>
|
|
<button class="button button-primary" type="button" id="bitly-save-btn" onclick="cklph_wdl_setup_bitly()" >
|
|
<span class="cklph-wdl-btn-text">
|
|
<?php esc_html_e( 'Save Settings', 'woocommerce-direct-links' ); ?>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
<div id="tab-yourls" class="tab-pane">
|
|
<?php
|
|
|
|
// setting field.
|
|
settings_fields( 'cklph-wdl-yourls-group' );
|
|
|
|
// output settings section.
|
|
do_settings_sections( 'cklph-wdl-yourls-settings' );
|
|
?>
|
|
|
|
<button class="button button-primary" type="button" id="yourls-save-btn" onclick="cklph_wdl_setup_yourls()" >
|
|
<span class="cklph-wdl-btn-text">
|
|
<?php esc_html_e( 'Save Settings', 'woocommerce-direct-links' ); ?>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
<div id="tab-joturl" class="tab-pane">
|
|
<?php
|
|
|
|
// setting field.
|
|
settings_fields( 'cklph-wdl-joturl-group' );
|
|
|
|
// output settings section.
|
|
do_settings_sections( 'cklph-wdl-joturl-settings' );
|
|
?>
|
|
|
|
<button class="button button-primary" type="button" id="joturl-save-btn" onclick="cklph_wdl_setup_joturl()" >
|
|
<span class="cklph-wdl-btn-text">
|
|
<?php esc_html_e( 'Save Settings', 'woocommerce-direct-links' ); ?>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|