PluginProbe
Gianism / trunk
Gianism vtrunk
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 trunk, at templates/setting/line.php

102 lines 4.0 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>LINE</h3>
8 <table class="form-table">
9 <tbody>
10 <tr>
11 <th>
12 <label>
13 <?php
14 // translators: %s is service name.
15 printf( __( 'Connect with %s', 'wp-gianism' ), 'LINE' );
16 ?>
17 </label>
18 </th>
19 <td>
20 <?php $this->switch_button( 'line_enabled', $this->option->is_enabled( 'line' ) ); ?>
21 <p class="description">
22 <?php
23 // translators: %1$s is service name, %2$s is link to LINE developer page.
24 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/' );
25 // translators: %1$s is Link label, %2$s is link to the page.
26 printf( __( 'See detail at <a href="%1$s">%2$s</a>.', 'wp-gianism' ), $this->setting_url( 'setup' ), __( 'How to set up', 'wp-gianism' ) );
27 ?>
28 </p>
29 </td>
30 </tr>
31 <tr>
32 <th><label for="line_channel_id"><?php _e( 'Channel ID', 'wp-gianism' ); ?></label></th>
33 <td>
34 <input class="regular-text" type="text" name="line_channel_id" id="line_channel_id"
35 value="<?php echo esc_attr( $instance->line_channel_id ); ?>"/>
36 </td>
37 </tr>
38 <tr>
39 <th><label for="line_channel_secret"><?php _e( 'Channel Secret', 'wp-gianism' ); ?></label></th>
40 <td>
41 <input class="regular-text" type="text" name="line_channel_secret" id="line_channel_secret"
42 value="<?php echo esc_attr( $instance->line_channel_secret ); ?>"/>
43 </td>
44 </tr>
45 <tr>
46 <th><label for="ggl_redirect_uri"><?php _e( 'Redirect URI', 'wp-gianism' ); ?></label></th>
47 <td>
48 <p class="description">
49 <?php
50 $end_point = esc_url( $instance->get_redirect_endpoint() );
51 printf(
52 // translators: %1$s is callback URL, %2$s is link to LINE developer page, %3$s is link label, %4$s is link to LINE developer console.
53 __( 'Please set %1$s to %2$s on <a target="_blank" href="%4$s">%3$s</a>.', 'wp-gianism' ),
54 __( 'Callback URL', 'wp-gianism' ),
55 '<code>' . $end_point . '</code>',
56 'LINE Developers',
57 'https://developers.line.me/console/'
58 );
59 ?>
60 <a class="button" href="<?php echo esc_attr( $end_point ); ?>"
61 onclick="window.prompt('<?php _e( 'Please copy this URL.', 'wp-gianism' ); ?>', this.href); return false;"><?php _e( 'Copy', 'wp-gianism' ); ?></a>
62 </p>
63 </td>
64 </tr>
65 <tr>
66 <th><label><?php esc_html_e( 'Retrieve Email', 'wp-gianism' ); ?></label></th>
67 <td>
68 <?php $this->switch_button( 'line_retrieve_email', $instance->line_retrieve_email, 1 ); ?>
69 <p class="description">
70 <?php
71 // translators: %1$s is link to LINE developer page.
72 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/' );
73 ?>
74 </p>
75 </td>
76 </tr>
77 <tr>
78 <th><label for="line-add-friend-prompt"><?php esc_html_e( 'Add Friend', 'wp-gianism' ); ?></label></th>
79 <td>
80 <select id="line-add-friend-prompt" name="line_add_friend_prompt">
81 <?php
82 foreach ( [
83 '' => __( 'Not display', 'wp-gianism' ),
84 'normal' => __( 'Display as option', 'wp-gianism' ),
85 'aggressive' => __( 'Aggressive Prompt', 'wp-gianism' ),
86 ] as $value => $label ) :
87 ?>
88 <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $instance->line_add_friend_prompt ); ?>><?php echo esc_html( $label ); ?></option>
89 <?php endforeach; ?>
90 </select>
91 <p class="description">
92 <?php
93 // translators: %s is link to LINE developer page.
94 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' ) ) );
95 ?>
96 </p>
97 </td>
98 </tr>
99 </tbody>
100 </table>
101 <?php submit_button(); ?>
102