[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/plugins/akismet/views/ -> connect-jp.php (source)

   1  <?php
   2  
   3  //phpcs:disable VariableAnalysis
   4  // There are "undefined" variables here because they're defined in the code that includes this file as a template.
   5  
   6  ?>
   7  <div class="akismet-box">
   8      <?php Akismet::view( 'title' ); ?>
   9      <div class="akismet-jp-connect">
  10          <h3><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></h3>
  11          <?php if ( in_array( $akismet_user->status, array( 'no-sub', 'missing' ) ) ) { ?>
  12              <p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
  13              <form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
  14                  <input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
  15                  <input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
  16                  <input type="hidden" name="auto-connect" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
  17                  <input type="hidden" name="redirect" value="plugin-signup"/>
  18                  <input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
  19              </form>
  20              <?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
  21              <p>
  22                  <?php
  23  
  24                  /* translators: %s is the WordPress.com username */
  25                  printf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );
  26  
  27                  ?>
  28                  <br />
  29                  <span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
  30              </p>
  31          <?php } elseif ( $akismet_user->status == 'cancelled' ) { ?>
  32              <p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
  33              <form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
  34                  <input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
  35                  <input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
  36                  <input type="hidden" name="user_id" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
  37                  <input type="hidden" name="redirect" value="upgrade"/>
  38                  <input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
  39              </form>
  40              <?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
  41              <p>
  42                  <?php
  43  
  44                  /* translators: %s is the WordPress.com email address */
  45                  echo esc_html( sprintf( __( 'Your subscription for %s is cancelled.', 'akismet' ), $akismet_user->user_email ) );
  46  
  47                  ?>
  48                  <br />
  49                  <span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
  50              </p>
  51          <?php } elseif ( $akismet_user->status == 'suspended' ) { ?>
  52              <div class="akismet-right">
  53                  <p><a href="https://akismet.com/contact" class="akismet-button akismet-is-primary"><?php esc_html_e( 'Contact Akismet support', 'akismet' ); ?></a></p>
  54              </div>
  55              <p>
  56                  <span class="akismet-alert-text">
  57                      <?php
  58  
  59                      /* translators: %s is the WordPress.com email address */
  60                      echo esc_html( sprintf( __( 'Your subscription for %s is suspended.', 'akismet' ), $akismet_user->user_email ) );
  61  
  62                      ?>
  63                  </span>
  64                  <?php esc_html_e( 'No worries! Get in touch and we&#8217;ll sort this out.', 'akismet' ); ?>
  65              </p>
  66          <?php } else { // ask do they want to use akismet account found using jetpack wpcom connection ?>
  67              <p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
  68              <form name="akismet_use_wpcom_key" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-activate" class="akismet-right">
  69                  <input type="hidden" name="key" value="<?php echo esc_attr( $akismet_user->api_key ); ?>"/>
  70                  <input type="hidden" name="action" value="enter-key">
  71                  <?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
  72                  <input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack', 'akismet' ); ?>"/>
  73              </form>
  74              <?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
  75              <p>
  76                  <?php
  77  
  78                  /* translators: %s is the WordPress.com username */
  79                  printf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' );
  80  
  81                  ?>
  82                  <br />
  83                  <span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span>
  84              </p>
  85          <?php } ?>
  86      </div>
  87      <div class="akismet-ak-connect">
  88          <?php Akismet::view( 'setup' ); ?>
  89      </div>
  90      <div class="centered akismet-toggles">
  91          <a href="#" class="toggle-jp-connect"><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></a>
  92          <a href="#" class="toggle-ak-connect"><?php esc_html_e( 'Set up a different account', 'akismet' ); ?></a>
  93      </div>
  94  </div>
  95  <br/>
  96  <div class="akismet-box">
  97      <?php Akismet::view( 'enter' ); ?>
  98  </div>


Generated : Sat Nov 23 08:20:01 2024 Cross-referenced by PHPXref