Changeset 2911444
- Timestamp:
- 05/12/2023 05:38:55 AM (3 years ago)
- Location:
- otp-easy-login-with-mocean
- Files:
-
- 2 edited
-
tags/1.1.1/includes/oelm-functions.php (modified) (7 diffs)
-
trunk/includes/oelm-functions.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
otp-easy-login-with-mocean/tags/1.1.1/includes/oelm-functions.php
r2911432 r2911444 10 10 load_textdomain( $domain, WP_LANG_DIR . '/'.$domain.'-' . $locale . '.mo' ); //wp-content languages 11 11 load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); // Plugin Languages 12 } 12 } 13 13 add_action('plugins_loaded','oelm_load_plugin_textdomain',100); 14 14 endif; … … 73 73 74 74 $classes = $notice_type === 'error' ? 'oelm-notice-error' : 'oelm-notice-success'; 75 75 76 76 $html = '<div class="'.$classes.'">'.$message.'</div>'; 77 77 78 78 return apply_filters('oelm_notice_html',$html,$message,$notice_type); 79 79 } … … 97 97 'show_phone' => $settings['r-phone-field'], 98 98 'show_cc' => $settings['r-show-country-code-as'], 99 'default_phone' => '', 99 'default_phone' => '', 100 100 'default_cc' => $default_cc, 101 101 'form_token' => mt_rand( 1000, 9999 ), … … 112 112 113 113 $settings = get_option( 'oelm-phone-options', true ); 114 $default_cc = ''; 115 if( $settings['r-default-country-code-type'] === 'geolocation' ){ 116 $default_cc = oelm_Geolocation::get_phone_code(); 117 }else{ 118 $default_cc = $settings['r-default-country-code']; 119 } 114 120 115 121 $args = wp_parse_args( $args, array( … … 125 131 'redirect' => trim( $settings['l-redirect'] ) ? esc_attr( $settings['l-redirect'] ) : $_SERVER['REQUEST_URI'], 126 132 'is_login_popup' => false, 127 'login_first' => $settings['l-login-display'], 133 'login_first' => $settings['l-login-display'], 134 'default_cc' => $default_cc, 128 135 ) ); 129 136 … … 154 161 ) ); 155 162 return mo_get_template( 'oelm-form-otp.php', oelm_PATH.'/templates', $args, $return ); 156 163 157 164 } 158 165 add_action( 'wp_footer', 'oelm_phone_otp_form' ); … … 234 241 'mocean' => array( 235 242 'download' => 'https://dl.dropboxusercontent.com/s/aw67ni7pwrciw9y/mocean.zip?dl=0', 236 'doc' => 'https://dl.dropboxusercontent.com/s/8lvgbtbcru7uf9a/otp%20easy%20login%20woocommerce%20step%20by%20step%20tutorial.docx?dl=0', // Remember to change this 243 'doc' => 'https://dl.dropboxusercontent.com/s/8lvgbtbcru7uf9a/otp%20easy%20login%20woocommerce%20step%20by%20step%20tutorial.docx?dl=0', // Remember to change this 237 244 'loader' => $operator_dir.'/mocean/vendor/autoload.php', 238 245 'myscript' => oelm_PATH.'/includes/servicesScripts/class-oelm-mocean.php' -
otp-easy-login-with-mocean/trunk/includes/oelm-functions.php
r2326240 r2911444 10 10 load_textdomain( $domain, WP_LANG_DIR . '/'.$domain.'-' . $locale . '.mo' ); //wp-content languages 11 11 load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); // Plugin Languages 12 } 12 } 13 13 add_action('plugins_loaded','oelm_load_plugin_textdomain',100); 14 14 endif; … … 73 73 74 74 $classes = $notice_type === 'error' ? 'oelm-notice-error' : 'oelm-notice-success'; 75 75 76 76 $html = '<div class="'.$classes.'">'.$message.'</div>'; 77 77 78 78 return apply_filters('oelm_notice_html',$html,$message,$notice_type); 79 79 } … … 97 97 'show_phone' => $settings['r-phone-field'], 98 98 'show_cc' => $settings['r-show-country-code-as'], 99 'default_phone' => '', 99 'default_phone' => '', 100 100 'default_cc' => $default_cc, 101 101 'form_token' => mt_rand( 1000, 9999 ), … … 112 112 113 113 $settings = get_option( 'oelm-phone-options', true ); 114 $default_cc = ''; 115 if( $settings['r-default-country-code-type'] === 'geolocation' ){ 116 $default_cc = oelm_Geolocation::get_phone_code(); 117 }else{ 118 $default_cc = $settings['r-default-country-code']; 119 } 114 120 115 121 $args = wp_parse_args( $args, array( … … 125 131 'redirect' => trim( $settings['l-redirect'] ) ? esc_attr( $settings['l-redirect'] ) : $_SERVER['REQUEST_URI'], 126 132 'is_login_popup' => false, 127 'login_first' => $settings['l-login-display'], 133 'login_first' => $settings['l-login-display'], 134 'default_cc' => $default_cc, 128 135 ) ); 129 136 … … 154 161 ) ); 155 162 return mo_get_template( 'oelm-form-otp.php', oelm_PATH.'/templates', $args, $return ); 156 163 157 164 } 158 165 add_action( 'wp_footer', 'oelm_phone_otp_form' ); … … 234 241 'mocean' => array( 235 242 'download' => 'https://dl.dropboxusercontent.com/s/aw67ni7pwrciw9y/mocean.zip?dl=0', 236 'doc' => 'https://dl.dropboxusercontent.com/s/8lvgbtbcru7uf9a/otp%20easy%20login%20woocommerce%20step%20by%20step%20tutorial.docx?dl=0', // Remember to change this 243 'doc' => 'https://dl.dropboxusercontent.com/s/8lvgbtbcru7uf9a/otp%20easy%20login%20woocommerce%20step%20by%20step%20tutorial.docx?dl=0', // Remember to change this 237 244 'loader' => $operator_dir.'/mocean/vendor/autoload.php', 238 245 'myscript' => oelm_PATH.'/includes/servicesScripts/class-oelm-mocean.php'
Note: See TracChangeset
for help on using the changeset viewer.