learndash_post_settings_metaboxes_init_{$this->post_type}

apply_filters( "learndash_post_settings_metaboxes_init_{$this->post_type}",  string $post_type,  array $metaboxes )

Filters post metaboxes init settings.


Description #

The Dynamic part $post_type refers to the post type slug.


Parameters #

$post_type

(string) Post type slug.

$metaboxes

(array) Common array set to contain the metaboxes shown on the post edit screen.


Source #

File: includes/admin/class-learndash-admin-posts-edit.php


Examples #

 <?php
/**
 * Example usage for learndash_post_settings_metaboxes_init_{$this->post_type} filter.
 */
add_filter(
	'learndash_post_settings_metaboxes_init_sfwd-topic',
	function( $post_type, $metaboxes ) {
		// May add any custom logic using $post_type, $metaboxes.

		// Always return $post_type.
		return $post_type;
	},
	10,
	2
);