@@ -73,11 +73,9 @@ function tootpress_paint_image($tootid){
7373 $ toot_image =array ();
7474 $ toot_image =tootpress_get_media_from_database ($ tootid );
7575 $ image_html ='' ;
76-
77- // Amount of Images
7876 $ amount_of_images =sizeof ($ toot_image );
7977
80- // DOM Structure
78+ // DOM
8179 $ image_html .='<div class="toot-image"> ' ;
8280 $ image_html .='<div class=" ' ;
8381 if ($ amount_of_images >1 ) {
@@ -88,11 +86,11 @@ function tootpress_paint_image($tootid){
8886 }
8987 $ image_html .='"> ' ;
9088
89+ // Image Loop
9190 for ($ i =0 ;$ i <$ amount_of_images ;$ i ++) {
9291
93- // Classes
92+ // Gallery
9493 if ($ amount_of_images >1 ) {
95- // Galleries
9694 $ image_html .='<div class=" ' ;
9795 $ image_html .='toot-gallery-image toot-gallery-image- ' .(int ) ($ i +1 );
9896 $ image_html .='"> ' ;
@@ -101,7 +99,7 @@ function tootpress_paint_image($tootid){
10199 // Image Tag
102100 $ image_html .=tootpress_paint_image_tag ($ toot_image [$ i ]['attachment_file ' ],$ toot_image [$ i ]['attachment_description ' ],$ toot_image [$ i ]['attachment_width ' ],$ toot_image [$ i ]['attachment_height ' ],$ amount_of_images ,($ i +1 ));
103101
104- // Galleries
102+ // Close
105103 if ($ amount_of_images >1 ) {$ image_html .='</div> ' ;}
106104
107105 }
@@ -122,18 +120,19 @@ function tootpress_paint_image($tootid){
122120 * @param int Image Height
123121 * @param int Amount of Images
124122 * @param int Image Number
125- * @return string Image Tag
123+ * @return html Image Tag
126124 */
127125
128126function tootpress_paint_image_tag ($ filename , $ description , $ width , $ height , $ amount_of_images , $ image_number ) {
129127
130- // ALT
128+ // Preparation
131129 if ($ description ==FALSE ) {$ description ='Sorry! No image description created. ' ;}
130+ $ image_dir =tootpress_get_url_image_directory ();
132131
133132 // Image Tag
134133 $ image_tag ='<img ' ;
135134 $ image_tag .='src=" ' ;
136- $ image_tag .=esc_url (tootpress_get_url_image_directory () );
135+ $ image_tag .=esc_url ($ image_dir );
137136 $ image_tag .=esc_html ($ filename );
138137 $ image_tag .='" ' ;
139138 $ image_tag .='alt=" ' ;
@@ -147,7 +146,7 @@ function tootpress_paint_image_tag($filename, $description, $width, $height, $am
147146 $ image_tag .='" /> ' ;
148147
149148 // Filter
150- $ image_tag =tootpress_image_filter_apply ($ image_tag ,$ filename ,$ description , $ width ,$ height ,tootpress_get_url_image_directory () ,$ amount_of_images ,$ image_number );
149+ $ image_tag =tootpress_image_filter_apply ($ image_tag ,$ filename ,$ description , $ width ,$ height ,$ image_dir ,$ amount_of_images ,$ image_number );
151150
152151 return $ image_tag ;
153152
@@ -162,7 +161,7 @@ function tootpress_paint_image_tag($filename, $description, $width, $height, $am
162161 * @param string Mastodon Account
163162 * @param int Mastodon Toot ID
164163 * @param int Backlink Option
165- * @return string html
164+ * @return html Elephant
166165 */
167166
168167function tootpress_paint_elephant ( $ instance , $ account , $ mastodon_id , $ backlink ) {
@@ -224,12 +223,12 @@ function tootpress_paint_date($date) {
224223}
225224
226225/**
227- * Creates the Preamble
226+ * Create the Preamble
228227 *
229228 * @since 0.4
230229 *
231230 * @param int TootPress Current Page
232- * @return string html
231+ * @return html Preamble
233232 */
234233
235234 function tootpress_paint_preamble ($ tootpress_current_page ) {
@@ -251,12 +250,12 @@ function tootpress_paint_preamble($tootpress_current_page) {
251250}
252251
253252/**
254- * Creates the Closing Filter Content
253+ * Create the Closing
255254 *
256255 * @since 0.5
257256 *
258257 * @param int TootPress Current Page
259- * @return string Content
258+ * @return html Content
260259 */
261260
262261 function tootpress_paint_closing ($ tootpress_current_page ) {
@@ -285,7 +284,7 @@ function tootpress_paint_closing($tootpress_current_page) {
285284 *
286285 * @param string empty
287286 * @param int TootPress Current Page
288- * @return string Content
287+ * @return html Content
289288 */
290289
291290function tootpress_paint_beforeloop ($ tootpress_current_page ) {
@@ -308,7 +307,7 @@ function tootpress_paint_beforeloop($tootpress_current_page) {
308307 *
309308 * @param string empty
310309 * @param int TootPress Current Page
311- * @return string Content
310+ * @return html Content
312311 */
313312
314313function tootpress_paint_afterloop ($ tootpress_current_page ) {
@@ -330,7 +329,7 @@ function tootpress_paint_afterloop($tootpress_current_page) {
330329 * @since 0.5
331330 *
332331 * @param int Open Loops
333- * @return string Between Element
332+ * @return html Between Element
334333 */
335334
336335function tootpress_paint_between ($ open_loops ) {
0 commit comments