Skip to content

Commit

Permalink
fix(options): remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andersthorborg committed Apr 1, 2017
1 parent 42099e2 commit c2a15e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions acf-image-crop-v4.php
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ function getImagePath($relativePath){
function filterMediaQuery($args){
// get options
$options = get_option( 'acf_image_crop_settings' );
$hide = $options['hide_cropped'];
$hide = isset($options['hide_cropped']) && $options['hide_cropped'];

// If hide option is enabled, do not select items with the acf_is_cropped meta-field
if($hide){
Expand Down Expand Up @@ -937,24 +937,24 @@ function registerSettings(){
function displayHideFromMediaInput(){
// Get plugin options
$options = get_option( 'acf_image_crop_settings' );
$value = $options['hide_cropped'];
$hide = isset($options['hide_cropped']) && $options['hide_cropped'];

// echo the field
?>
<input name='acf_image_crop_settings[hide_cropped]'
type='checkbox' <?php echo $value ? 'checked' : '' ?> value='true' />
type='checkbox' <?php echo $hide ? 'checked' : '' ?> value='true' />
<?php
}

function displayRetinaModeInput(){
// Get plugin options
$options = get_option( 'acf_image_crop_settings' );
$value = $options['retina_mode'];
$retina = isset($options['retina_mode']) && $options['retina_mode'];

// echo the field
?>
<input id="acf-image-crop-retina-mode" name='acf_image_crop_settings[retina_mode]'
type='checkbox' <?php echo $value ? 'checked' : '' ?> value='true' />
type='checkbox' <?php echo $retina ? 'checked' : '' ?> value='true' />
<?php
}

Expand Down

0 comments on commit c2a15e1

Please sign in to comment.