| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* |
| 5 |
* FUNCTIONS THAT CAN BE USED BY THEMES/PLUGINS DEVELOPERS |
| 6 |
* FOR ADDITIONAL RETINA SUPPORT |
| 7 |
* |
| 8 |
*/ |
| 9 |
|
| 10 |
// Rewrite the HTML to add Retina support (not recommended, that is |
| 11 |
// done automatically by the plugin through the Method) |
| 12 |
function wr2x_picture_rewrite( $buffer ) { |
| 13 |
global $wr2x_core; |
| 14 |
return $wr2x_core->picture_rewrite( $buffer ); |
| 15 |
} |
| 16 |
|
| 17 |
// Return Retina URL from the Image URL |
| 18 |
function wr2x_get_retina_from_url( $url ) { |
| 19 |
global $wr2x_core; |
| 20 |
return $wr2x_core->get_retina_from_url( $url ); |
| 21 |
} |
| 22 |
|
| 23 |
// Return the retina file if my found for this normal file |
| 24 |
function wr2x_get_retina( $file ) { |
| 25 |
global $wr2x_core; |
| 26 |
return $wr2x_core->get_retina( $file ); |
| 27 |
} |
| 28 |
|
| 29 |
// Generate the retina images for the given meta of a media |
| 30 |
function wr2x_generate_images( $meta ) { |
| 31 |
global $wr2x_core; |
| 32 |
return $wr2x_core->generate_images( $meta ); |
| 33 |
} |
| 34 |
|
| 35 |
// Delete the Retina files for this attachment |
| 36 |
function wr2x_delete_attachment( $attach_id, $deleteFullSize = true ) { |
| 37 |
global $wr2x_core; |
| 38 |
return $wr2x_core->delete_attachment( $attach_id, $deleteFullSize ); |
| 39 |
} |
| 40 |
|
| 41 |
function wr2x_get_pathinfo_from_image_src( $image_src ) { |
| 42 |
global $wr2x_core; |
| 43 |
return $wr2x_core->get_pathinfo_from_image_src( $image_src ); |
| 44 |
} |
| 45 |
|
| 46 |
function wr2x_retina_extension() { |
| 47 |
global $wr2x_core; |
| 48 |
return $wr2x_core->retina_extension(); |
| 49 |
} |
| 50 |
|
| 51 |
?> |
| 52 |
|