PluginProbe
Gianism / 4.4.0
Gianism v4.4.0
4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.4.0 5.0.0 5.0.1 5.0.2 5.1.0 5.2.1 5.2.2 5.3.0 6.0.0 6.0.1 trunk 1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 All 65 releases
gianism / templates / setting.php

setting.php in Gianism 4.4.0, at templates/setting.php

155 lines 7.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) or die();
4
5 global $wp_version;
6
7 /** @var \Gianism\UI\SettingScreen $this */
8 ?>
9
10 <form method="post">
11
12 <?php wp_nonce_field( 'gianism_option' ) ?>
13
14 <h3><i class="lsf lsf-gear"></i> <?php esc_html_e( 'General Setting' , 'wp-gianism' ) ?></h3>
15 <table class="form-table">
16 <tr>
17 <th><?php esc_html_e( 'Current registration setting' , 'wp-gianism' ) ?></th>
18 <td>
19 <p>
20 <?php if ( $this->option->user_can_register() ) : ?>
21 <i class="lsf lsf-check" style="color: green; font-size: 1.4em;"></i>
22 <strong><?php _e( 'User can register account.', 'wp-gianism' ) ?></strong>
23 <?php else : ?>
24 <i class="lsf lsf-ban" style="color: lightgrey; font-size: 1.4em;"></i>
25 <strong><?php _e( 'User can\'t register account.', 'wp-gianism' ) ?></strong>
26 <?php endif; ?>
27 </p>
28 <p>
29 <label>
30 <input type="radio" name="force_register"
31 value="1"<?php checked( $this->option->force_register ) ?> />
32 <?php esc_html_e( 'Force register' , 'wp-gianism' ); ?>
33 </label><br/>
34 <label>
35 <input type="radio" name="force_register"
36 value="0"<?php checked( ! $this->option->force_register ) ?> />
37 <?php esc_html_e( 'Depends on WP setting' , 'wp-gianism' ); ?>
38 </label>
39 </p>
40 <p class="description"><?php echo wp_kses_post( sprintf( __( 'Whether registration setting depends on <a href="%s">General setting</a>. If users are allowed to register, account will be created with information provided from Web service, or else only connected users can login via SNS account.', 'wp-gianism' ), admin_url( 'options-general.php' ) ) ) ?></p>
41 <?php if ( gianism_woocommerce_detected() ) : ?>
42 <p class="description" style="color: #f34357;">
43 <?php echo wp_kses( __( '<strong>WooCommerce found!</strong> In spite of this setting, user can always register account.', 'wp-gianism' ), [ 'strong' => [] ] ) ?>
44 </p>
45 <?php endif; ?>
46 </td>
47 </tr>
48 <tr>
49 <th><?php esc_html_e( 'Login screen' , 'wp-gianism' ); ?></th>
50 <td>
51 <label>
52 <input type="radio" name="show_button_on_login"
53 value="1"<?php checked( $this->option->show_button_on_login ) ?> />
54 <?php esc_html_e( 'Show all button on Login screen.' , 'wp-gianism' ); ?>
55 </label><br/>
56 <label>
57 <input type="radio" name="show_button_on_login"
58 value="0"<?php checked( ! $this->option->show_button_on_login ) ?> />
59 <?php esc_html_e( 'Do not show login button.' , 'wp-gianism' ); ?>
60 </label>
61 <p class="description">
62 <?php echo wp_kses_post( sprintf( __( 'You can output login button manually. See detail at <a href="%2$s">%1$s</a>.' , 'wp-gianism' ), esc_html__( 'Customize', 'wp-gianism' ), $this->setting_url( 'customize' ) ) ); ?>
63 </p>
64 </td>
65 </tr>
66 <tr>
67 <th><label for="button_type"><?php esc_html_e( 'Button size' , 'wp-gianism' ); ?></label></th>
68 <td>
69 <select name="button_type" id="button_type">
70 <?php foreach ( $this->option->button_types() as $index => $value ) : ?>
71 <option value="<?php echo $index ?>"<?php selected( $index == $this->option->button_type ) ?>>
72 <?php echo esc_html( $value ); ?>
73 </option>
74 <?php endforeach; ?>
75 </select>
76 <p class="description">
77 <?php esc_html_e( 'This setting is valid only if login button\'s display setting is on.' , 'wp-gianism' ); ?>
78 </p>
79 </td>
80 </tr>
81 <tr>
82 <th><label for="prefix"><?php esc_html_e( 'URL Prefix' , 'wp-gianism' ); ?></label></th>
83 <td>
84 <input type="text" value="<?php echo esc_attr( $this->option->prefix ) ?>" name="prefix" id="prefix" />
85 <p class="description">
86 <?php $this->new_from( '4.0.0' ); ?>
87 <?php esc_html_e( 'You can add prefix for all Gianism redirect URIs. Useful if you site is under CDN network which filters cookie strings.' , 'wp-gianism' ); ?>
88 <br />
89 <?php echo wp_kses_post( __( '<strong>NOTICE: </strong>if you change URL prefix, you have to change all app setting in each SNS. It might cause error on live site.' , 'wp-gianism' ) ); ?>
90 </p>
91 </td>
92 </tr>
93 <tr>
94 <th><label for="wpg-check-profile"><?php esc_html_e( 'Profile Completion' , 'wp-gianism' ); ?></label></th>
95 <td>
96 <?php $this->new_from( '4.1.0' ); ?>
97 <select name="check_profile" id="wpg-check-profile">
98 <?php foreach( [
99 '' => __( 'Notify on admin profile screen(Default)', 'wp-gianism' ),
100 'popup' => __( 'Show pop up for incomplete users(Aggressive)', 'wp-gianism' ),
101 'redirect' => __( 'Redirect users to fill profile(Forcible)', 'wp-gianism' ),
102 ] as $value => $label ) {
103 printf( '<option value="%1$s"%3$s>%2$s</option>', esc_attr( $value ), esc_html( $label ), selected( $value, $this->option->check_profile, false ) );
104 } ?>
105 </select>
106 <p class="description">
107 <?php echo wp_kses_post( __( 'Users who registered account via SNS have sometimes incomplete profile. You can choose how to treat them by this option.' , 'wp-gianism' ) ); ?>
108 <?php if ( ! $this->profile_checker->is_over_5() ) : ?>
109 <br /><strong style="color: red"><?php esc_html_e( 'This feature requires WordPress 5.0 and higher. Please consider upgrading.', 'wp-gianism' ); ?></strong>
110 <?php endif; ?>
111 </p>
112
113 <p class="gianism-toggle" data-target="#wpg-check-profile" data-valid="popup,redirect">
114 <label for="profile-completion-path"><?php esc_html_e( 'Profile URL', 'wp-gianism' ) ?></label><br />
115 <input name="profile_completion_path" class="regular-text" type="text" id="profile-completion-path"
116 value="<?php echo esc_attr( $this->option->profile_completion_path ) ?>"
117 placeholder="<?php esc_attr_e( 'e.g. /my-profile/account', 'wp-gianism' ) ?>" />
118 <br />
119 <span class="description">
120 <?php esc_html_e( 'If you want your users to complete their profiles, you can specify the path to profile completion page.', 'wp-gianism' ); ?><br />
121 <strong><?php esc_html_e( 'Current Setting', 'wp-gianism' ) ?></strong>:
122 <?php printf(
123 '<%1$s>%2$s</%1$s>',
124 $this->option->check_profile ? 'code' : 'del',
125 esc_url( \Gianism\Controller\ProfileChecker::get_instance()->redirect_url() )
126 ); ?>
127 </span>
128 </p>
129 <p class="gianism-toggle" data-target="#wpg-check-profile" data-valid="redirect">
130 <label for="exclude-from-redirect"><?php esc_html_e( 'Excluded Path', 'wp-gianism' ) ?></label><br />
131 <textarea name="exclude_from_redirect" id="exclude-from-redirect" style="width: 100%; box-sizing: border-box" placeholder="e.g. /my-account"><?php echo esc_textarea( $this->option->exclude_from_redirect ) ?></textarea>
132 <br />
133 <span class="description">
134 <?php esc_html_e( 'To avoid the redirect loop, enter paths excluded from redirection. 1 path in 1 line. Asterisk(*) means wildcard.', 'wp-gianism' ) ?>
135 </span>
136 </p>
137 </td>
138 </tr>
139 </table>
140 <?php submit_button(); ?>
141
142
143 <?php
144 foreach ( $this->service->all_services() as $service ) {
145 /** @var \Gianism\Service\AbstractService $instance */
146 $instance = $this->service->get( $service );
147 $path = $instance->get_admin_template( 'setting' );
148 if ( $path && file_exists( $path ) ) {
149 include $path;
150 }
151 }
152 ?>
153
154 </form>
155