PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
themes
/
rehub
/
functions
<?php /** * Adds settings to the permalinks admin settings page */ if ( ! defined( 'ABSPATH' ) ) { exit; } if (!class_exists('WC_RH_Admin_Permalink_Stores')) { class WC_RH_Admin_Permalink_Stores { /** * Hook in tabs. */ public function __construct() { $this->settings_init(); $this->settings_save(); } /** * Init settings. */ public function settings_init() { add_settings_field( 'woocommerce_product_store_slug', // id __( 'Brand base', 'rehub_framework' ), // setting title array( $this, 'product_store_slug_input' ), // display callback 'permalink', // settings page 'optional' // settings section ); } /** * Show a slug input box. */ public function product_store_slug_input() { $permalinks = get_option( 'woocommerce_permalinks' ); ?> <input name="woocommerce_product_store_slug" type="text" class="regular-text code" value="<?php if ( isset( $permalinks['store_base'] ) ) echo esc_attr( $permalinks['store_base'] ); ?>" placeholder="merchants" /> <?php } /** * Save the settings. */ public function settings_save() { if ( ! is_admin() ) { return; } // We need to save the options ourselves; settings api does not trigger save for the permalinks page. if ( isset( $_POST['permalink_structure'] ) ) { $permalinks = get_option( 'woocommerce_permalinks' ); if ( ! $permalinks ) { $permalinks = array(); } $permalinks['store_base'] = wc_sanitize_permalink( trim( $_POST['woocommerce_product_store_slug'] ) ); update_option( 'woocommerce_permalinks', $permalinks ); } } } } return new WC_RH_Admin_Permalink_Stores();
[+]
..
[-] vc_functions_theme.php
[edit]
[+]
vc
[+]
vc_templates
[-] member_helper_functions.php
[edit]
[-] affiliate_functions.php
[edit]
[-] user_review_functions.php
[edit]
[-] edd_functions.php
[edit]
[-] thumbandhot.php
[edit]
[-] taxonomy_meta.php
[edit]
[-] video_class.php
[edit]
[-] review_functions.php
[edit]
[-] user_review_no_editor.php
[edit]
[-] woo_store_permalink_class.php
[edit]
[-] woo_store_taxonomy_class.php
[edit]
[-] woo_functions.php
[edit]
[-] vc_functions.php
[edit]
[-] ajax_helper_functions.php
[edit]
[-] commentplus.php
[edit]
[-] helper_functions.php
[edit]
[-] sidebar_functions.php
[edit]
[-] rehub_ajax.php
[edit]