示例#1
2
/**
 * Enqueue scripts and styles.
 *
 * @since Twenty Fifteen 1.0
 */
function montkailash_scripts()
{
    // Load our main stylesheet.
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');
    wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css');
    wp_enqueue_style('lightbox-style', get_template_directory_uri() . '/css/lightbox.css');
    wp_enqueue_style('montkailash-style', get_stylesheet_uri());
    if (is_page('Contact')) {
        wp_register_script('gmap', "http://maps.google.com/maps/api/js?sensor=true", '', '', true);
        wp_enqueue_script('gmap');
        wp_enqueue_script('gmaps', get_template_directory_uri() . '/js/gmaps.js', array('jquery'), '', true);
        wp_enqueue_script('function-map', get_template_directory_uri() . '/js/function_map.js', array('jquery'), '0.1', true);
    }
    if (!is_admin()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", '', '1.8.3', true);
        wp_enqueue_script('jquery');
        wp_deregister_script('wonderplugin-slider-skins-script');
        wp_deregister_script('wonderplugin-slider-script');
        wp_deregister_script('wonderplugin-slider-creator-script');
        wp_deregister_script('woo-vou-public-script');
        wp_register_script('wonderplugin-slider-skins-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginsliderskins.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginslider.js', array('jquery'), '4.9', true);
        wp_register_script('wonderplugin-slider-creator-script', plugins_url() . '/wonderplugin-slider/app/wonderplugin-slider-creator.js', array('jquery'), '4.9', true);
        wp_register_script('woo-vou-public-script', plugins_url() . '/woocommerce-pdf-vouchers/includes/js/woo-vou-public.js', array('jquery'), '2.4.4', true);
        wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150330', true);
        wp_enqueue_script('lightbox', get_template_directory_uri() . '/js/lightbox.js', array('jquery'), '2.8.1', true);
        wp_enqueue_script('montkailash-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '0.1', true);
    }
}
 /**
  * Constructor.
  *
  *
  */
 public function __construct()
 {
     $this->plugin_url = plugins_url('/', __FILE__);
     $this->plugin_path = plugin_dir_path(__FILE__);
     $this->load_language('script-manager');
     add_action('plugins_loaded', array($this, 'init'));
 }
示例#3
0
 /**
  * Define Meta Slider constants
  */
 private function define_constants()
 {
     define('METASLIDER_VERSION', $this->version);
     define('METASLIDER_BASE_URL', trailingslashit(plugins_url('ml-slider')));
     define('METASLIDER_ASSETS_URL', trailingslashit(METASLIDER_BASE_URL . 'assets'));
     define('METASLIDER_PATH', plugin_dir_path(__FILE__));
 }
function serverinfo_scripts_admin($hook_suffix)
{
    $serverinfo_admin_pages = array('dashboard_page_wp-serverinfo/wp-serverinfo');
    if (in_array($hook_suffix, $serverinfo_admin_pages)) {
        wp_enqueue_script('wp-serverinfo', plugins_url('wp-serverinfo/serverinfo-js.js'), array('jquery'), '1.60', true);
    }
}
示例#5
0
function dr_create_menu()
{
    // create top-level menu
    add_menu_page('DR Redirect', 'DR Redirect', 'administrator', __FILE__, 'dr_settings_page', plugins_url('/images/icon.png', __FILE__));
    // call register settings function
    add_action('admin_init', 'dr_register_settings');
}
function show_theme_calendar()
{
    ?>

    
 
<div class="updated" style="font-size: 14px; color:red !important"><p><strong><a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;"> This feature is disabled for the non-commercial version.</a></strong></p></div>
   <table width="95%">
                <tr>
        <td width="100%" style="font-size:14px; font-weight:bold"><a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">User Manual</a><br>
This section allows you to create/edit themes for the calendars.<br /> This feature is disabled for
the non-commercial version. <a href="http://web-dorado.com/step-4-adding-themes/spider-calendar-wordpress-guide-step-4-1.html" target="_blank" style="color:blue; text-decoration:none;">More...</a>
<br />
Here are some examples of 11 standard templates included in the commercial version.<a href="http://wpdemo.web-dorado.com/spider-calendar/" target="_blank" style="color:blue; text-decoration:none;">Demo</a></td>
            <td colspan="7" align="right" style="font-size:16px;">
              <a href="http://web-dorado.com/files/fromSpiderCalendarWP.php" target="_blank" style="color:red; text-decoration:none;">
            <img src="<?php 
    echo plugins_url('images/header.png', __FILE__);
    ?>
" border="0" alt="http://web-dorado.com/files/fromSpiderCalendarWP.php" width="215"><br>
            Get the full version&nbsp;&nbsp;&nbsp;&nbsp;
            </a>
 			 </td>
   			</tr>
            </table>

<br /><br />
<img src="<?php 
    echo plugins_url('images/calendar_widjet_theme.jpg', __FILE__);
    ?>
" />
<?php 
}
示例#7
0
 /**
  * Constructor for the gateway.
  *
  * @access public
  * @return void
  */
 public function __construct()
 {
     $this->id = 'ecpay';
     $this->icon = apply_filters('woocommerce_ecpay_icon', plugins_url('icon/green_log_40.gif', __FILE__));
     $this->has_fields = false;
     $this->method_title = __('ecpay', 'woocommerce');
     // Load the form fields.
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Define user set variables
     $this->title = $this->settings['title'];
     $this->description = $this->settings['description'];
     $this->mer_id = $this->settings['mer_id'];
     $this->check_code = $this->settings['check_code'];
     $this->notify_url = trailingslashit(home_url());
     $this->gateway = "https://ecpay.com.tw/form_Sc_to5.php";
     // Actions
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     add_action('woocommerce_thankyou_ecpay', array($this, 'thankyou_page'));
     //需與id名稱大小寫相同
     add_action('woocommerce_receipt_ecpay', array($this, 'receipt_page'));
     //add_action('init', array(&$this, 'check_ecpay_response'));
     // Customer Emails
     //add_action('woocommerce_email_before_order_table', array(&$this, 'email_instructions'), 10, 2);
 }
/**
 * Loads the scripts required for the settings page
 */
function genesis_responsive_slider_settings_scripts()
{
    wp_enqueue_script('common');
    wp_enqueue_script('wp-lists');
    wp_enqueue_script('postbox');
    wp_enqueue_script('genesis_responsive_slider_admin_scripts', plugins_url('js/admin.js', __FILE__), array('jquery'), GENESIS_RESPONSIVE_SLIDER_VERSION, TRUE);
}
 /**
  * defines constants
  * may be overriden by a plugin if set before plugins_loaded, 1
  *
  * @since 1.6
  */
 public static function define_constants()
 {
     // our url. Don't use WP_PLUGIN_URL http://wordpress.org/support/topic/ssl-doesnt-work-properly
     if (!defined('POLYLANG_URL')) {
         define('POLYLANG_URL', plugins_url('', POLYLANG_FILE));
     }
     // default url to access user data such as custom flags
     if (!defined('PLL_LOCAL_URL')) {
         define('PLL_LOCAL_URL', content_url('/polylang'));
     }
     // cookie name. no cookie will be used if set to false
     if (!defined('PLL_COOKIE')) {
         define('PLL_COOKIE', 'pll_language');
     }
     // avoid loading polylang admin for frontend ajax requests
     // special test for plupload which does not use jquery ajax and thus does not pass our ajax prefilter
     // special test for customize_save done in frontend but for which we want to load the admin
     if (!defined('PLL_AJAX_ON_FRONT')) {
         $in = isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('upload-attachment', 'customize_save'));
         define('PLL_AJAX_ON_FRONT', defined('DOING_AJAX') && DOING_AJAX && empty($_REQUEST['pll_ajax_backend']) && !$in);
     }
     // admin
     if (!defined('PLL_ADMIN')) {
         define('PLL_ADMIN', defined('DOING_CRON') || is_admin() && !PLL_AJAX_ON_FRONT);
     }
     // settings page whatever the tab
     if (!defined('PLL_SETTINGS')) {
         define('PLL_SETTINGS', is_admin() && (isset($_GET['page']) && 'mlang' == $_GET['page'] || !empty($_REQUEST['pll_ajax_settings'])));
     }
 }
