actions.php
3 weeks ago
author.php
3 weeks ago
error.php
3 weeks ago
feed.php
3 weeks ago
footer.php
3 weeks ago
header-generic.php
3 weeks ago
header-text.php
3 weeks ago
header.php
3 weeks ago
item.php
3 weeks ago
linkbox.php
3 weeks ago
error.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Smash Balloon Custom Twitter Feeds Error Template |
| 4 | * |
| 5 | * @version 2.0 Custom Twitter Feeds by Smash Balloon |
| 6 | * |
| 7 | */ |
| 8 | |
| 9 | // Don't load directly |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | die( '-1' ); |
| 12 | } |
| 13 | ?> |
| 14 | <div id="ctf" class="ctf" data-ctfshortcode="<?php echo $this->getShortCodeJSON() ?>"> |
| 15 | <div class="ctf-error"> |
| 16 | <div class="ctf-error-user"></div> |
| 17 | <?php if ( current_user_can( 'manage_options' ) ): ?> |
| 18 | <div class="ctf-error-admin"> |
| 19 | <?php if ( ! empty( $this->api_obj->api_error_no ) ): ?> |
| 20 | <p>Unable to load Tweets</p> |
| 21 | <a class="twitter-share-button" href="https://twitter.com/share" data-size="large" data-url="<?php echo get_the_permalink() ?>" data-text="Check out this website"></a> |
| 22 | <?php if ( !empty( $this->feed_options['screenname'] ) ) : ?> |
| 23 | <a class="twitter-follow-button" href="https://twitter.com/share" data-size="large" data-url="https://twitter.com/<?php echo $this->feed_options['screenname'] ?>" data-dnt="true">Follow</a> |
| 24 | <?php endif; ?> |
| 25 | <p><b>This message is only visible to admins:</b><br /> |
| 26 | An error has occurred with your feed.<br /> |
| 27 | <?php if ( $this->missing_credentials ): ?> |
| 28 | There is a problem with your access token, access token secret, consumer token, or consumer secret<br /> |
| 29 | <?php endif; ?> |
| 30 | <?php if ( isset( $this->errors['error_message'] ) ): ?> |
| 31 | <?php echo $this->errors['error_message']; ?> <br /> |
| 32 | <?php endif; ?> |
| 33 | The error response from the Twitter API is the following:<br /> |
| 34 | <code>Error number: <?php echo $this->api_obj->api_error_no ?> <br /> |
| 35 | Message: <?php echo $this->api_obj->api_error_message ?> </code> |
| 36 | <a href="https://smashballoon.com/doc/twitter-api-error-message-reference/?utm_campaign=twitter-free&utm_source=frontend&utm_medium=errormessage" target="_blank" rel="noopener noreferrer">Click here to troubleshoot</a></p> |
| 37 | <?php endif; ?> |
| 38 | </div> |
| 39 | <?php endif; ?> |
| 40 | </div> |
| 41 | </div> |