Пример #1
0
function nice_gallery_shortcode_handler($attrs)
{
    $id = esc_attr($attrs['id']);
    $wrapper_classes = esc_attr($attrs['wrapper_classes']);
    $item_classes = esc_attr($attrs['item_classes']);
    return nice_gallery_render($id, $wrapper_classes, $item_classes);
}
Пример #2
0
foreach ($wpdb->get_results("SELECT * FROM nice_gallery LIMIT 30") as $key => $row) {
    $id = $row->id;
    $name = $row->gallery_name;
    $images = $row->gallery_images;
    $status = $row->gallery_status;
    ?>
      <tr>
        <td><?php 
    echo $id;
    ?>
</td>
        <td><?php 
    echo $name;
    ?>
<br><?php 
    echo nice_gallery_render($id, 'inline', '');
    ?>
</td>
        <td><a class="button button-small" href="<?php 
    echo $ng_root;
    ?>
&ng_page=change&ng_id=<?php 
    echo $id;
    ?>
">Edit</a> <a class="button button-small button-danger" href="<?php 
    echo $ng_root;
    ?>
&ng_page=delete&ng_id=<?php 
    echo $id;
    ?>
">Disable</a></td>