How to Replace the More Fields Meta Box Title

Replacing “More Fields” for the Pods Meta Box

You can use this particular hook to replace the default “More Fields” Meta Box title for the fields that Pods adds to a Post Type. You can override by individual Pod as well.

add_filter( 'pods_meta_default_box_title', 'my_change_pods_metabox_title_for_post_type', 10, 5 );

/**
 * Filter the title of the Pods metabox for a post type.
 *
 * @param string   $title  The title to use, default is 'More Fields'.
 * @param obj|Pods $pod    Current Pods Object.
 * @param array    $fields List of fields that will go in the metabox.
 * @param string   $type   The type of Pod.
 * @param string   $name   Name of the Pod.
 *
 * @return string The title for the metabox.
 */
function my_change_pods_metabox_title_for_post_type( $title, $pod, $fields, $type, $name ) {
	// Don't change the title if it is not for our post type.
	if ( 'my_custom_post_type' !== $name ) {
		return $title;
	}

	return 'My custom title';
}

Replacing More Fields for MULTIPLE post types

If you need to configure this for multiple post types at once, you can use the following code snippet:

add_filter( 'pods_meta_default_box_title', 'my_change_pods_metabox_title_for_many_post_types', 10, 5 );

/**
 * Filter the title of the Pods metabox for multiple post types.
 *
 * @param string   $title  The title to use, default is 'More Fields'.
 * @param obj|Pods $pod    Current Pods Object.
 * @param array    $fields List of fields that will go in the metabox.
 * @param string   $type   The type of Pod.
 * @param string   $name   Name of the Pod.
 *
 * @return string The title for the metabox.
 */
function my_change_pods_metabox_title_for_many_post_types( $title, $pod, $fields, $type, $name ) {
	$post_types_to_change = [
		'my_custom_post_type',
		'post',
		'page',
	]

	// Don't change the title if it is not for our post types.
	if ( ! in_array( $name, $post_types_to_change, true ) ) {
		return $title;
	}

	return 'My custom title';
}

From https://github.com/pods-framework/pods/issues/727#issuecomment-483867841

Questions