Skip to content

Commit e6c65df

Browse files
committed
Closing Filter Name
1 parent c3f0ce7 commit e6c65df

File tree

5 files changed

+52
-23
lines changed

5 files changed

+52
-23
lines changed

readme.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ You can use the following code.
115115

116116
### Filter
117117

118-
#### tootpress_preamble_add
118+
#### tootpress_preamble_filter
119119

120-
This filter outputs html content before the toot loop.
120+
This filter outputs html content before the initial toot loop.
121121
You can use the following code.
122122

123123
function tootpress_preamble_add( $preamble ) {
@@ -130,6 +130,21 @@ You can use the following code.
130130
}
131131
add_filter( 'tootpress_preamble_filter', 'tootpress_preamble_add', 10, 1 );
132132

133+
#### tootpress_closing_filter
134+
135+
This filter outputs html content after the last toot loop.
136+
You can use the following code.
137+
138+
function tootpress_closing_add( $content ) {
139+
140+
// Add your filter code here
141+
// Example: $content='<p>Hello World.</p>';
142+
143+
return $content;
144+
145+
}
146+
add_filter( 'tootpress_closing_filter', 'tootpress_closing_add', 10, 1 );
147+
133148
## WordPress Framework
134149

135150
Following components of WordPress are used in TootPress.
@@ -209,8 +224,8 @@ This project is licensed under the GPL3 License.
209224

210225
### 0.5 "xxx"
211226

212-
* xxx 2025
213-
* Feature: Afterloop Filter
227+
* xxx
228+
* Feature: Closing Filter
214229

215230
### 0.4 "Cassie Lang"
216231

readme.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ You can use the following code.
116116
`}`
117117
`add_action('tootpress_toots_update', 'tootpress_toots_update_postprocessing');`
118118

119-
**Filter: tootpress_preamble_add**
119+
**Filter: tootpress_preamble_filter**
120120
It outputs html content before the toot loop.
121121
You can use the following code.
122122

@@ -130,6 +130,20 @@ You can use the following code.
130130
`}`
131131
`add_filter( 'tootpress_preamble_filter', 'tootpress_preamble_add', 10, 1 );`
132132

133+
**Filter: tootpress_closing_filter**
134+
It outputs html content after the last toot loop.
135+
You can use the following code.
136+
137+
`function tootpress_closing_add( $content ) {`
138+
``
139+
` // Add your filter code here`
140+
` // Example: $content='<p>Hello World.</p>';`
141+
``
142+
` return $content;`
143+
``
144+
`}`
145+
`add_filter( 'tootpress_closing_filter', 'tootpress_closing_add', 10, 1 );`
146+
133147
= Related Links =
134148

135149
* [Source Code @ GitHub](https://github.com/circuscode/tootpress)

tootpress_blog.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,25 +182,25 @@ function tootpress_paint_preamble($tootpress_current_page) {
182182
}
183183

184184
/**
185-
* Creates the Afterloop Content
185+
* Creates the Closing Filter Content
186186
*
187187
* @since 0.5
188188
*
189189
* @param int TootPress Current Page
190-
* @return string html
190+
* @return string Content
191191
*/
192192

193-
function tootpress_paint_afterloop($tootpress_current_page) {
193+
function tootpress_paint_closing($tootpress_current_page) {
194194

195195
$content='';
196196
$lastpage=tootpress_amount_of_pages();
197197

198198
if($tootpress_current_page==$lastpage) {
199199

200-
$content.=tootpress_afterloop_filter_apply($content);
200+
$content.=tootpress_closing_filter_apply($content);
201201

202202
if($content) {
203-
$content='<div class="tootpress-afterloop">'.$content.'</div>';
203+
$content='<div class="tootpress-closing">'.$content.'</div>';
204204
}
205205

206206
}

tootpress_hooks.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function tootpress_fire_toots_update() {
4848
/**
4949
* Preample
5050
*
51-
* This filter outputs html content before the toot loop.
51+
* This filter outputs html content before the initial toot loop.
5252
*
5353
* @since 0.4
5454
*
@@ -82,38 +82,38 @@ function tootpress_preamble_filter_apply($preamble) {
8282
*/
8383

8484
/**
85-
* Afterloop Filter
85+
* Closing Filter
8686
*
87-
* This filter outputs html content after the toot loop.
87+
* This filter outputs content after the last toot loop.
8888
*
8989
* @since 0.5
9090
*
91-
* @param string Unfiltered Content
92-
* @return html Filtered Content
91+
* @param string Content
92+
* @return string Filtered Content
9393
*/
9494

95-
function tootpress_afterloop_filter_apply($content) {
96-
$content.=apply_filters( 'tootpress_afterloop_filter', $content );
95+
function tootpress_closing_filter_apply($content) {
96+
$content.=apply_filters( 'tootpress_closing_filter', $content );
9797
return $content;
9898
}
9999

100100
/**
101-
* Filter Example: tootpress_afterloop_filter
101+
* Filter Example: tootpress_closing_filter
102102
*
103103
* @since 0.5
104104
*
105-
* @param string Unfiltered Content
106-
* @return html Filtered Content
105+
* @param string Content
106+
* @return string Filtered Content
107107
*
108-
* function tootpress_afterloop_add( $content ) {
108+
* function tootpress_closing_add( $content ) {
109109
*
110110
* // Add your filter code here
111111
* // Example: $content='<p>Hello World.</p>';
112112
*
113113
* return $content;
114114
*
115115
* }
116-
* add_filter( 'tootpress_afterloop_filter', 'tootpress_afterloop_add', 10, 1 );
116+
* add_filter( 'tootpress_closing_filter', 'tootpress_closing_add', 10, 1 );
117117
*
118118
*/
119119

tootpress_loop.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function tootpress_content($content) {
3939
$tootpress_content.=tootpress_loop($tootpress_current_page);
4040

4141
// TootPress Afterloop
42-
$tootpress_content.=tootpress_paint_afterloop($tootpress_current_page);
42+
$tootpress_content.=tootpress_paint_closing($tootpress_current_page);
4343

4444
// TootPress Bottom Navigation
4545
$tootpress_content.=tootpress_create_menu($tootpress_current_page);

0 commit comments

Comments
 (0)