Changeset 2328520
- Timestamp:
- 06/22/2020 09:45:05 AM (6 years ago)
- Location:
- eber/trunk
- Files:
-
- 6 edited
-
index.php (modified) (1 diff)
-
init/activate.php (modified) (1 diff)
-
init/frontend.php (modified) (2 diffs)
-
init/menu.php (modified) (6 diffs)
-
layout/index.php (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eber/trunk/index.php
r2298134 r2328520 5 5 Description: Eber is a smart member system comes with comprehensive loyalty & rewards system, marketing and analytic tool. 6 6 Author: Eber 7 Version: 2. 47 Version: 2.5 8 8 Author URI: https://eber.co 9 9 License: GPLv2 or later -
eber/trunk/init/activate.php
r2206954 r2328520 32 32 delete_option('adjust_point_when'); 33 33 delete_option('eber_welcome_email'); 34 34 35 delete_option('exclude_tax'); 35 36 delete_option('exclude_shipping'); 36 37 delete_option('exclude_coupon'); 38 delete_option('widget_new'); 37 39 } 38 40 } -
eber/trunk/init/frontend.php
r2049693 r2328520 5 5 public function get_js(){ 6 6 $slug = get_option('eber_business_slug',''); 7 $id = get_option('eber_business_id',''); 7 8 $status = get_option('eber_status',false); 9 $widget_new = get_option('widget_new',false); 8 10 $eber_custom_link = get_option('eber_custom_link',false); 9 11 if($eber_custom_link) 10 12 { 11 13 $login = '&login='.urlencode(get_option('eber_custom_login_url','')); 14 $login_url = '&login_url='.urlencode(get_option('eber_custom_login_url','')); 12 15 $signup = '&signup='.urlencode(get_option('eber_custom_signup_url','')); 13 16 } … … 15 18 { 16 19 $login = ''; 20 $login_url = ''; 17 21 $signup = ''; 18 22 } 19 23 if($slug != '') 20 24 { 21 wp_enqueue_script('my-js', '//eber-widget-' . $slug . '.eber.co/widget/get-js?type=wordpress&hid='.((!$status)?'1':'0').'&shop=' . get_bloginfo('siteurl') .$login.$signup. '&init=' . get_bloginfo('siteurl').'/wp-admin/admin-ajax.php?action=eber_init', array('jquery')); 25 // wp_enqueue_script('my-js', '//eber-widget-' . $slug . '.eber.co/widget/get-js?type=wordpress&hid='.((!$status)?'1':'0').'&shop=' . get_bloginfo('siteurl') .$login.$signup. '&init=' . get_bloginfo('siteurl').'/wp-admin/admin-ajax.php?action=eber_init', array('jquery')); 26 if(!$widget_new) 27 wp_enqueue_script('my-js', '//widget.eber.co/widget/'. $slug .'?type=wordpress&hid='.((!$status)?'1':'0').'&shop=' . get_bloginfo('siteurl') .$login.$signup. '&init=' . get_bloginfo('siteurl').'/wp-admin/admin-ajax.php?action=eber_init', array('jquery')); 28 else 29 wp_enqueue_script('my-js', '//widget.eber.co/new-widget/initialize/'. $id .'?type=wordpress&hid='.((!$status)?'1':'0').'&shop=' . get_bloginfo('siteurl') .$login_url.$signup. '&init=' . get_bloginfo('siteurl').'/wp-admin/admin-ajax.php?action=eber_init', array('jquery'),null,true); 22 30 } 23 31 -
eber/trunk/init/menu.php
r2206957 r2328520 29 29 $exclude_shipping = get_option('exclude_shipping',true); 30 30 $exclude_coupon = get_option('exclude_coupon',true); 31 $widget_new = get_option('widget_new',false); 31 32 $sync = get_option('eber_sync',false); 32 33 if($api_key != ''){ … … 40 41 $eber_custom_link = (isset($_POST['eber_custom_link'])); 41 42 $eber_welcome_email = (isset($_POST['eber_welcome_email'])); 43 42 44 $exclude_tax = (isset($_POST['exclude_tax'])); 43 45 $exclude_shipping = (isset($_POST['exclude_shipping'])); 44 46 $exclude_coupon = (isset($_POST['exclude_coupon'])); 45 47 $widget_new = (isset($_POST['widget_new'])); 46 48 if(isset($_POST['eber_custom_login_url'])) 47 49 { … … 86 88 update_option('eber_status',false); 87 89 } 90 if(isset($_POST['widget_new'])) 91 { 92 update_option('widget_new',sanitize_text_field($_POST['widget_new'])); 93 } 94 else 95 { 96 update_option('widget_new',false); 97 } 88 98 if(isset($_POST['eber_sync'])){ 89 99 update_option('eber_sync',sanitize_text_field($_POST['eber_sync'])); … … 137 147 update_option('eber_welcome_email',false); 138 148 } 149 150 139 151 if(isset($_POST['exclude_tax'])) 140 152 { … … 163 175 update_option('exclude_shipping',false); 164 176 } 177 178 165 179 $success = true; 166 180 } … … 194 208 update_option('eber_business_name',$business['name']); 195 209 update_option('eber_business_slug',$business['slug']); 210 update_option('eber_business_id',$business['id']); 196 211 return array( 197 212 'success'=>true, -
eber/trunk/layout/index.php
r2298134 r2328520 8 8 </p> 9 9 <form id="eber_connect_form" method="post" action=""> 10 <?php if( isset($error) && count($error) > 0){10 <?php if(!empty($error)){ 11 11 foreach($error as $err):?> 12 12 <div class="notice error my-acf-notice is-dismissible"> … … 37 37 </td> 38 38 </tr> 39 <tr>40 <th scope="row"> </th>41 <td>42 <fieldset>43 <legend class="screen-reader-text"><span>Exclude Tax?</span></legend><label for="exclude_tax">44 <input name="exclude_tax" type="checkbox" id="exclude_tax" value="1" <?php echo ($exclude_tax)?'checked':'';?>>45 Exclude Tax?</label>46 </fieldset>47 </td>48 </tr>49 50 <tr>51 <th scope="row"> </th>52 <td>53 <fieldset>54 <legend class="screen-reader-text"><span>Exclude Shipping?</span></legend><label for="exclude_shipping">55 <input name="exclude_shipping" type="checkbox" id="exclude_shipping" value="1" <?php echo ($exclude_shipping)?'checked':'';?>>56 Exclude Shipping?</label>57 </fieldset>58 </td>59 </tr>60 61 <tr>62 <th scope="row"> </th>63 <td>64 <fieldset>65 <legend class="screen-reader-text"><span>Exclude Coupon?</span></legend><label for="exclude_coupon">66 <input name="exclude_coupon" type="checkbox" id="exclude_coupon" value="1" <?php echo ($exclude_coupon)?'checked':'';?>>67 Exclude Coupon?</label>68 </fieldset>69 </td>70 </tr>71 39 <?php } 72 40 ?> … … 84 52 Display Widget ?</label> 85 53 </fieldset></td> 54 </tr> 55 <tr> 56 <th scope="row"> </th> 57 <td> <fieldset><legend class="screen-reader-text"><span>New Widget ?</span></legend><label for="users_can_register"> 58 <input name="widget_new" type="checkbox" id="widget_new" value="1" <?php echo ($widget_new)?'checked':'';?>> 59 New Widget ?</label> 60 </fieldset></td> 86 61 </tr> 87 62 … … 138 113 </td> 139 114 </tr> 115 <?php 116 if ( class_exists( 'WooCommerce' ) ) 117 { ?> 118 <tr> 119 <th scope="row"> </th> 120 <td> 121 <fieldset> 122 <legend class="screen-reader-text"><span>Exclude Tax?</span></legend><label for="exclude_tax"> 123 <input name="exclude_tax" type="checkbox" id="exclude_tax" value="1" <?php echo ($exclude_tax)?'checked':'';?>> 124 Exclude Tax?</label> 125 </fieldset> 126 </td> 127 </tr> 140 128 129 <tr> 130 <th scope="row"> </th> 131 <td> 132 <fieldset> 133 <legend class="screen-reader-text"><span>Exclude Shipping?</span></legend><label for="exclude_shipping"> 134 <input name="exclude_shipping" type="checkbox" id="exclude_shipping" value="1" <?php echo ($exclude_shipping)?'checked':'';?>> 135 Exclude Shipping?</label> 136 </fieldset> 137 </td> 138 </tr> 139 140 <tr> 141 <th scope="row"> </th> 142 <td> 143 <fieldset> 144 <legend class="screen-reader-text"><span>Exclude Coupon?</span></legend><label for="exclude_coupon"> 145 <input name="exclude_coupon" type="checkbox" id="exclude_coupon" value="1" <?php echo ($exclude_coupon)?'checked':'';?>> 146 Exclude Coupon?</label> 147 </fieldset> 148 </td> 149 </tr> 150 <?php } 151 ?> 141 152 </tbody> 142 153 </table> -
eber/trunk/readme.txt
r2310543 r2328520 73 73 = 2.4 = 74 74 update Fix syntax error on Window Server 75 = 2.5 = 76 update new Widget UI 75 77 == Upgrade Notice == 76 78 = 0.1 = … … 107 109 = 2.4 = 108 110 update Fix syntax error on Window Server 111 = 2.5 = 112 update new Widget UI 109 113 110 114 … … 114 118 115 119 116
Note: See TracChangeset
for help on using the changeset viewer.