function Form($settings)
    {
        # Load options
        $this->load_options($settings);
        unset($settings);
        ?>
    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('title');
        ?>
"><?php 
        _e('Title:');
        ?>
</label>
      <input type="text" id="<?php 
        echo $this->Get_Field_Id('title');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('title');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('title'));
        ?>
" class="widefat">
      <small><?php 
        echo I18n::t('Leave blank to use the widget default title.');
        ?>
</small>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('taxonomy');
        ?>
"><?php 
        echo I18n::t('Taxonomy:');
        ?>
</label>
      <select id="<?php 
        echo $this->Get_Field_Id('taxonomy');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('taxonomy');
        ?>
" class="widefat">
      <?php 
        foreach (Get_Object_Taxonomies($this->core->gallery_post_type->name) as $taxonomy) {
            $taxonomy = Get_Taxonomy($taxonomy);
            ?>
      <option value="<?php 
            echo $taxonomy->name;
            ?>
" <?php 
            Selected($this->get_option('taxonomy'), $taxonomy->name);
            ?>
><?php 
            echo HTMLSpecialChars($taxonomy->labels->name);
            ?>
</option>
      <?php 
        }
        ?>
      </select><br>
      <small><?php 
        echo I18n::t('Please choose the Taxonomy the widget should display.');
        ?>
</small>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('number');
        ?>
"><?php 
        echo I18n::t('Number of terms:');
        ?>
</label>
      <input type="number" id="<?php 
        echo $this->Get_Field_Id('number');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('number');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('number'));
        ?>
"><br>
      <small><?php 
        echo I18n::t('Leave blank to show all.');
        ?>
</small>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('exclude');
        ?>
"><?php 
        _e('Exclude:');
        ?>
</label>
      <input type="text" value="<?php 
        echo Esc_Attr($this->Get_Option('exclude'));
        ?>
" name="<?php 
        echo $this->Get_Field_Name('exclude');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('exclude');
        ?>
" class="widefat">
      <small><?php 
        echo I18n::t('Term IDs, separated by commas.');
        ?>
</small>
    </p>

    <p>
      <input type="checkbox" id="<?php 
        echo $this->Get_Field_Id('count');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('count');
        ?>
" <?php 
        Checked($this->Get_Option('count'));
        ?>
 >
      <label for="<?php 
        echo $this->Get_Field_Id('count');
        ?>
"><?php 
        echo I18n::t('Show Gallery counts.');
        ?>
</label>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('orderby');
        ?>
"><?php 
        echo I18n::t('Order by:');
        ?>
</label>
      <select id="<?php 
        echo $this->Get_Field_Id('orderby');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('orderby');
        ?>
" class="widefat">
      <option value="name" <?php 
        Selected($this->Get_Option('orderby'), 'name');
        ?>
><?php 
        _e('Name');
        ?>
</option>
      <option value="count" <?php 
        Selected($this->Get_Option('orderby'), 'count');
        ?>
><?php 
        echo I18n::t('Gallery Count');
        ?>
</option>
      <option value="ID" <?php 
        Selected($this->Get_Option('orderby'), 'ID');
        ?>
>ID</option>
      <option value="slug" <?php 
        Selected($this->Get_Option('orderby'), 'slug');
        ?>
><?php 
        echo I18n::t('Slug');
        ?>
</option>
      </select>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('order');
        ?>
"><?php 
        echo I18n::t('Order:');
        ?>
</label>
      <select id="<?php 
        echo $this->Get_Field_Id('order');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('order');
        ?>
" class="widefat">
      <option value="ASC" <?php 
        Selected($this->Get_Option('order'), 'ASC');
        ?>
><?php 
        _e('Ascending');
        ?>
</option>
      <option value="DESC" <?php 
        Selected($this->Get_Option('order'), 'DESC');
        ?>
><?php 
        _e('Descending');
        ?>
</option>
      </select>
    </p>

    <?php 
    }
    function Form($settings)
    {
        # Load options
        $this->load_options($settings);
        unset($settings);
        ?>
    <p style="color:green"><?php 
        $this->core->mocking_bird->Pro_Notice('widget');
        ?>
</p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('title');
        ?>
"><?php 
        _e('Title:');
        ?>
</label>
      <input type="text" id="<?php 
        echo $this->Get_Field_Id('title');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('title');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('title'));
        ?>
" class="widefat">
      <small><?php 
        echo $this->t('Leave blank to use the widget default title.');
        ?>
</small>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('limit');
        ?>
"><?php 
        echo $this->t('Number of Images:');
        ?>
</label>
      <input type="number" id="<?php 
        echo $this->Get_Field_Id('limit');
        ?>
" name="<?php 
        echo $this->Get_Field_Name('limit');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('limit'));
        ?>
" class="widefat">
      <small><?php 
        echo $this->t('Leave blank (or "0") to show all.');
        ?>
</small>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('link_target');
        ?>
"><?php 
        echo $this->t('Link target:');
        ?>
</label>
      <select name="<?php 
        echo $this->Get_Field_Name('link_target');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('link_target');
        ?>
" class="widefat">
        <option value="file" <?php 
        Selected($this->Get_Option('link_target'), 'file');
        ?>
><?php 
        echo $this->t('Fullsize Image');
        ?>
</option>
        <option value="gallery" <?php 
        Selected($this->Get_Option('link_target'), 'gallery');
        ?>
