@@ 846-856 (lines=11) @@ | ||
843 | * |
|
844 | * @return bool true if successful, false otherwise |
|
845 | */ |
|
846 | function delete_transient( $transient ) { |
|
847 | if ( is_multisite() && ! is_main_site() ) { |
|
848 | switch_to_blog( $this->get_main_blog_id() ); |
|
849 | $return = delete_transient( $transient ); |
|
850 | restore_current_blog(); |
|
851 | ||
852 | return $return; |
|
853 | } |
|
854 | ||
855 | return delete_transient( $transient ); |
|
856 | } |
|
857 | ||
858 | /** |
|
859 | * Wrapper for WordPress get_transient function, our version gets |
|
@@ 866-876 (lines=11) @@ | ||
863 | * |
|
864 | * @return mixed Value of transient. |
|
865 | */ |
|
866 | function get_transient( $transient ) { |
|
867 | if ( is_multisite() && ! is_main_site() ) { |
|
868 | switch_to_blog( $this->get_main_blog_id() ); |
|
869 | $return = get_transient( $transient ); |
|
870 | restore_current_blog(); |
|
871 | ||
872 | return $return; |
|
873 | } |
|
874 | ||
875 | return get_transient( $transient ); |
|
876 | } |
|
877 | ||
878 | function get_api_host() { |
|
879 | if ( isset( $this->api_endpoint ) ) { |