示例#10
0
 public function enqueue_checkout_settings_js()
 {
     if (isset($_GET['tab']) && $_GET['tab'] == 'checkout') {
         wp_enqueue_script('pay4pay_settings_checkout', plugins_url('/js/pay4pay-settings-checkout.js', dirname(__FILE__)), array('woocommerce_admin'));
         wp_enqueue_style('pay4pay_settings_checkout', plugins_url('/css/pay4pay-settings-checkout.css', dirname(__FILE__)), array());
     }
 }
 public function __construct()
 {
     $this->id = 'tbz_voguepay_gateway';
     $this->icon = apply_filters('woocommerce_vogueway_icon', plugins_url('assets/pay-via-voguepay.png', __FILE__));
     $this->has_fields = false;
     $this->order_button_text = 'Make Payment';
     $this->payment_url = 'https://voguepay.com/pay/';
     $this->notify_url = WC()->api_request_url('WC_Tbz_Voguepay_Gateway');
     $this->method_title = 'VoguePay Payment Gateway';
     $this->method_description = 'VoguePay Payment Gateway allows you to receive Mastercard, Verve Card and Visa Card Payments On your Woocommerce Powered Site.';
     // Load the form fields.
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Define user set variables
     $this->title = $this->get_option('title');
     $this->description = $this->get_option('description');
     $this->voguePayMerchantId = $this->get_option('voguePayMerchantId');
     $this->storeId = $this->get_option('storeId');
     //Actions
     add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
     // Payment listener/API hook
     add_action('woocommerce_api_wc_tbz_voguepay_gateway', array($this, 'check_voguepay_response'));
     // Check if the gateway can be used
     if (!$this->is_valid_for_use()) {
         $this->enabled = false;
     }
 }
 public function route()
 {
     wp_enqueue_script('wpProQuiz_front_javascript', plugins_url('js/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.js', WPPROQUIZ_FILE), array('jquery', 'jquery-ui-sortable'), WPPROQUIZ_VERSION);
     wp_localize_script('wpProQuiz_front_javascript', 'WpProQuizGlobal', array('ajaxurl' => admin_url('admin-ajax.php'), 'loadData' => __('Loading', 'wp-pro-quiz'), 'questionNotSolved' => __('You must answer this question.', 'wp-pro-quiz'), 'questionsNotSolved' => __('You must answer all questions before you can completed the quiz.', 'wp-pro-quiz'), 'fieldsNotFilled' => __('All fields have to be filled.', 'wp-pro-quiz')));
     wp_enqueue_style('wpProQuiz_front_style', plugins_url('css/wpProQuiz_front' . (WPPROQUIZ_DEV ? '' : '.min') . '.css', WPPROQUIZ_FILE), array(), WPPROQUIZ_VERSION);
     $this->showAction($_GET['id']);
 }
