| @@ -1,9 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace Elementor\Core\Page_Assets\Data_Managers; |
| 3 | 3 | |
| 4 | -use Elementor\Utils; | |
| 5 | - | |
| 6 | 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 7 | 5 | exit; // Exit if accessed directly. |
| 8 | 6 | } |
| 9 | 7 | |
| @@ -172,9 +170,9 @@ | ||
| 172 | 170 | * |
| 173 | 171 | * @since 3.3.0 |
| 174 | 172 | * @access protected |
| 175 | 173 | * |
| 176 | - * @param string $version | |
| 174 | + * @param string $asset_key | |
| 177 | 175 | * |
| 178 | 176 | * @return boolean |
| 179 | 177 | */ |
| 180 | 178 | protected function is_asset_version_changed( $version ) { |
| @@ -188,9 +186,9 @@ | ||
| 188 | 186 | * |
| 189 | 187 | * @since 3.3.0 |
| 190 | 188 | * @access protected |
| 191 | 189 | * |
| 192 | - * @param string $data_type (exists|content|size). | |
| 190 | + * @param string $data_type (content|size) | |
| 193 | 191 | * @param string $file_key - In case that the same file data is needed for multiple assets (like a JSON file), the file data key should be the same for all shared assets to make sure that the file is being read only once. |
| 194 | 192 | * |
| 195 | 193 | * @return string|number |
| 196 | 194 | */ |
| @@ -206,12 +204,10 @@ | ||
| 206 | 204 | } |
| 207 | 205 | |
| 208 | 206 | $asset_path = $this->get_file_path(); |
| 209 | 207 | |
| 210 | - if ( 'exists' === $data_type ) { | |
| 211 | - $data = file_exists( $asset_path ); | |
| 212 | - } elseif ( 'content' === $data_type ) { | |
| 213 | - $data = Utils::file_get_contents( $asset_path ); | |
| 208 | + if ( 'content' === $data_type ) { | |
| 209 | + $data = file_get_contents( $asset_path ); | |
| 214 | 210 | |
| 215 | 211 | if ( ! $data ) { |
| 216 | 212 | $data = ''; |
| 217 | 213 | } |