| @@ 830-840 (lines=11) @@ | ||
| 827 | * |
|
| 828 | * @return bool true if successful, false otherwise |
|
| 829 | */ |
|
| 830 | function delete_transient( $transient ) { |
|
| 831 | if ( is_multisite() && ! is_main_site() ) { |
|
| 832 | switch_to_blog( $this->get_main_blog_id() ); |
|
| 833 | $return = delete_transient( $transient ); |
|
| 834 | restore_current_blog(); |
|
| 835 | ||
| 836 | return $return; |
|
| 837 | } |
|
| 838 | ||
| 839 | return delete_transient( $transient ); |
|
| 840 | } |
|
| 841 | ||
| 842 | /** |
|
| 843 | * Wrapper for WordPress get_transient function, our version gets |
|
| @@ 850-860 (lines=11) @@ | ||
| 847 | * |
|
| 848 | * @return mixed Value of transient. |
|
| 849 | */ |
|
| 850 | function get_transient( $transient ) { |
|
| 851 | if ( is_multisite() && ! is_main_site() ) { |
|
| 852 | switch_to_blog( $this->get_main_blog_id() ); |
|
| 853 | $return = get_transient( $transient ); |
|
| 854 | restore_current_blog(); |
|
| 855 | ||
| 856 | return $return; |
|
| 857 | } |
|
| 858 | ||
| 859 | return get_transient( $transient ); |
|
| 860 | } |
|
| 861 | ||
| 862 | function get_api_host() { |
|
| 863 | if ( isset( $this->api_endpoint ) ) { |
|