HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux wordpress-ubuntu-s-2vcpu-4gb-fra1-01 5.4.0-169-generic #187-Ubuntu SMP Thu Nov 23 14:52:28 UTC 2023 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/lipovac/wp-content/themes/senior/lib/metaboxes.php
<?php


add_filter( 'rwmb_meta_boxes', 'wheels_register_meta_boxes' );

function wheels_register_meta_boxes( $meta_boxes ) {
	$meta_boxes = array();
	$prefix     = 'wheels_';


//	if ( wheels_is_page_template( 'page-home.php' ) ) {
//
//		// 1st meta box
//		$meta_boxes[] = array(
//			'id'       => 'personal',
//			'title'    => 'Personal Information',
//			'pages'    => array( 'post', 'page' ),
//			'context'  => 'normal',
//			'priority' => 'high',
//			'fields'   => array(
//				array(
//					'name'  => 'Full name',
//					'desc'  => 'Format: First Last',
//					'id'    => $prefix . 'fname',
//					'type'  => 'text',
//					'std'   => 'Anh Tran',
//					'class' => 'custom-class',
//					'clone' => true,
//				),
//			)
//		);
//
//	}

	// $meta_boxes[] = array(
	// 	'title'  => 'Course Custom Fields',
	// 	'pages'  => array( 'course' ), // can be used on multiple CPTs
	// 	'fields' => array(
	// 		array(
	// 			'id'   => $prefix . 'sidebar_text',
	// 			'type' => 'wysiwyg',
	// 			'name' => __( 'Sidebar Text', 'wheels' ),
	// 			'desc' => sprintf( __( 'Link to all lined icons available %s. Just copy the class name.', 'wheels' ), '<a target="_blank" href="' . get_template_directory_uri() . '/assets/iconsmind-doc/demo.html' . '" title="' . __( 'Iconsmind', 'wheels' ) . '">' . __( 'Iconsmind', 'wheels' ) . '</a>' ),
	// 		),
	// 	)
	// );

	$menus       = get_registered_nav_menus();
	$menus_array = array();

	foreach ( $menus as $location => $description ) {
		$menus_array[ $location ] = $description;
	}


	$meta_boxes[] = array(
		'title'  => 'Page Settings',
		'pages'  => array( 'page' ), // can be used on multiple CPTs
		'fields' => array(
			array(
				'id'   => $prefix . 'use_one_page_menu',
				'type' => 'checkbox',
				'name' => __( 'Use One Page Menu', 'wheels' ),
				'desc' => __( 'When using one page menu functionality you need to add an extra class on each vc row you want to link to a menu item. Also you need to create a menu in Appearance/Menus and create custom links where each link url has the same name as the row class prefixed with # sign', 'wheels' ),
			),
			array(
				'id'          => $prefix . 'one_page_menu_location',
				'type'        => 'select',
				'name'        => __( 'Select One Page Menu Location', 'wheels' ),
				'desc'        => __( 'Used only if Use One Page Menu is checked.', 'wheels' ),
				'options'     => $menus_array,
				'placeholder' => 'Select Menu Location',
			),
		)
	);

	return $meta_boxes;
}