><?php 
        echo $this->t('Image Gallery');
        ?>
</option>
      </select>
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('thumb_width');
        ?>
"><?php 
        echo $this->t('Thumbnail width:');
        ?>
</label>
      <input type="number" name="<?php 
        echo $this->Get_Field_Name('thumb_width');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('thumb_width');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('thumb_width'));
        ?>
" <?php 
        Disabled(True);
        ?>
 > px
    </p>

    <p>
      <label for="<?php 
        echo $this->Get_Field_Id('thumb_height');
        ?>
"><?php 
        echo $this->t('Thumbnail height:');
        ?>
</label>
      <input type="number" name="<?php 
        echo $this->Get_Field_Name('thumb_height');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('thumb_height');
        ?>
" value="<?php 
        echo Esc_Attr($this->Get_Option('thumb_height'));
        ?>
" <?php 
        Disabled(True);
        ?>
 > px
    </p>

    <p>
      <input type="checkbox" name="<?php 
        echo $this->Get_Field_Name('thumb_grayscale');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('thumb_grayscale');
        ?>
" value="yes" <?php 
        Disabled(True);
        ?>
  >
      <label for="<?php 
        echo $this->Get_Field_Id('thumb_grayscale');
        ?>
"><?php 
        echo $this->t('Convert thumbnails to grayscale.');
        ?>
</label>
    </p>

    <p>
      <input type="checkbox" name="<?php 
        echo $this->Get_Field_Name('thumb_negate');
        ?>
" id="<?php 
        echo $this->Get_Field_Id('thumb_negate');
        ?>
" value="yes" <?php 
        Disabled(True);
        ?>
 >
      <label for="<?php 
        echo $this->Get_Field_Id('thumb_negate');
        ?>
"><?php 
        echo $this->t('Negate the thumbnails.');
        ?>
</label>
    </p>

    <h3><?php 
        echo $this->t('Template');
        ?>
</h3>
    <p><?php 
        echo $this->t('Please choose a template to display this widget.');
        ?>
</p>
    <?php 
        foreach ($this->core->Get_Template_Files() as $name => $properties) {
            ?>
    <p>
      <input type="radio" name="<?php 
            echo $this->Get_Field_Name('template');
            ?>
" id="<?php 
            echo Sanitize_Title($properties['name']);
            ?>
" value="<?php 
            echo Esc_Attr($properties['file']);
            ?>
"
        <?php 
            Checked($this->Get_Option('template'), $properties['file']);
            ?>
        <?php 
            Checked(!$this->Get_Option('template') && $properties['file'] == $this->core->Get_Default_Template());
            ?>
 >
      <label for="<?php 
            echo Sanitize_Title($properties['name']);
            ?>
">
      <?php 
            if (empty($properties['name'])) {
                ?>
        <em><?php 
                echo $properties['file'];
                ?>
</em>
      <?php 
            } else {
                ?>
        <strong><?php 
                echo $properties['name'];
                ?>
</strong>
      <?php 
            }
            ?>
      </label>
      <?php 
            if ($properties['description']) {
                ?>
<br>
      <?php 
                echo $properties['description'];
            }
            ?>
    </p>
    <?php 
        }
    }
Exemple #3
0
<p>
  <label for="<?php 
echo $this->Field_Name('thumb_height');
?>
"><?php 
echo $this->t('Thumbnail height:');
?>
</label>
  <input type="number" name="<?php 
echo $this->Field_Name('thumb_height');
?>
" id="<?php 
echo $this->Field_Name('thumb_height');
?>
" value="<?php 
echo Esc_Attr($this->Get_Meta('thumb_height'));
?>
" <?php 
Disabled(True);
?>
 > px <span class="asterisk">*</span>
</p>

<p>
  <input type="checkbox" name="<?php 
echo $this->Field_Name('thumb_grayscale');
?>
" id="<?php 
echo $this->Field_Name('thumb_grayscale');
?>
" value="yes" <?php 
Exemple #4
0
?>
" <?php 
Disabled(True);
?>
 > px
    <span class="asterisk">*</span>
  </td>
</tr>
<tr>
  <td><label for=""><?php 
echo $this->t('Thumbnail height');
?>
</label></td>
  <td>
    <input type="number" id="" value="<?php 
echo Esc_Attr($this->Get('excerpt_thumb_height'));
?>
" <?php 
Disabled(True);
?>
 > px
    <span class="asterisk">*</span>
  </td>
</tr>
</table>

<p>
  <span class="asterisk">*</span>
  <?php 
echo $this->core->mocking_bird->Pro_Notice('feature');
?>
Exemple #5
0
" title="<?php 
    echo Esc_Attr($image->title);
    ?>
" class="<?php 
    echo Esc_Attr($this->gallery->attributes->link_class);
    ?>
"  data-caption="<?php 
    echo Esc_Attr($image->caption);
    ?>
" data-description="<?php 
    echo Esc_Attr($image->description);
    ?>
">
        <img <?php 
    foreach ($image->attributes as $attribute => $value) {
        PrintF('%s="%s" ', $attribute, Esc_Attr($value));
    }
    ?>
 >
      </a>
    </div>

    <?php 
    /* If (!Empty($image->caption)): ?>
       <figcaption class="wp-caption-text gallery-caption"><?php Echo WPTexturize($image->caption) ?></figcaption>
       <?php EndIf */
    ?>

  </figure>
  <?php 
}