PHP code example of cedaro / metamedia

1. Go to this page and download the library: Download cedaro/metamedia library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cedaro / metamedia example snippets


function themename_register_metamedia() {
	if ( ! is_admin() || ! function_exists( 'register_metamedia_meta_box' ) ) {
		return;
	}

	// Register a meta box for assigning a 'hero' image to posts.
	register_metamedia_meta_box( 'hero', 'post' );
}
add_action( 'init', 'themename_register_metamedia' );