Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit b5281b7

Browse files
committed
Add comment poster URL
1 parent e84570b commit b5281b7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/wpxf/wordpress/urls.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,9 @@ def wordpress_url_admin_profile
118118
def wordpress_url_rest_api
119119
normalize_uri(full_uri, 'wp-json')
120120
end
121+
122+
# @return [String] the comment poster URL.
123+
def wordpress_url_comments_post
124+
normalize_uri(full_uri, 'wp-comments-post.php')
125+
end
121126
end

spec/wordpress/urls_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,11 @@
174174
expect(subject.wordpress_url_rest_api).to eq url
175175
end
176176
end
177+
178+
describe '#wordpress_url_comments_post' do
179+
it 'returns the comment poster URL' do
180+
url = 'http://127.0.0.1/wp/wp-comments-post.php'
181+
expect(subject.wordpress_url_comments_post).to eq url
182+
end
183+
end
177184
end

0 commit comments

Comments
 (0)