1 | <?php |
||
16 | class WP_Hydra { |
||
17 | |||
18 | /** |
||
19 | * Constructor. |
||
20 | * |
||
21 | * Hooks all of the domain replacement functionality. |
||
22 | * |
||
23 | * @access public |
||
24 | */ |
||
25 | public function __construct() { |
||
46 | |||
47 | /** |
||
48 | * Replaces original domain with current domain in simple fields. |
||
49 | * |
||
50 | * @access public |
||
51 | * |
||
52 | * @param string $url The current URL. |
||
53 | * @return string $url The URL with the (maybe) replaced domain. |
||
54 | */ |
||
55 | public function setup_domain( $url ) { |
||
75 | |||
76 | /** |
||
77 | * Replace the old domain with a new domain in a specific URL. |
||
78 | * |
||
79 | * @access protected |
||
80 | * |
||
81 | * @param string $url The current URL. |
||
82 | * @param string $old_domain The old domain. |
||
83 | * @param string $new_domain The new domain. |
||
84 | * @return string $url The new URL. |
||
85 | */ |
||
86 | protected function replace_domain( $url, $old_domain, $new_domain ) { |
||
101 | |||
102 | /** |
||
103 | * Replaces original domain with current domain in content. |
||
104 | * |
||
105 | * @access public |
||
106 | * |
||
107 | * @param string $content The current content with the original domain. |
||
108 | * @return string $content The content with the new domain. |
||
109 | */ |
||
110 | public function setup_content( $content ) { |
||
124 | |||
125 | /** |
||
126 | * Replaces original domain with current domain in wp_upload_dir(). |
||
127 | * |
||
128 | * @access public |
||
129 | * |
||
130 | * @param array $upload_dir The current upload dir settings with the original domain. |
||
131 | * @return array $upload_dir The upload dir settings with the new domain. |
||
132 | */ |
||
133 | public function setup_upload_dir( $upload_dir ) { |
||
147 | |||
148 | /** |
||
149 | * Determine if SSL is used. |
||
150 | * |
||
151 | * @access public |
||
152 | * |
||
153 | * @return bool True if SSL, false if not used. |
||
154 | */ |
||
155 | public function is_ssl() { |
||
158 | |||
159 | } |
||
160 |