wpseek.com
WordPress开发者和主题制作者的搜索引擎



_wp_after_delete_font_family › WordPress Function

Since6.5.0
已弃用n/a
_wp_after_delete_font_family ( $post_id, $post )
访问:
  • private
参数: (2)
  • (int) $post_id Post ID.
    Required: Yes
  • (WP_Post) $post Post object.
    Required: Yes
定义在:
文档:

Deletes child font faces when a font family is deleted.



源码

function _wp_after_delete_font_family( $post_id, $post ) {
	if ( 'wp_font_family' !== $post->post_type ) {
		return;
	}

	$font_faces = get_children(
		array(
			'post_parent' => $post_id,
			'post_type'   => 'wp_font_face',
		)
	);

	foreach ( $font_faces as $font_face ) {
		wp_delete_post( $font_face->ID, true );
	}
}