diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php index 51013b327e..10ed985bf6 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php @@ -590,12 +590,12 @@ function the_plugin_self_toggle_preview_button() { return; } - echo '

' . esc_html__( 'Toggle Live Preview', 'wporg-plugins' ) . '

'; + echo '

' . esc_html__( 'Toggle Live Preview', 'wporg-plugins' ) . '

'; $preview_status = get_post_meta( $post->ID, '_public_preview', true ) ? 'enabled' : 'disabled'; if ( 'enabled' === $preview_status ) { - echo '

' . esc_html__( 'The Live Preview link to Playground is currently enabled. Use the toggle button to disable it.', 'wporg-plugins' ) . '

'; + echo '

' . wp_kses( sprintf( __( 'The Live Preview link to Playground is currently enabled. Use the toggle button to disable it.', 'wporg-plugins' ), 'https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/' ), array( 'a' => array( 'href' => array() ) ) ) . '

'; } else { - echo '

' . esc_html__( 'The Live Preview link to Playground is currently disabled. Use the toggle button to enable it.', 'wporg-plugins' ) . '

'; + echo '

' . wp_kses( sprintf( __( 'The Live Preview link to Playground is currently disabled. Use the toggle button to enable it.', 'wporg-plugins' ), 'https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/#committing-a-blueprint-to-subversion' ), array( 'a' => array( 'href' => array() ) ) ) . '

'; } $blueprints = get_post_meta( $post->ID, 'assets_blueprints', true ); diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin-single.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin-single.php index b28bcffb99..7edf617dc5 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin-single.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/template-parts/plugin-single.php @@ -74,7 +74,15 @@
%2$s
', esc_attr( add_query_arg( array( 'preview' => 1 ), get_the_permalink() ) ), - esc_html__( 'Test Preview', 'wporg-plugins' ) + esc_html__( 'Test Preview', 'wporg-plugins' ) . ' ' + ); + } elseif ( current_user_can( 'plugin_admin_edit', $post ) ) { + $buttons .= sprintf( + ' +
%2$s
+ ', + esc_attr( get_the_permalink() . 'advanced/#live-preview' ), + esc_html__( 'Preview Not Available', 'wporg-plugins' ) . ' ' ); } echo do_blocks( $buttons ); // phpcs:ignore -- Output escaped while building string.