public static function get_available_crop()
{
global $wp_version;
// Return the only possible
if (version_compare($wp_version, '3.9', '<')) {
return array();
}
$x = array('left' => __('Left', 'simple-image-sizes'), 'center' => __('Center', 'simple-image-sizes'), 'right' => __('Right', 'simple-image-sizes'));
$y = array('top' => __('top', 'simple-image-sizes'), 'center' => __('center', 'simple-image-sizes'), 'bottom' => __('bottom', 'simple-image-sizes'));
/**
* Base crops
*/
$crops = array(0 => __('No', 'simple-image-sizes'), 1 => __('Yes', 'simple-image-sizes'));
foreach ($x as $x_pos => $x_pos_label) {
foreach ($y as $y_pos => $y_pos_label) {
$crops[$x_pos . '_' . $y_pos] = $x_pos_label . ' ' . $y_pos_label;
}
}
return $crops;
}