示例#13
0
/**
 * Plugin Name: WP-API Client JS
 */
function json_api_client_js()
{
    $scripts = wp_scripts();
    $src = plugins_url('build/js/wp-api.js', __FILE__);
    if (isset($scripts->registered['wp-api'])) {
        $scripts->registered['wp-api']->src = $src;
    } else {
        wp_register_script('wp-api', $src, array('jquery', 'underscore', 'backbone'), '1.0', true);
    }
    /**
     * @var \WP_REST_Server $wp_rest_server
     */
    global $wp_rest_server;
    if (empty($wp_rest_server)) {
        /** This filter is documented in wp-includes/rest-api.php */
        $wp_rest_server_class = apply_filters('wp_rest_server_class', 'WP_REST_Server');
        $wp_rest_server = new $wp_rest_server_class();
        /** This filter is documented in wp-includes/rest-api.php */
        do_action('rest_api_init', $wp_rest_server);
    }
    $schema_request = new WP_REST_Request('GET', '/wp/v2');
    $schema_response = $wp_rest_server->dispatch($schema_request);
    $schema = null;
    if (!$schema_response->is_error()) {
        $schema = $schema_response->get_data();
    }
    $settings = array('root' => esc_url_raw(get_rest_url()), 'nonce' => wp_create_nonce('wp_rest'), 'versionString' => 'wp/v2/', 'schema' => $schema);
    wp_localize_script('wp-api', 'wpApiSettings', $settings);
}
 /**
  * __construct function.
  *
  * @access public
  * @return void
  * @since 1.0.0
  */
 public function __construct($file)
 {
     // Default values
     $this->plugin_url = trailingslashit(plugins_url('', $file));
     $this->plugin_path = plugin_dir_path($file);
     $this->token = 'sensei-certificate-templates';
     // Setup post type
     add_action('init', array($this, 'setup_certificate_templates_post_type'), 110);
     /**
      * FRONTEND
      */
     add_action('sensei_additional_styles', array($this, 'enqueue_styles'));
     /**
      * BACKEND
      */
     if (is_admin()) {
         // Admin section
         include $this->plugin_path . 'admin/woothemes-sensei-certificate-templates-admin-init.php';
         // Custom Write Panel Columns
         add_filter('manage_edit-course_columns', array($this, 'add_column_headings'), 11, 1);
         add_action('manage_posts_custom_column', array($this, 'add_column_data'), 11, 2);
     }
     // End If Statement
     // Preview Template
     add_filter('single_template', array($this, 'certificate_templates_locate_preview_template'));
 }
