@@ -38,12 +38,13 @@ function tootpress_fire_toots_update() {
3838 *
3939 * @since 0.4
4040 *
41- * @param string Empty
42- * @return string Filtered Preample
41+ * @param string Preamble
42+ * @return html Filtered Preamble
4343 */
4444
4545function tootpress_preamble_filter_apply ($ preamble ) {
4646 $ preamble =apply_filters ( 'tootpress_preamble_filter ' , $ preamble );
47+ $ preamble =wp_kses_post ($ preamble );
4748 return $ preamble ;
4849}
4950
@@ -54,12 +55,13 @@ function tootpress_preamble_filter_apply($preamble) {
5455 *
5556 * @since 0.5
5657 *
57- * @param string Empty
58- * @return string Filtered Content
58+ * @param string Closing
59+ * @return html Filtered Closing
5960 */
6061
6162function tootpress_closing_filter_apply ($ content ) {
6263 $ content =apply_filters ( 'tootpress_closing_filter ' , $ content );
64+ $ content =wp_kses_post ($ content );
6365 return $ content ;
6466}
6567
@@ -76,6 +78,7 @@ function tootpress_closing_filter_apply($content) {
7678
7779function tootpress_menu_forward_filter_apply ($ label ) {
7880 $ label =apply_filters ( 'tootpress_menu_forward_label ' , $ label );
81+ $ label =esc_html ($ label );
7982 return $ label ;
8083}
8184
@@ -86,12 +89,13 @@ function tootpress_menu_forward_filter_apply($label) {
8689 *
8790 * @since 0.5
8891 *
89- * @param string Original Backward
92+ * @param string Original Label
9093 * @return string New Label
9194 */
9295
9396function tootpress_menu_backward_filter_apply ($ label ) {
9497 $ label =apply_filters ( 'tootpress_menu_backward_label ' , $ label );
98+ $ label =esc_html ($ label );
9599 return $ label ;
96100}
97101
@@ -103,9 +107,9 @@ function tootpress_menu_backward_filter_apply($label) {
103107 *
104108 * @since 0.5
105109 *
106- * @param string empty
110+ * @param string Content
107111 * @param int TootPress Current Page Number
108- * @return string Content
112+ * @return html Content
109113 */
110114
111115function tootpress_beforeloop_filter_apply ($ content , $ current_page_number ) {
@@ -114,6 +118,8 @@ function tootpress_beforeloop_filter_apply($content, $current_page_number) {
114118
115119 $ content =apply_filters ( 'tootpress_beforeloop_filter ' , $ content , $ current_page_number , $ last_page_number );
116120
121+ $ content =wp_kses_post ($ content );
122+
117123 return $ content ;
118124}
119125
@@ -125,9 +131,9 @@ function tootpress_beforeloop_filter_apply($content, $current_page_number) {
125131 *
126132 * @since 0.5
127133 *
128- * @param string empty
134+ * @param string Content
129135 * @param int TootPress Current Page Number
130- * @return string Content
136+ * @return html Content
131137 */
132138
133139function tootpress_afterloop_filter_apply ($ content , $ current_page_number ) {
@@ -136,6 +142,8 @@ function tootpress_afterloop_filter_apply($content, $current_page_number) {
136142
137143 $ content =apply_filters ( 'tootpress_afterloop_filter ' , $ content , $ current_page_number , $ last_page_number );
138144
145+ $ content =wp_kses_post ($ content );
146+
139147 return $ content ;
140148}
141149
@@ -146,12 +154,13 @@ function tootpress_afterloop_filter_apply($content, $current_page_number) {
146154 *
147155 * @since 0.5
148156 *
149- * @param string img HTML Tag ( Mastodon Logo)
150- * @return string img HTML Tag ( Custom Logo)
157+ * @param html Mastodon Logo
158+ * @return html Custom Logo
151159 */
152160
153161function tootpress_mastodon_logo_filter_apply ($ img ) {
154162 $ img =apply_filters ( 'tootpress_mastodon_logo_filter ' , $ img );
163+ $ img =wp_kses_post ($ img );
155164 return $ img ;
156165}
157166
@@ -162,12 +171,13 @@ function tootpress_mastodon_logo_filter_apply($img) {
162171 *
163172 * @since 0.5
164173 *
165- * @param string Empty
166- * @return string Between Content
174+ * @param string Content
175+ * @return html Between Content
167176 */
168177
169178function tootpress_between_filter_apply ($ content ) {
170179 $ content =apply_filters ( 'tootpress_between_filter ' , $ content );
180+ $ content =wp_kses_post ($ content );
171181 return $ content ;
172182}
173183
@@ -178,12 +188,13 @@ function tootpress_between_filter_apply($content) {
178188 *
179189 * @since 0.5
180190 *
181- * @param string Content
182- * @return string Filtered Content
191+ * @param html Content
192+ * @return html Filtered Content
183193 */
184194
185195function tootpress_toot_content_filter_apply ($ content ) {
186- $ content =apply_filters ( 'tootpress_toot_content_filter ' , $ content );
196+ $ content =apply_filters ( 'tootpress_toot_content_filter ' , $ content );
197+ $ content =wp_kses_post ($ content );
187198 return $ content ;
188199}
189200
@@ -211,6 +222,8 @@ function tootpress_date_filter_apply($date) {
211222
212223 $ date =apply_filters ( 'tootpress_date_filter ' , $ date , $ year , $ month , $ day , $ hour , $ minute , $ second );
213224
225+ $ date =esc_html ($ date );
226+
214227 return $ date ;
215228}
216229
@@ -221,15 +234,22 @@ function tootpress_date_filter_apply($date) {
221234 *
222235 * @since 0.5
223236 *
224- * @param string Image Tag
237+ * @param html Image Tag
238+ * @param string Image File Name
239+ * @param string Image Description
240+ * @param int Image Width
241+ * @param int Image Height
242+ * @param url TootPress Image Directory
225243 * @param int Amount of Images
226244 * @param int Image Number
227- * @return string Filtered Image Tag
245+ * @return html Filtered Image Tag
228246 */
229247
230- function tootpress_image_filter_apply ($ img_tag ,$ amount_of_images ,$ image_number ) {
248+ function tootpress_image_filter_apply ($ img_tag ,$ filename ,$ description ,$ width ,$ height ,$ image_directory_path ,$ amount_of_images ,$ image_number ) {
249+
250+ $ img_tag =apply_filters ( 'tootpress_image_filter ' ,$ img_tag ,$ filename ,$ description ,$ width ,$ height ,$ image_directory_path ,$ amount_of_images ,$ image_number );
231251
232- $ img_tag =apply_filters ( ' tootpress_image_filter ' , $ img_tag, $ amount_of_images , $ image_number );
252+ $ img_tag =wp_kses_post ( $ img_tag);
233253
234254 return $ img_tag ;
235255}
0 commit comments