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