protected function get_message_params($name, $params)
 {
     if (is_array($name)) {
         $params = $name;
         $name = '';
     }
     if (isset($this->messages[$name])) {
         $params = array_merge(array('type' => 'info', 'title' => '', 'message' => '', 'hideable' => false), $this->messages[$name], $params);
     }
     if ($name == 'on_storeid_set') {
         $params['primary_url'] = ecwid_get_store_page_url();
         $params['secondary_url'] = 'post.php?post=' . ecwid_get_current_store_page_id() . '&action=edit&show-ecwid=true';
     }
     if ($name == 'on_appearance_widgets') {
         if (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'appearance') {
             $admin_page = 'admin.php?page=ecwid-appearance';
         } elseif (isset($_GET['from-ecwid']) && $_GET['from-ecwid'] == 'new') {
             $admin_page = 'post-new.php?post_type=page';
         } elseif (isset($_GET['from-ecwid']) && is_numeric($_GET['from-ecwid'])) {
             $admin_page = 'post.php?post=' . $_GET['from-ecwid'] . '&action=edit';
         }
         $params['secondary_url'] = $admin_page;
     }
     $types_map = array('info' => 'updated', 'warning' => 'update-nag', 'error' => 'error');
     $params['type'] = $types_map[$params['type']];
     return $params;
 }
Esempio n. 2
0
    _e('Greetings!', 'ecwid-shopping-cart');
    ?>
				</div>
				<div class="greeting-message mobile-br">
					<?php 
    _e('Your Ecwid store is connected<br /> to your WordPress website', 'ecwid-shopping-cart');
    ?>
				</div>
			<?php 
}
?>

			<ul class="greeting-links">
				<li>
					<a target="_blank" href="<?php 
echo ecwid_get_store_page_url();
?>
"><?php 
_e('Visit storefront', 'ecwid-shopping-cart');
?>
</a>
				</li>
				<li>
					<a target="_blank" href="//my.ecwid.com/cp?source=wporg"><?php 
_e('Open control panel', 'ecwid-shopping-cart');
?>
</a>
				</li>
			</ul>

 protected function get_message_params($name, $params)
 {
     if (is_array($name)) {
         $params = $name;
         $name = '';
     }
     if (isset($this->messages[$name])) {
         $params = array_merge(array('type' => 'info', 'title' => '', 'message' => '', 'hideable' => false), $this->messages[$name], $params);
     }
     if ($name == 'on_storeid_set') {
         $params['primary_url'] = ecwid_get_store_page_url();
     }
     $types_map = array('info' => 'updated', 'warning' => 'update-nag', 'error' => 'error');
     $params['type'] = $types_map[$params['type']];
     return $params;
 }