Exemplo n.º 1
0
        function album_custom_column_content($column)
        {
            global $post;
            switch ($column) {
                case FOOGALLERY_CPT_ALBUM . '_template':
                    $album = FooGalleryAlbum::get($post);
                    $template = $album->album_template_details();
                    if (false !== $template) {
                        echo $template['name'];
                    }
                    break;
                case FOOGALLERY_CPT_ALBUM . '_galleries':
                    $album = FooGalleryAlbum::get($post);
                    echo $album->gallery_count();
                    break;
                case FOOGALLERY_CPT_ALBUM . '_shortcode':
                    $album = FooGalleryAlbum::get($post);
                    $shortcode = $album->shortcode();
                    echo '<code data-clipboard-text="' . esc_attr($shortcode) . '"
					  title="' . esc_attr__('Click to copy to your clipboard', 'foogallery') . '"
					  class="foogallery-shortcode">' . $shortcode . '</code>';
                    $this->include_clipboard_script = true;
                    break;
            }
        }
Exemplo n.º 2
0
 public function get_album($post)
 {
     if (!isset($this->_album)) {
         $this->_album = FooGalleryAlbum::get($post);
     }
     return $this->_album;
 }
Exemplo n.º 3
0
 function album_custom_column_content($column)
 {
     global $post;
     switch ($column) {
         case FOOGALLERY_CPT_ALBUM . '_template':
             $album = FooGalleryAlbum::get($post);
             $template = $album->album_template_details();
             if (false !== $template) {
                 echo $template['name'];
             }
             break;
         case FOOGALLERY_CPT_ALBUM . '_galleries':
             $album = FooGalleryAlbum::get($post);
             echo $album->gallery_count();
             break;
         case FOOGALLERY_CPT_ALBUM . '_shortcode':
             $album = FooGalleryAlbum::get($post);
             $shortcode = $album->shortcode();
             echo '<input type="text" readonly="readonly" size="' . strlen($shortcode) . '" value="' . esc_attr($shortcode) . '" class="foogallery-shortcode" />';
             $this->include_clipboard_script = true;
             break;
     }
 }