| @@ 792-802 (lines=11) @@ | ||
| 789 | * |
|
| 790 | * @return bool true if successful, false otherwise |
|
| 791 | */ |
|
| 792 | function delete_transient( $transient ) { |
|
| 793 | if ( is_multisite() && ! is_main_site() ) { |
|
| 794 | switch_to_blog( $this->get_main_blog_id() ); |
|
| 795 | $return = delete_transient( $transient ); |
|
| 796 | restore_current_blog(); |
|
| 797 | ||
| 798 | return $return; |
|
| 799 | } |
|
| 800 | ||
| 801 | return delete_transient( $transient ); |
|
| 802 | } |
|
| 803 | ||
| 804 | /** |
|
| 805 | * Wrapper for WordPress get_transient function, our version gets |
|
| @@ 812-822 (lines=11) @@ | ||
| 809 | * |
|
| 810 | * @return mixed Value of transient. |
|
| 811 | */ |
|
| 812 | function get_transient( $transient ) { |
|
| 813 | if ( is_multisite() && ! is_main_site() ) { |
|
| 814 | switch_to_blog( $this->get_main_blog_id() ); |
|
| 815 | $return = get_transient( $transient ); |
|
| 816 | restore_current_blog(); |
|
| 817 | ||
| 818 | return $return; |
|
| 819 | } |
|
| 820 | ||
| 821 | return get_transient( $transient ); |
|
| 822 | } |
|
| 823 | ||
| 824 | function get_api_host() { |
|
| 825 | if ( isset( $this->api_endpoint ) ) { |
|