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' );
},
] );
}