PluginProbe
Meow Gallery / 4.2.2
Meow Gallery v4.2.2
5.5.5 5.5.4 5.5.3 5.5.2 5.5.1 5.5.0 5.4.9 5.4.8 5.4.7 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 All 157 releases
← All changes | classes/core.php +4 -19 4.2.7 → 4.2.2 View file →
@@ -57,31 +57,21 @@
57 57 $atts = apply_filters( 'shortcode_atts_gallery', $atts, null, $atts );
58 58
59 59 // Get the IDs
60 60 $images = array();
61 - if ( isset( $atts['ids'] ) ) {
61 + if ( isset( $atts['ids'] ) )
62 62 $images = $atts['ids'];
63 - }
64 63 if ( isset( $atts['include'] ) ) {
65 64 $images = is_array( $atts['include'] ) ? implode( ',', $atts['include'] ) : $atts['include'];
66 65 $atts['include'] = $images;
67 66 }
68 -
69 - // Filter the IDs
70 - $ids = is_array( $images ) ? $images : explode( ',', $images );
71 - $ids = apply_filters( 'mgl_ids', $ids, $atts );
72 - $images = implode( ',', $ids );
73 -
74 - // Use attached images if still empty
75 67 if ( empty( $images ) ) {
76 68 $attachments = get_attached_media( 'image' );
77 69 $attachmentIds = array_map( function($x) { return $x->ID; }, $attachments );
78 - if ( !empty( $attachmentIds ) ) {
70 + if ( !empty( $attachmentIds ) )
79 71 $images = implode( ',', $attachmentIds );
80 - }
81 - else {
72 + else
82 73 return "<p class='meow-error'><b>Meow Gallery:</b> The gallery is empty.</p>";
83 - }
84 74 }
85 75
86 76 if ( $isPreview ) {
87 77 $check = explode( ',', $images );
@@ -125,12 +115,9 @@
125 115
126 116 // Start the process of building the gallery
127 117 $this->gallery_process = true;
128 118 $this->gallery_layout = $layout;
129 -
130 - // This should be probably removed.
131 - // wp_enqueue_style( 'mgl-css' );
132 -
119 + wp_enqueue_style( 'mgl-css' );
133 120 $infinite = get_option( 'mgl_infinite', false ) && class_exists( 'MeowPro_MGL_Core' );
134 121 $gen = new $layoutClass( $atts, !$isPreview && $infinite, $isPreview );
135 122 $result = $gen->build( $images );
136 123 $this->gallery_process = false;
@@ -135,10 +122,8 @@
135 122 $result = $gen->build( $images );
136 123 $this->gallery_process = false;
137 124 do_action( 'mgl_' . $layout . '_gallery_created', $layout );
138 125 //$result = apply_filters( 'post_gallery', $result, $atts, null );
139 -
140 - do_action( 'mgl_gallery_created' );
141 126
142 127 return $result;
143 128 }
144 129 }