@@ 268-274 (lines=7) @@ | ||
265 | * |
|
266 | * @return string |
|
267 | */ |
|
268 | public function github_view_url() { |
|
269 | $github_path = get_post_meta( $this->id, '_wogh_github_path', true ); |
|
270 | $repository = $this->api->fetch()->repository(); |
|
271 | $branch = $this->api->fetch()->branch(); |
|
272 | ||
273 | return "https://github.com/$repository/blob/$branch/$github_path"; |
|
274 | } |
|
275 | ||
276 | /** |
|
277 | * Returns the URL for the post on GitHub. |
|
@@ 281-287 (lines=7) @@ | ||
278 | * |
|
279 | * @return string |
|
280 | */ |
|
281 | public function github_edit_url() { |
|
282 | $github_path = get_post_meta( $this->id, '_wogh_github_path', true ); |
|
283 | $repository = $this->api->fetch()->repository(); |
|
284 | $branch = $this->api->fetch()->branch(); |
|
285 | ||
286 | return "https://github.com/$repository/edit/$branch/$github_path"; |
|
287 | } |
|
288 | ||
289 | /** |
|
290 | * Retrieve post type directory from blob path. |