?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/reunionmag/wp-content/themes/reunionmag-child/
Upload File :
Current File : /home/rankinh/reunionmag/wp-content/themes/reunionmag-child/functions.php

<?php

/**
 * Enqueue Child Theme Assets
 */
function custom_child_assets() {
	$version = date("YmdHis");
	wp_enqueue_style( 'custom_child_css', trailingslashit( get_stylesheet_directory_uri() ) . 'style.css', array(), $version, 'all' );
}
add_action( 'wp_enqueue_scripts', 'custom_child_assets', 99 );

function register_custom_post_metas() {
    $metas = [
        'bk_feat_img_status'       => 'string',
        'bk_final_score'           => 'integer',
        'bk_heading_related_posts' => 'string',
        'bk_media_embed_code_post'=> 'string',
        'bk_popup_frame'           => 'integer',
        'bk_post_layout'           => 'string',
        'bk_post_nav_style'        => 'string',
        'bk_post_sb_select'        => 'string',
        'bk_review_box_position'   => 'string',
        'bk_review_checkbox'       => 'integer',
        'bk_sidebar_position'      => 'string',
        'bk_user_rating'           => 'integer',
        'post_views_count'         => 'integer',
    ];

    foreach ($metas as $meta_key => $meta_type) {
        register_post_meta('post', $meta_key, [
            'show_in_rest' => true,
            'single'       => true,
            'type'         => $meta_type,
            'auth_callback' => function() {
                return current_user_can('edit_posts');
            }
        ]);
    }
}
add_action('init', 'register_custom_post_metas');