コード例 #1
0
 protected static function get_default_messages()
 {
     return array('on_activate' => array('title' => __('Greetings! Your Ecwid store is now active.', 'ecwid-shopping-cart'), 'message' => __('Take a few simple steps to complete store setup', 'ecwid-shopping-cart'), 'primary_title' => __('Set up Ecwid Store', 'ecwid-shopping-cart'), 'primary_url' => 'admin.php?page=ecwid', 'hideable' => true, 'default' => 'disabled'), 'on_storeid_set' => array('title' => __('Good job! Your store is set up and you\'re ready to sell.', 'ecwid-shopping-cart'), 'message' => __('Use the dashboard below to add products, track sales and adjust settings in your store. We also created a store page on your site and now you can fine-tune the storefront appearance.', 'ecwid-shopping-cart'), 'primary_title' => __('Visit Storefront', 'ecwid-shopping-cart'), 'primary_url' => '', 'primary_blank' => true, 'secondary_title' => __('Configure Appearance', 'ecwid-shopping-cart'), 'secondary_url' => 'admin.php?page=ecwid-appearance', 'hideable' => true), 'on_no_storeid_on_setup_pages' => array('type' => 'warning', 'title' => __('Your store is almost ready!', 'ecwid-shopping-cart'), 'message' => __('Connect your Ecwid account with this site to complete setup and start selling', 'ecwid-shopping-cart'), 'primary_title' => __('Connect Your Ecwid Store', 'ecwid-shopping-cart'), 'primary_url' => 'admin.php?page=ecwid', 'hideable' => true), 'on_appearance_widgets' => array('message' => __('To add extra functions to your store, drag and drop Ecwid store elements on your site. When you\'re done, you can get back to modifying your settings.', 'ecwid-shopping-cart'), 'secondary_title' => __('Back to Store Settings', 'ecwid-shopping-cart'), 'secondary_url' => 'admin.php?page=ecwid-appearance', 'hideable' => true), 'please_vote' => array('message' => sprintf(__('Do you like your Ecwid online store? We\'d appreciate it if you add your review and vote for the plugin on Wordpress site.', 'ecwid-shopping-cart'), 'target="_blank" href="http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart"'), 'primary_title' => __('Rate Ecwid at WordPress.org', 'ecwid-shopping-cart'), 'primary_url' => 'http://wordpress.org/support/view/plugin-reviews/ecwid-shopping-cart', 'hideable' => true), 'no_oauth' => array('message' => Ecwid_Message_Manager::get_oauth_message(), 'hideable' => false, 'type' => 'error'));
 }
コード例 #2
0
<?php

/*
$post_result = wp_remote_post('https://my.ecwid.com/api/oauth/token');
if (is_object($post_result) && @$post_result->get_error_message()) {
	$message = $post_result->get_error_message();
}
if ($message) {
	Ecwid_Message_Manager::show_message('no_oauth', array('message' => Ecwid_Message_Manager::get_oauth_message($message)));
} else {
}
*/
Ecwid_Message_Manager::show_message('no_oauth');
?>
<div class="wrap ecwid-admin ecwid-dashboard">
	<div class="box">
		<div class="head">
			<?php 
ecwid_embed_svg('ecwid_logo_symbol_RGB');
?>
			<h3>
				<?php 
_e('Ecwid Shopping Cart', 'ecwid-shopping-cart');
?>
			</h3>
			<div class="store-id drop-down">
					<span>
						<?php 
_e('Store ID', 'ecwid-shopping-cart');
?>
 : <?php