| 1 |
<?php |
| 2 |
|
| 3 |
defined( 'ABSPATH' ) or die(); |
| 4 |
|
| 5 |
/** @var \Gianism\UI\SettingScreen $this */ |
| 6 |
/** @var \Gianism\Service\Google $instance */ |
| 7 |
|
| 8 |
?> |
| 9 |
<h3><i class="lsf lsf-google"></i> Google</h3> |
| 10 |
|
| 11 |
<p class="description"><?php $this->e( 'Google API system is very complex, but don\'t be afraid. Anyway if you don\'t have Google account, go to <a hreF="https://www.google.com/accounts/NewAccount">Create Google account</a> and get it.' ); ?></p> |
| 12 |
|
| 13 |
<h4>Step1. <?php $this->e( 'Create new Project' ); ?></h4> |
| 14 |
|
| 15 |
<p><?php $this->e( 'Go to <a href="https://cloud.google.com/console/project">Google API Console > Projects</a> and click <code>Create Project</code>. SMS verification will be required. After finishing, click your new project\'s name and go setting page.' ); ?></p> |
| 16 |
|
| 17 |
<p><?php $this->e( 'Now, On project page, clicking <code>API & OAuth</code> menu in sidebar, then you are on <code>APIs</code> page which will enable various APIs one by one. Turn Google+ API <code>ON</code>.' ); ?></p> |
| 18 |
|
| 19 |
<p class="notice"> |
| 20 |
<?php $this->e( 'Google API Console is too simple but values to be set are not simple, so you will be easily loose yourself. Be care of where you are.' ) ?> |
| 21 |
</p> |
| 22 |
|
| 23 |
<p><?php $this->_( 'Then, go to <code>Credentials</code> below <code>API & auth</code> and click <code>CREATE NEW CLIENT ID</code>. Enter below:' ) ?></p> |
| 24 |
|
| 25 |
<table class="gianism-example-table"> |
| 26 |
<tr> |
| 27 |
<th>Application type</th> |
| 28 |
<td> |
| 29 |
<?php printf( $this->_( 'Select <code>%s</code>.' ), 'Web application' ); ?><br/> |
| 30 |
</td> |
| 31 |
</tr> |
| 32 |
<tr> |
| 33 |
<th>Authorized Javascript origin</th> |
| 34 |
<td> |
| 35 |
<code><?php echo home_url( '/', 'http' ) ?></code><br/> |
| 36 |
<code><?php echo home_url( '/', 'https' ) ?></code> |
| 37 |
</td> |
| 38 |
</tr> |
| 39 |
<tr> |
| 40 |
<th>Authorized redirect URI</th> |
| 41 |
<td> |
| 42 |
<code><?php echo home_url( '/google-auth/', $this->option->is_ssl_required() ? 'https' : 'http' ) ?></code> |
| 43 |
</td> |
| 44 |
</tr> |
| 45 |
</table> |
| 46 |
|
| 47 |
<p><?php $this->e( 'There you get <code>Client ID for web application</code> section, which provides <code>Client ID</code> and <code>Client secret</code>.' ) ?></p> |
| 48 |
|
| 49 |
<p><?php printf( $this->_( 'Finally, you must set up your application. Go to <code>Consent screen</code> below <code>APIs & oauth</code>, and change Product name to your own. <code>%s</code> is recommended.' ), get_bloginfo( 'name' ) ) ?></p> |
| 50 |
|
| 51 |
<h4>Step2. <?php $this->e( 'Enter API Information' ); ?></h4> |
| 52 |
|
| 53 |
<p><?php printf( $this->_( 'Input and save 2 information(Client ID and Client Secret) on <a href="%s">WordPress admin screen</a>.' ), $this->setting_url() ); ?></p> |
| 54 |
|