Skip to content

Commit 382b1e4

Browse files
committed
removed duplicate code
1 parent d2120d7 commit 382b1e4

File tree

5 files changed

+20
-27
lines changed

5 files changed

+20
-27
lines changed

includes/class-webmention-receiver.php

-11
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public static function init() {
1414
// Filter the response to allow a webmention form if no parameters are passed
1515
add_filter( 'rest_pre_serve_request', array( 'Webmention_Receiver', 'serve_request' ), 9, 4 );
1616

17-
add_action( 'comment_form_after', array( 'Webmention_Receiver', 'comment_form' ), 11 );
18-
1917
// endpoint discovery
2018
add_action( 'wp_head', array( 'Webmention_Receiver', 'html_header' ), 99 );
2119
add_action( 'send_headers', array( 'Webmention_Receiver', 'http_header' ) );
@@ -463,15 +461,6 @@ public static function publish_post_hook( $post_id ) {
463461
}
464462
}
465463

466-
/**
467-
* Render the Webmention comment form
468-
*/
469-
public static function comment_form() {
470-
$template = apply_filters( 'webmention_comment_form', plugin_dir_path( __FILE__ ) . '../templates/webmention-comment-form.php' );
471-
472-
load_template( $template );
473-
}
474-
475464
/**
476465
* The Webmention autodicovery meta-tags
477466
*/

languages/wordpress-webmention.pot

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ msgid ""
44
msgstr ""
55
"Project-Id-Version: Webmention 3.1.0\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/webmention\n"
7-
"POT-Creation-Date: 2017-02-05 11:39:46+00:00\n"
7+
"POT-Creation-Date: 2017-02-05 13:10:14+00:00\n"
88
"MIME-Version: 1.0\n"
99
"Content-Type: text/plain; charset=utf-8\n"
1010
"Content-Transfer-Encoding: 8bit\n"
@@ -13,52 +13,52 @@ msgstr ""
1313
"Language-Team: LANGUAGE <LL@li.org>\n"
1414
"X-Generator: grunt-wp-i18n 0.5.4\n"
1515

16-
#: includes/class-webmention-receiver.php:115
16+
#: includes/class-webmention-receiver.php:113
1717
msgid "Source is missing"
1818
msgstr ""
1919

20-
#: includes/class-webmention-receiver.php:121
20+
#: includes/class-webmention-receiver.php:119
2121
msgid "Target is missing"
2222
msgstr ""
2323

24-
#: includes/class-webmention-receiver.php:127
24+
#: includes/class-webmention-receiver.php:125
2525
msgid "Target is not on this domain"
2626
msgstr ""
2727

28-
#: includes/class-webmention-receiver.php:133
28+
#: includes/class-webmention-receiver.php:131
2929
msgid "Target and source cannot direct to the same resource"
3030
msgstr ""
3131

32-
#: includes/class-webmention-receiver.php:138
33-
#: includes/class-webmention-receiver.php:148
32+
#: includes/class-webmention-receiver.php:136
33+
#: includes/class-webmention-receiver.php:146
3434
msgid "Target is not a valid post"
3535
msgstr ""
3636

37-
#: includes/class-webmention-receiver.php:143
37+
#: includes/class-webmention-receiver.php:141
3838
msgid "Pings are disabled for this post"
3939
msgstr ""
4040

41-
#: includes/class-webmention-receiver.php:275
41+
#: includes/class-webmention-receiver.php:273
4242
msgid "Invalid data passed"
4343
msgstr ""
4444

45-
#: includes/class-webmention-receiver.php:292
45+
#: includes/class-webmention-receiver.php:290
4646
msgid "Source URL not found"
4747
msgstr ""
4848

49-
#: includes/class-webmention-receiver.php:307
49+
#: includes/class-webmention-receiver.php:305
5050
msgid "Page has Been Deleted"
5151
msgstr ""
5252

53-
#: includes/class-webmention-receiver.php:309
53+
#: includes/class-webmention-receiver.php:307
5454
msgid "Page Removed for Legal Reasons"
5555
msgstr ""
5656

57-
#: includes/class-webmention-receiver.php:322
57+
#: includes/class-webmention-receiver.php:320
5858
msgid "Cannot find target link"
5959
msgstr ""
6060

61-
#: includes/class-webmention-receiver.php:449
61+
#: includes/class-webmention-receiver.php:447
6262
msgid "This %1$s was mentioned on <a href=\"%2$s\">%3$s</a>"
6363
msgstr ""
6464

@@ -155,7 +155,7 @@ msgstr ""
155155
msgid "Webmention Settings"
156156
msgstr ""
157157

158-
#: webmention.php:112
158+
#: webmention.php:114
159159
msgid "Webmentions"
160160
msgstr ""
161161

readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Project maintained on github at [pfefferle/wordpress-webmention](https://github.
7474
* added page support (server and client)
7575
* moved `webmention_post_id` filter to a global function (thanks @dshanske)
7676
* fixed https://wordpress.org/support/topic/form-for-entering-manual-pings-stays-on/
77+
* fixed some typos
7778

7879
### 3.0.1 ###
7980

readme.txt

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Project maintained on github at [pfefferle/wordpress-webmention](https://github.
7272
* added page support (server and client)
7373
* moved `webmention_post_id` filter to a global function (thanks @dshanske)
7474
* fixed https://wordpress.org/support/topic/form-for-entering-manual-pings-stays-on/
75+
* fixed some typos
7576

7677
= 3.0.1 =
7778

webmention.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ public static function discussion_settings() {
9595
* render the comment form
9696
*/
9797
public static function comment_form() {
98+
$template = apply_filters( 'webmention_comment_form', plugin_dir_path( __FILE__ ) . 'templates/webmention-comment-form.php' );
99+
98100
if ( 1 == get_option( 'webmention_show_comment_form' ) ) {
99-
load_template( plugin_dir_path( __FILE__ ) . 'templates/webmention-comment-form.php' );
101+
load_template( $template );
100102
}
101103
}
102104

0 commit comments

Comments
 (0)