示例#15
0
文件: acf.php 项目: agentfitz/thb
 function Acf()
 {
     // vars
     $this->path = plugin_dir_path(__FILE__);
     $this->dir = plugins_url('', __FILE__);
     $this->version = '3.5.0';
     $this->upgrade_version = '3.4.1';
     // this is the latest version which requires an upgrade
     $this->cache = array();
     // basic array cache to hold data throughout the page load
     // set text domain
     load_plugin_textdomain('acf', false, basename(dirname(__FILE__)) . '/lang');
     // controllers
     $this->setup_controllers();
     // actions
     add_action('init', array($this, 'init'));
     add_filter('post_updated_messages', array($this, 'post_updated_messages'));
     add_filter('manage_edit-acf_columns', array($this, 'acf_columns_filter'));
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('admin_head', array($this, 'admin_head'));
     add_action('acf_save_post', array($this, 'acf_save_post'), 10);
     // save post, called from many places (api, input, everything, options)
     // ajax
     add_action('wp_ajax_get_input_metabox_ids', array($this, 'get_input_metabox_ids'));
     return true;
 }
 /**
  * Enqueue install assets
  *
  * @since  1.0.0
  * @access public
  */
 public function enqueue_install_assets()
 {
     global $wp_scripts;
     wp_enqueue_style('rp4wp-install-css', plugins_url('/assets/css/install.css', RP4WP::get_plugin_file()));
     wp_enqueue_script('rp4wp-install-js', plugins_url('/assets/js/install' . (!SCRIPT_DEBUG ? '.min' : '') . '.js', RP4WP::get_plugin_file()), array('jquery', 'jquery-ui-core', 'jquery-ui-progressbar'));
     wp_enqueue_style('jquery-ui-smoothness', "http://ajax.googleapis.com/ajax/libs/jqueryui/" . $wp_scripts->query('jquery-ui-core')->ver . "/themes/smoothness/jquery-ui.css", false, null);
 }
function rsttst_load_styles()
{
    if (!is_admin()) {
        wp_enqueue_style('rest-styles', plugins_url('assets/rest-styles.css', __FILE__));
        wp_enqueue_script('rest-scripts', plugins_url('assets/rest-scripts.js', __FILE__), array('jquery'), 1.0);
    }
}
示例#18
0
 public function admin_plugin_url()
 {
     if ($this->admin_plugin_url) {
         return $this->admin_plugin_url;
     }
     return $this->admin_plugin_url = untrailingslashit(plugins_url('/', __FILE__));
 }
function clbc_meta_box_callback($post, $box)
{
    ?>
	<table id="clbc-comments">
		<tbody>
			<?php 
    clbc_print_comments($post->ID);
    ?>
		</tbody>
	</table>
	<div id="clbc-form">
		<textarea class="clbc-textarea"></textarea>
		<input type="hidden" class="clbc-post-id" value="<?php 
    echo $post->ID;
    ?>
" />
		<button class="clbc-add-button button" type="button">Add Comment</button>
		<?php 
    if (current_user_can('moderate_comments')) {
        ?>
<button class="clbc-delete-all-button button" type="button">Delete All</button><?php 
    }
    ?>
		<img src="<?php 
    echo plugins_url('img/loading.gif', __FILE__);
    ?>
" id="clbc-loading-img" />
	</div>
<?php 
}
 function plugin_url()
 {
     if ($this->plugin_url) {
         return $this->plugin_url;
     }
     return $this->plugin_url = plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__));
 }
 /**
  * Enqueue required global styles and scirpts
  *
  * @access public
  * @since  0.0.0
  *
  * @see  wp_enqueue_style()
  *
  * @return void
  */
 public function enqueue_global_scripts()
 {
     //enqueue styles
     wp_enqueue_style('wfg-styles', plugins_url('/css/wfg-styles.css', dirname(__FILE__)));
     //enqueue scripts
     wp_enqueue_script('wfg-scripts', plugins_url('/js/wfg-scripts.js', dirname(__FILE__)), array('jquery'));
 }
