Skip to content

Commit a4552b2

Browse files
authored
Merge pull request elementor#888 from WP2Static/feature/STR-STR-9651_update-plugin-screen-links
update plugin author; add link to Plugins screen entry
2 parents bf92bc8 + e407c17 commit a4552b2

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

css/admin/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ a[href*="wp2static-try-1-click-publish"], .try-1-click-publish-menu-item {
44
font-weight: bold;
55
}
66

7+
#wp2static-try-1-click-publish-plugin-screen {
8+
color: #FB4247;
9+
font-weight: bold;
10+
}

src/WordPressAdmin.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,13 @@ public static function registerHooks( string $bootstrap_file ) : void {
327327
2
328328
);
329329
}
330+
331+
add_filter(
332+
'plugin_row_meta',
333+
[ self::class, 'wp2staticPluginMetaLinks' ],
334+
10,
335+
2
336+
);
330337
}
331338

332339
/**
@@ -388,5 +395,21 @@ public function wp2staticAdminScripts() : void {
388395
);
389396
wp_enqueue_script( 'wp2static_admin_scripts' );
390397
}
398+
399+
/**
400+
* Add extra link to WP2Static's Plugins page entry
401+
*
402+
* @param mixed[] $links plugin meta links
403+
* @param string $file path to the plugin's entrypoint
404+
* @return mixed[] $links plugin meta links
405+
*/
406+
public function wp2staticPluginMetaLinks( $links, $file ) {
407+
if ( $file === 'wp2static/wp2static.php' ) {
408+
// phpcs:ignore Generic.Files.LineLength.MaxExceeded
409+
$links[] = '<a id="wp2static-try-1-click-publish-plugin-screen" target="_blank" href="https://www.strattic.com/pricing/?utm_campaign=start-trial&utm_source=wp2static&utm_medium=wp-dash&utm_term=try-strattic&utm_content=plugins">Try 1-Click Publish</a>';
410+
}
411+
412+
return $links;
413+
}
391414
}
392415

wp2static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://wp2static.com
55
* Description: Static site generator functionality for WordPress.
66
* Version: 7.2.0-dev
7-
* Author: WP2Static
7+
* Author: Strattic by Elementor
88
* Author URI: https://wp2static.com
99
* Text Domain: wp2static
1010
*

0 commit comments

Comments
 (0)