Changeset 3487710
- Timestamp:
- 03/21/2026 10:23:33 AM (7 days ago)
- Location:
- advanced-addons-theme-core-exporter
- Files:
-
- 2 edited
-
tags/1.0.1/advanced-addons-theme-core-exporter.php (modified) (2 diffs)
-
trunk/advanced-addons-theme-core-exporter.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-addons-theme-core-exporter/tags/1.0.1/advanced-addons-theme-core-exporter.php
r3446159 r3487710 71 71 72 72 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), [ $this, 'aptce_add_settings_link']); 73 add_filter( 'plugin_row_meta', [ $this, 'aptce_add_review_row_meta' ], 10, 2 ); 73 74 } 74 75 … … 148 149 '</a>'; 149 150 150 // Add thelink at the first position151 // Add link at the first position 151 152 array_unshift( $links, $settings_link ); 152 153 153 154 return $links; 155 } 156 157 public function aptce_add_review_row_meta( $plugin_meta, $plugin_file ) { 158 if ( plugin_basename( __FILE__ ) !== $plugin_file ) { 159 return $plugin_meta; 160 } 161 162 $review_link = '<a href="' . esc_url( 'https://wordpress.org/support/plugin/advanced-addons-theme-core-exporter/reviews/' ) . '" target="_blank" rel="noopener noreferrer">' . 163 __( 'Leave a review', 'advanced-addons-theme-core-exporter' ) . 164 '</a>'; 165 166 $inserted = false; 167 foreach ( $plugin_meta as $index => $meta_item ) { 168 if ( false !== strpos( $meta_item, 'plugin-install.php?tab=plugin-information' ) ) { 169 array_splice( $plugin_meta, $index + 1, 0, [ $review_link ] ); 170 $inserted = true; 171 break; 172 } 173 } 174 175 if ( ! $inserted ) { 176 $plugin_meta[] = $review_link; 177 } 178 179 return $plugin_meta; 154 180 } 155 181 -
advanced-addons-theme-core-exporter/trunk/advanced-addons-theme-core-exporter.php
r3446159 r3487710 71 71 72 72 add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), [ $this, 'aptce_add_settings_link']); 73 add_filter( 'plugin_row_meta', [ $this, 'aptce_add_review_row_meta' ], 10, 2 ); 73 74 } 74 75 … … 148 149 '</a>'; 149 150 150 // Add thelink at the first position151 // Add link at the first position 151 152 array_unshift( $links, $settings_link ); 152 153 153 154 return $links; 155 } 156 157 public function aptce_add_review_row_meta( $plugin_meta, $plugin_file ) { 158 if ( plugin_basename( __FILE__ ) !== $plugin_file ) { 159 return $plugin_meta; 160 } 161 162 $review_link = '<a href="' . esc_url( 'https://wordpress.org/support/plugin/advanced-addons-theme-core-exporter/reviews/' ) . '" target="_blank" rel="noopener noreferrer">' . 163 __( 'Leave a review', 'advanced-addons-theme-core-exporter' ) . 164 '</a>'; 165 166 $inserted = false; 167 foreach ( $plugin_meta as $index => $meta_item ) { 168 if ( false !== strpos( $meta_item, 'plugin-install.php?tab=plugin-information' ) ) { 169 array_splice( $plugin_meta, $index + 1, 0, [ $review_link ] ); 170 $inserted = true; 171 break; 172 } 173 } 174 175 if ( ! $inserted ) { 176 $plugin_meta[] = $review_link; 177 } 178 179 return $plugin_meta; 154 180 } 155 181
Note: See TracChangeset
for help on using the changeset viewer.