Skip to content

Commit 1de7e1c

Browse files
committed
missed this - should not be hardcoded
1 parent c84e1db commit 1de7e1c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

classes/suggested-tasks/providers/class-seo-plugin.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,18 @@ public function print_popover_instructions() {
133133
* @return void
134134
*/
135135
public function print_popover_form_contents() {
136+
$seo_plugin_recommendation_slug = \progress_planner()->get_ui__branding()->get_seo_plugin_recommendation_slug();
137+
$seo_plugin_recommendation_name = $this->get_plugin_name_by_slug( $seo_plugin_recommendation_slug );
138+
if ( ! $seo_plugin_recommendation_name ) {
139+
return;
140+
}
141+
136142
?>
137143
<?php if ( ! \is_multisite() && \current_user_can( 'install_plugins' ) ) : ?>
138144
<prpl-install-plugin
139-
data-plugin-name="Yoast SEO"
140-
data-plugin-slug="wordpress-seo"
141-
data-action="<?php echo \progress_planner()->get_plugin_installer()->is_plugin_installed( 'wordpress-seo' ) ? 'activate' : 'install'; ?>"
145+
data-plugin-name="<?php echo \esc_html( $seo_plugin_recommendation_name ); ?>"
146+
data-plugin-slug="<?php echo \esc_attr( $seo_plugin_recommendation_slug ); ?>"
147+
data-action="<?php echo \progress_planner()->get_plugin_installer()->is_plugin_installed( $seo_plugin_recommendation_slug ) ? 'activate' : 'install'; ?>"
142148
data-provider-id="<?php echo \esc_attr( self::PROVIDER_ID ); ?>"
143149
></prpl-install-plugin>
144150
<?php else : ?>

0 commit comments

Comments
 (0)