PluginProbe
Parse.ly / 3.14.1
Parse.ly v3.14.1
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
← All changes | src/UI/class-row-actions.php +11 -13 3.2.03.14.1 View file →
@@ -1,10 +1,10 @@
1 1 <?php
2 2 /**
3 - * Parsely row actions class
3 + * UI: Row actions class.
4 4 *
5 5 * @package Parsely
6 - * @since 2.6.0
6 + * @since 2.6.0
7 7 */
8 8
9 9 declare(strict_types=1);
10 10
@@ -14,9 +14,9 @@
14 14 use Parsely\Dashboard_Link;
15 15 use WP_Post;
16 16
17 17 /**
18 - * Handle the post/page row actions.
18 + * Handles the post/page row actions.
19 19 *
20 20 * @since 2.6.0
21 21 */
22 22 final class Row_Actions {
@@ -36,13 +36,11 @@
36 36 $this->parsely = $parsely;
37 37 }
38 38
39 39 /**
40 - * Register action and filter hook callbacks.
40 + * Registers action and filter hook callbacks.
41 41 *
42 42 * @since 2.6.0
43 - *
44 - * @return void
45 43 */
46 44 public function run(): void {
47 45 /**
48 46 * Filter whether row action links are enabled or not.
@@ -57,20 +55,20 @@
57 55 }
58 56 }
59 57
60 58 /**
61 - * Include a link to the statistics page for an article in the wp-admin Posts List.
59 + * Includes a link to the statistics page for an article in the wp-admin
60 + * Posts List.
62 61 *
63 - * If the post object is the "front page," this will include the main dashboard link instead.
62 + * If the post object is the "front page," this will include the main
63 + * dashboard link instead.
64 64 *
65 65 * @since 2.6.0
66 66 *
67 67 * @see https://developer.wordpress.org/reference/hooks/page_row_actions/
68 - * @see https://developer.wordpress.org/reference/hooks/post_row_actions/
69 68 *
70 69 * @param array<string, string> $actions The existing list of actions.
71 70 * @param WP_Post $post The individual post object the actions apply to.
72 - *
73 71 * @return array<string, string> The amended list of actions.
74 72 */
75 73 public function row_actions_add_parsely_link( array $actions, WP_Post $post ): array {
76 74 if ( ! Dashboard_Link::can_show_link( $post, $this->parsely ) ) {
@@ -76,9 +74,9 @@
76 74 if ( ! Dashboard_Link::can_show_link( $post, $this->parsely ) ) {
77 75 return $actions;
78 76 }
79 77
80 - $url = Dashboard_Link::generate_url( $post, $this->parsely->get_api_key(), 'wp-admin-posts-list', 'wp-admin' );
78 + $url = Dashboard_Link::generate_url( $post, $this->parsely->get_site_id(), 'wp-admin-posts-list', 'wp-admin' );
81 79 if ( '' !== $url ) {
82 80 $actions['find_in_parsely'] = $this->generate_link_to_parsely( $post, $url );
83 81 }
84 82
@@ -85,9 +83,9 @@
85 83 return $actions;
86 84 }
87 85
88 86 /**
89 - * Generate the HTML link to Parse.ly.
87 + * Generates the HTML link to Parse.ly.
90 88 *
91 89 * @since 2.6.0
92 90 * @since 3.1.2 Added `url` parameter.
93 91 *
@@ -104,9 +102,9 @@
104 102 );
105 103 }
106 104
107 105 /**
108 - * Generate ARIA label content.
106 + * Generates ARIA label content.
109 107 *
110 108 * @since 2.6.0
111 109 *
112 110 * @param WP_Post $post Which post object or ID to generate the ARIA label for.