@@ 747-757 (lines=11) @@ | ||
744 | * |
|
745 | * @return bool true if successful, false otherwise |
|
746 | */ |
|
747 | function delete_transient( $transient ) { |
|
748 | if ( is_multisite() && ! is_main_site() ) { |
|
749 | switch_to_blog( $this->get_main_blog_id() ); |
|
750 | $return = delete_transient( $transient ); |
|
751 | restore_current_blog(); |
|
752 | ||
753 | return $return; |
|
754 | } |
|
755 | ||
756 | return delete_transient( $transient ); |
|
757 | } |
|
758 | ||
759 | /** |
|
760 | * Wrapper for WordPress get_transient function, our version gets |
|
@@ 767-777 (lines=11) @@ | ||
764 | * |
|
765 | * @return mixed Value of transient. |
|
766 | */ |
|
767 | function get_transient( $transient ) { |
|
768 | if ( is_multisite() && ! is_main_site() ) { |
|
769 | switch_to_blog( $this->get_main_blog_id() ); |
|
770 | $return = get_transient( $transient ); |
|
771 | restore_current_blog(); |
|
772 | ||
773 | return $return; |
|
774 | } |
|
775 | ||
776 | return get_transient( $transient ); |
|
777 | } |
|
778 | ||
779 | function get_api_host() { |
|
780 | if ( isset( $this->api_endpoint ) ) { |