示例#22
0
 /**
  * Constructor - get the plugin hooked in and ready
  */
 public function __construct()
 {
     // Define constants
     define('JOB_MANAGER_VERSION', '1.23.9');
     define('JOB_MANAGER_PLUGIN_DIR', untrailingslashit(plugin_dir_path(__FILE__)));
     define('JOB_MANAGER_PLUGIN_URL', untrailingslashit(plugins_url(basename(plugin_dir_path(__FILE__)), basename(__FILE__))));
     // Includes
     include 'includes/class-wp-job-manager-install.php';
     include 'includes/class-wp-job-manager-post-types.php';
     include 'includes/class-wp-job-manager-ajax.php';
     include 'includes/class-wp-job-manager-shortcodes.php';
     include 'includes/class-wp-job-manager-api.php';
     include 'includes/class-wp-job-manager-forms.php';
     include 'includes/class-wp-job-manager-geocode.php';
     include 'includes/class-wp-job-manager-cache-helper.php';
     if (is_admin()) {
         include 'includes/admin/class-wp-job-manager-admin.php';
     }
     // Init classes
     $this->forms = new WP_Job_Manager_Forms();
     $this->post_types = new WP_Job_Manager_Post_Types();
     // Activation - works with symlinks
     register_activation_hook(basename(dirname(__FILE__)) . '/' . basename(__FILE__), array($this, 'activate'));
     // Switch theme
     add_action('after_switch_theme', array('WP_Job_Manager_Ajax', 'add_endpoint'), 10);
     add_action('after_switch_theme', array($this->post_types, 'register_post_types'), 11);
     add_action('after_switch_theme', 'flush_rewrite_rules', 15);
     // Actions
     add_action('after_setup_theme', array($this, 'load_plugin_textdomain'));
     add_action('after_setup_theme', array($this, 'include_template_functions'), 11);
     add_action('widgets_init', array($this, 'widgets_init'));
     add_action('wp_enqueue_scripts', array($this, 'frontend_scripts'));
     add_action('admin_init', array($this, 'updater'));
 }
示例#23
0
 /**
  * Enqueue script to improve admin UI
  */
 public function admin_scripts($hook)
 {
     // This is still 'widgets.php' when managing widgets via the Customizer.
     if ('widgets.php' === $hook) {
         wp_enqueue_script('twitter-timeline-admin', plugins_url('twitter-timeline-admin.js', __FILE__));
     }
 }
function woo_warp_side_cart()
{
    ?>

 <link rel="stylesheet" type="text/css" href="<?php 
    echo '' . plugins_url('css/style.css', __FILE__) . '';
    ?>
">

    <div class="side-cart uk-panel uk-panel-box uk-panel-box-secondary"> 
        <span  class="ww-cart-icon side-cart uk-panel uk-panel-box uk-panel-box-primary">
            <span class="uk-icon-shopping-cart"></span>
        </span>
        <p>
            <?php 
    echo sprintf(_n('%d item', '%d items', WC()->cart->cart_contents_count), WC()->cart->cart_contents_count);
    ?>
 
                <br /> 
            <?php 
    echo WC()->cart->get_cart_total();
    ?>
        </p>
        <a class="uk-button uk-button-mini uk-width-1-1 uk-button-primary" href="<?php 
    echo WC()->cart->get_cart_url();
    ?>
" title="<?php 
    _e('View Cart');
    ?>
">View Cart</a>
    </div> 
<?php 
}
示例#25
0
function easymedia_frontend_prop()
{
    $boxstyle = EASYMEDG_PLUGIN_URL . 'css/styles/mediabox';
    echo "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen,projection\" href=\"{$boxstyle}/Light.css\" />\n";
    ob_start();
    ?>

<!-- Easy Media Gallery Lite START (version <?php 
    echo EASYMEDIA_VERSION;
    ?>
)-->       
    
    <script type="text/javascript">
	/*<![CDATA[*/
	/* Easy Media Gallery */
    jQuery(document).ready(function($) {	
		var add = "easymedia";
jQuery('.da-thumbs a[rel!="easymedia"]').attr('rel', function (i, old) {
    return old ? old + ' ' + add : add; });		
    });
    /*]]>*/</script>

    <!--[if lt IE 9]>
<script src="<?php 
    echo plugins_url('js/func/html5.js', __FILE__);
    ?>
" type="text/javascript"></script>
<![endif]-->  


<!-- Easy Media Gallery Lite  END  -->   
    
	<?php 
    echo ob_get_clean();
}
 function regplugins($plgs)
 {
     foreach ($this->shortcodes as &$shortcode) {
         $plgs['els_' . $shortcode] = plugins_url('js/plugins/' . $shortcode . '.js', __FILE__);
     }
     return $plgs;
 }
