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