1 | <?php |
||
10 | class WP_Hydra { |
||
11 | |||
12 | /** |
||
13 | * Constructor. |
||
14 | * |
||
15 | * Hooks all of the domain replacement functionality. |
||
16 | * |
||
17 | * @access public |
||
18 | */ |
||
19 | public function __construct() { |
||
40 | |||
41 | /** |
||
42 | * Replaces original domain with current domain in simple fields. |
||
43 | * |
||
44 | * @access public |
||
45 | * |
||
46 | * @param string $url The current URL. |
||
47 | * @return string $url The URL with the (maybe) replaced domain. |
||
48 | */ |
||
49 | public function setup_domain( $url ) { |
||
69 | |||
70 | /** |
||
71 | * Replace the old domain with a new domain in a specific URL. |
||
72 | * |
||
73 | * @access protected |
||
74 | * |
||
75 | * @param string $url The current URL. |
||
76 | * @param string $old_domain The old domain. |
||
77 | * @param string $new_domain The new domain. |
||
78 | * @return string $url The new URL. |
||
79 | */ |
||
80 | protected function replace_domain( $url, $old_domain, $new_domain ) { |
||
95 | |||
96 | /** |
||
97 | * Replaces original domain with current domain in content. |
||
98 | * |
||
99 | * @access public |
||
100 | * |
||
101 | * @param string $content The current content with the original domain. |
||
102 | * @return string $content The content with the new domain. |
||
103 | */ |
||
104 | public function setup_content( $content ) { |
||
118 | |||
119 | /** |
||
120 | * Replaces original domain with current domain in wp_upload_dir(). |
||
121 | * |
||
122 | * @access public |
||
123 | * |
||
124 | * @param array $upload_dir The current upload dir settings with the original domain. |
||
125 | * @return array $upload_dir The upload dir settings with the new domain. |
||
126 | */ |
||
127 | public function setup_upload_dir( $upload_dir ) { |
||
141 | |||
142 | /** |
||
143 | * Determine if SSL is used. |
||
144 | * |
||
145 | * @access public |
||
146 | * |
||
147 | * @return bool True if SSL, false if not used. |
||
148 | */ |
||
149 | public function is_ssl() { |
||
152 | |||
153 | } |
||
154 |