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 / line.php

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

78 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined( 'ABSPATH' ) or die();
3 /** @var \Gianism\UI\Screen $this */
4 /** @var \Gianism\Service\Line $instance */
5 ?>
6
7 <h3><i class="lsf lsf-line"></i> LINE</h3>
8 <table class="form-table">
9 <tbody>
10 <tr>
11 <th><label><?php printf( __( 'Connect with %s', 'wp-gianism' ), 'LINE' ); ?></label></th>
12 <td>
13 <?php $this->switch_button( 'line_enabled', $this->option->is_enabled( 'line'), 'line_enabled' ) ?>
14 <p class="description">
15 <?php printf( __( 'You have to create %1$s App <a target="_blank" href="%2$s">here</a> to get required information.', 'wp-gianism' ), "LINE", "https://developers.line.me/" ); ?>
16 <?php printf( __( 'See detail at <a href="%1$s">%2$s</a>.', 'wp-gianism' ), $this->setting_url( 'setup' ), __( 'How to set up', 'wp-gianism' ) ); ?>
17 </p>
18 </td>
19 </tr>
20 <tr>
21 <th><label for="line_channel_id"><?php _e( 'Channel ID', 'wp-gianism' ); ?></label></th>
22 <td><input class="regular-text" type="text" name="line_channel_id" id="line_channel_id"
23 value="<?php echo esc_attr( $instance->line_channel_id ) ?>"/></td>
24 </tr>
25 <tr>
26 <th><label for="line_channel_secret"><?php _e( 'Channel Secret', 'wp-gianism' ); ?></label></th>
27 <td><input class="regular-text" type="text" name="line_channel_secret" id="line_channel_secret"
28 value="<?php echo esc_attr( $instance->line_channel_secret ) ?>"/></td>
29 </tr>
30 <tr>
31 <th><label for="ggl_redirect_uri"><?php _e( 'Redirect URI', 'wp-gianism' ); ?></label></th>
32 <td>
33 <p class="description">
34 <?php
35 $end_point = $instance->get_redirect_endpoint();
36 printf(
37 __( 'Please set %1$s to %2$s on <a target="_blank" href="%4$s">%3$s</a>.', 'wp-gianism' ),
38 __( 'Callback URL', 'wp-gianism' ),
39 '<code>' . $end_point . '</code>',
40 'LINE Developers',
41 'https://developers.line.me/console/'
42 );
43 ?>
44 <a class="button" href="<?php echo esc_attr( $end_point ) ?>"
45 onclick="window.prompt('<?php _e( 'Please copy this URL.', 'wp-gianism' ) ?>', this.href); return false;"><?php _e( 'Copy', 'wp-gianism' ) ?></a>
46 </p>
47 </td>
48 </tr>
49 <tr>
50 <th><label><?php esc_html_e( 'Retrieve Email', 'wp-gianism' ); ?></label></th>
51 <td>
52 <?php $this->switch_button( 'line_retrieve_email', $instance->line_retrieve_email, 1 ) ?>
53 <p class="description">
54 <?php printf( __( 'You need registration to retrieve user email. Go to <a target="_blank" href="%1$s">LINE developer</a> and submit request.', 'wp-gianism' ), 'https://developers.line.me/' ); ?>
55 </p>
56 </td>
57 </tr>
58 <tr>
59 <th><label for="line-add-friend-prompt"><?php esc_html_e( 'Add Friend', 'wp-gianism' ); ?></label></th>
60 <td>
61 <select id="line-add-friend-prompt" name="line_add_friend_prompt">
62 <?php foreach ( [
63 '' => __( 'Not display', 'wp-gianism' ),
64 'normal' => __( 'Display as option', 'wp-gianism' ),
65 'aggressive' => __( 'Aggressive Prompt', 'wp-gianism' ),
66 ] as $value => $label ) : ?>
67 <option value="<?php echo esc_attr( $value ) ?>" <?php selected( $value, $instance->line_add_friend_prompt ) ?>><?php echo esc_html( $label ) ?></option>
68 <?php endforeach; ?>
69 </select>
70 <p class="description">
71 <?php echo wp_kses_post( sprintf( __( 'If you have an official account in LINE, you can display "Add friend button" in your connect screen. For more details, see <a href="%s" target="_blank" rel="noopener,noreferrer">LINE Developer</a>.', 'wp-gianism' ), _x( 'https://developers.line.biz/en/docs/line-login/link-a-bot/#getting-the-friendship-status-of-the-user-and-the-line-official-account', 'LINE DOC', 'wp-gianism' ) ) ); ?>
72 </p>
73 </td>
74 </tr>
75 </tbody>
76 </table>
77 <?php submit_button(); ?>
78