Skip to content

Commit

Permalink
more gallery component refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
Bearded Avenger committed Aug 14, 2014
1 parent 8d1b7c0 commit 4caa3d7
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions public/includes/components/component-gallery.php
Expand Up @@ -22,12 +22,9 @@ function aesop_post_gallery($atts, $content = null){

global $post;

// do cusotm atts
$defaults = array(
'id' => '',
'a_type' => ''
);
$atts = shortcode_atts($defaults, $atts);
// attributes
$defaults = array('id' => '','a_type' => '');
$atts = shortcode_atts($defaults, $atts);

// gallery ID
$gallery_id = $atts['id'];
Expand All @@ -51,7 +48,6 @@ function aesop_post_gallery($atts, $content = null){
// set the type of gallery into post meta
update_post_meta( $gallery_id, 'aesop_gallery_type', $type );


ob_start();

do_action('aesop_gallery_before', $type, $gallery_id); //action
Expand Down Expand Up @@ -90,7 +86,7 @@ function aesop_post_gallery($atts, $content = null){
if ( is_user_logged_in() ) {
$url = admin_url( 'post.php?post='.$gallery_id.'&action=edit' );
$edit_gallery = __('edit gallery', 'aesop-core');
printf('<a class="aesop-gallery-edit" href="%s" target="_blank" title="Edit this gallery">(%s)</a>',$url, $edit_gallery );
printf('<a class="aesop-gallery-edit aesop-content" href="%s" target="_blank" title="%s">(%s)</a>',$url, $edit_gallery, $edit_gallery );
}

} else {
Expand Down Expand Up @@ -220,7 +216,7 @@ function aesop_stacked_gallery( $gallery_id, $image_ids, $width, $unique){

foreach ( $image_ids as $image_id ):

$full = wp_get_attachment_url($image-_id, 'full', false,'');
$full = wp_get_attachment_url($image_id, 'full', false,'');
$alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);
$caption = $image_id->post_excerpt;
$desc = $image_id->post_content;
Expand Down Expand Up @@ -334,7 +330,7 @@ function aesop_photoset_gallery($gallery_id, $image_ids, $width){

foreach ($image_ids as $image_id):

$full = wp_get_attachment_url($image_id);
$full = wp_get_attachment_url($image_id, 'large', false, '');
$alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);
$caption = $image_id->post_excerpt;
$desc = $image_id->post_content;
Expand Down

0 comments on commit 4caa3d7

Please sign in to comment.