@@ 805-815 (lines=11) @@ | ||
802 | * |
|
803 | * @return bool true if successful, false otherwise |
|
804 | */ |
|
805 | function delete_transient( $transient ) { |
|
806 | if ( is_multisite() && ! is_main_site() ) { |
|
807 | switch_to_blog( $this->get_main_blog_id() ); |
|
808 | $return = delete_transient( $transient ); |
|
809 | restore_current_blog(); |
|
810 | ||
811 | return $return; |
|
812 | } |
|
813 | ||
814 | return delete_transient( $transient ); |
|
815 | } |
|
816 | ||
817 | /** |
|
818 | * Wrapper for WordPress get_transient function, our version gets |
|
@@ 825-835 (lines=11) @@ | ||
822 | * |
|
823 | * @return mixed Value of transient. |
|
824 | */ |
|
825 | function get_transient( $transient ) { |
|
826 | if ( is_multisite() && ! is_main_site() ) { |
|
827 | switch_to_blog( $this->get_main_blog_id() ); |
|
828 | $return = get_transient( $transient ); |
|
829 | restore_current_blog(); |
|
830 | ||
831 | return $return; |
|
832 | } |
|
833 | ||
834 | return get_transient( $transient ); |
|
835 | } |
|
836 | ||
837 | function get_api_host() { |
|
838 | if ( isset( $this->api_endpoint ) ) { |