This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
spl_autoload_register( function( $class_or_function_name ) { | |
if ( 'Hydra\\Payment_Gateway_Core' === $class_or_function_name ) { | |
include_once './class-hydra-payment-gateway-core.php'; | |
} | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'uf.setup', function(){ | |
$page = UF_Container_Options_Page::factory( __( 'Theme Options', 'td' ) ) | |
->set_icon( get_bloginfo( 'template_url' ) . '/assets/images/logo.png' ) | |
->set_position( 98 ); | |
# Add fields to the page | |
$general_fields = array( | |
UF_Field::factory( 'image_select', 'st_color_scheme', __( 'Color Scheme', 'td' ) ) | |
->add_options(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The structure below is a JavaScript/JSON object, | |
* which describes the fields of a list/options page. | |
* | |
* **IMPORTANT:** | |
* This code is formatted as JavaScript because JSON does | |
* not support comments. If all comments get stripped, the content | |
* that is left will be a well-formatted JSON format. | |
* | |
* The main difference between a JavaScript object and the JSON format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$( document ).on( 'uf_extend', function(){ | |
Field.extend( 'Email', { | |
// Initial constructor | |
initialize: function() { | |
// If you wanted to add extra functionality to the input, it would be here. | |
} | |
}); | |
}); |