示例#27
0
/**
 * bp_core_admin_menu_icon_css()
 *
 * Add a hover-able icon to the "BuddyPress" nxt-admin area menu.
 *
 * @package BuddyPress Core
 */
function bp_core_admin_menu_icon_css()
{
    global $bp;
    ?>

	<style type="text/css">
		/* Wizard Icon */
		ul#adminmenu li.toplevel_page_bp-wizard .nxt-menu-image a img { display: none; }
		ul#adminmenu li.toplevel_page_bp-wizard .nxt-menu-image a { background-image: url( <?php 
    echo plugins_url('buddypress/bp-core/images/admin_menu_icon.png');
    ?>
 ) !important; background-position: -1px -32px; }
		ul#adminmenu li.toplevel_page_bp-wizard:hover .nxt-menu-image a,
		ul#adminmenu li.toplevel_page_bp-wizard.nxt-has-current-submenu .nxt-menu-image a {
			background-position: -1px 0;
		}

		/* Settings Icon */
		ul#adminmenu li.toplevel_page_bp-general-settings .nxt-menu-image a img { display: none; }
		ul#adminmenu li.toplevel_page_bp-general-settings .nxt-menu-image a { background-image: url( <?php 
    echo plugins_url('buddypress/bp-core/images/admin_menu_icon.png');
    ?>
 ) !important; background-position: -1px -32px; }
		ul#adminmenu li.toplevel_page_bp-general-settings:hover .nxt-menu-image a,
		ul#adminmenu li.toplevel_page_bp-general-settings.nxt-has-current-submenu .nxt-menu-image a {
			background-position: -1px 0;
		}
	</style>

<?php 
}
示例#28
0
 function __construct()
 {
     $this->id = 'eway';
     $this->method_title = __('eWAY (AU)', 'woothemes');
     $this->icon = plugins_url('images/eway_icon.png', __FILE__);
     $this->has_fields = true;
     $this->testid = "87654321";
     $this->antifraudurl = 'https://www.eway.com.au/gateway_cvn/xmlbeagle.asp';
     $this->liveurl = 'https://www.eway.com.au/gateway_cvn/xmlpayment.asp';
     $this->testurl = 'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp';
     $this->currency = get_option('woocommerce_currency');
     $this->avaiable_card_types = array("Visa" => array("icon" => plugins_url('images/card_visa.png', __FILE__)), "MasterCard" => array("icon" => plugins_url('images/card_mastercard.png', __FILE__)), "AmEx" => array("icon" => plugins_url('images/card_amex.png', __FILE__)), "Diners" => array("icon" => plugins_url('images/card_diners.png', __FILE__)), "JCB" => array("icon" => plugins_url('images/card_jcb.png', __FILE__)));
     // Load the form fields
     $this->init_form_fields();
     // Load the settings.
     $this->init_settings();
     // Get setting values
     $this->title = $this->settings['title'];
     $this->description = $this->settings['description'];
     $this->enabled = $this->settings['enabled'];
     $this->testmode = $this->settings['testmode'];
     $this->antifraud = $this->settings['antifraud'];
     $this->customer_id = $this->testmode == "yes" ? $this->testid : $this->settings['customer_id'];
     // Hooks
     add_action('admin_notices', array(&$this, 'ssl_check'));
     add_action('woocommerce_update_options_payment_gateways', array(&$this, 'process_admin_options'));
     add_action('wp_head', array(&$this, 'checkout_css_styles'));
 }
 function admin_google_font_scripts()
 {
     wp_register_script('ultimate-google-fonts-script', plugins_url("../admin/js/google-fonts-admin.js", __FILE__), array('jquery'));
     wp_enqueue_script('ultimate-google-fonts-script');
     wp_register_style('ultimate-google-fonts-style', plugins_url("../admin/css/google-fonts-admin.css", __FILE__));
     wp_enqueue_style('ultimate-google-fonts-style');
 }
示例#30
0
 /**
  * Instantiates Env Manager object
  * 
  */
 protected function __construct()
 {
     $uploads_data = wp_upload_dir();
     $template_url = get_bloginfo('template_url');
     // Instantiate paths collection object
     $this->__urls = new Collection(array('home' => home_url(), 'admin' => admin_url(), 'plugins' => plugins_url(), 'content' => content_url(), 'uploads' => $uploads_data['baseurl'], 'themes' => str_replace('/' . basename($template_url), '', $template_url), 'theme' => $template_url));
 }