WC_Admin_Post_Types::unique_filename()publicWC 1.0

Метод класса: WC_Admin_Post_Types{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WC_Admin_Post_Types = new WC_Admin_Post_Types();
$WC_Admin_Post_Types->/**;

Код WC_Admin_Post_Types::unique_filename() WC 9.3.3

/**
 * Show a notice above the CPT archive.
 *
 * @param WP_Post $post The current post object.
 */
public function show_cpt_archive_notice( $post ) {
	$shop_page_id = wc_get_page_id( 'shop' );

	if ( $post && absint( $post->ID ) === $shop_page_id ) {
		echo '<div class="notice notice-info">';
		/* translators: %s: URL to read more about the shop page. */
		echo '<p>' . sprintf( wp_kses_post( __( 'This is the WooCommerce shop page. The shop page is a special archive that lists your products. <a href="%s">You can read more about this here</a>.', 'woocommerce' ) ), 'https://woocommerce.com/document/woocommerce-pages/#section-4' ) . '</p>';
		echo '</div>';
	}
}

/**
 * Add a post display state for special WC pages in the page list table.
 *
 * @param array   $post_states An array of post display states.
 * @param WP_Post $post        The current post object.
 */
public function add_display_post_states( $post_states, $post ) {
	if ( wc_get_page_id( 'shop' ) === $post->ID ) {