HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/insiders/wp-load/wp-content/plugins/breadly/block-extensions/post-options.php
<?php

/**
 * Register meta fields
 */

add_action( 'init', 'gtm_register_post_option_meta_fields' );
function gtm_register_post_option_meta_fields() {
	register_post_meta( '', 'gtm_active_preset', [
		'show_in_rest'  => true,
		'single'        => true,
		'type'          => 'string',
		'auth_callback' => function () {
			return current_user_can( 'edit_posts' );
		},
	] );

	register_post_meta( '', 'gtm_alt_featured_image', [
		'show_in_rest'      => true,
		'single'            => true,
		'type'              => 'integer',
		'sanitize_callback' => 'sanitize_text_field',
		'auth_callback'     => function () {
			return current_user_can( 'edit_posts' );
		},
	] );

	register_post_meta( '', 'gtm_video_url', [
		'show_in_rest'      => true,
		'single'            => true,
		'type'              => 'string',
		'sanitize_callback' => 'sanitize_url',
		'auth_callback'     => function () {
			return current_user_can( 'edit_posts' );
		},
	] );

	register_post_meta( '', 'gtm_audio_url', [
		'show_in_rest'      => true,
		'single'            => true,
		'type'              => 'string',
		'sanitize_callback' => 'sanitize_url',
		'auth_callback'     => function () {
			return current_user_can( 'edit_posts' );
		},
	] );
}