2020-05-05 17:04:42 +00:00
< ? php
/**
* Admin View : Notice - Uploads directory is unprotected .
*
* @ package WooCommerce\Admin\Notices
* @ since 4.2 . 0
*/
defined ( 'ABSPATH' ) || exit ;
$uploads = wp_get_upload_dir ();
?>
< div id = " message " class = " updated woocommerce-message " >
< a class = " woocommerce-message-close notice-dismiss " href = " <?php echo esc_url( wp_nonce_url( add_query_arg( 'wc-hide-notice', 'uploads_directory_is_public' ), 'woocommerce_hide_notices_nonce', '_wc_notice_nonce' ) ); ?> " >< ? php esc_html_e ( 'Dismiss' , 'woocommerce' ); ?> </a>
< p >
< ? php
echo wp_kses_post (
sprintf (
2020-05-07 00:50:01 +00:00
/* translators: 1: uploads directory URL 2: documentation URL */
__ ( 'Your store\'s uploads directory is <a href="%1$s">browsable via the web</a>. We strongly recommend <a href="%2$s">configuring your web server to prevent directory indexing</a>.' , 'woocommerce' ),
esc_url ( $uploads [ 'baseurl' ] . '/woocommerce_uploads' ),
2020-05-05 17:04:42 +00:00
'https://docs.woocommerce.com/document/ssl-and-https/'
)
);
?>
</ p >
</ div >