media.php (4523B)
1 <?php 2 /** 3 * Redux Framework media config. 4 * For full documentation, please visit: http://devs.redux.io/ 5 * 6 * @package Redux Framework 7 */ 8 9 defined( 'ABSPATH' ) || exit; 10 11 Redux::set_section( 12 $opt_name, 13 array( 14 'title' => esc_html__( 'Media', 'your-textdomain-here' ), 15 'id' => 'media-media', 16 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/media.html" target="_blank">https://devs.redux.io/core-fields/media.html</a>', 17 'subsection' => true, 18 'fields' => array( 19 array( 20 'id' => 'opt-media', 21 'type' => 'media', 22 'url' => true, 23 'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ), 24 'compiler' => 'true', 25 'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ), 26 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 27 'preview_size' => 'full', 28 ), 29 array( 30 'id' => 'media-no-url', 31 'type' => 'media', 32 'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ), 33 'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ), 34 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 35 'url' => false, 36 'preview' => true, 37 ), 38 array( 39 'id' => 'media-no-preview', 40 'type' => 'media', 41 'preview' => false, 42 'title' => esc_html__( 'Media No Preview', 'your-textdomain-here' ), 43 'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ), 44 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 45 'hint' => array( 46 'title' => esc_html__( 'Test Hint', 'your-textdomain-here' ), 47 'content' => wp_kses_post( 'This is a <b>hint</b> tool-tip for the webFonts field.<br/><br/>Add any HTML based text you like here.' ), 48 ), 49 ), 50 array( 51 'id' => 'opt-random-upload', 52 'type' => 'media', 53 'title' => esc_html__( 'Upload Anything - Disabled Mode', 'your-textdomain-here' ), 54 'full_width' => true, 55 56 // Can be set to false to allow any media type, or can also be set to any mime type. 57 'mode' => false, 58 59 'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ), 60 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 61 ), 62 array( 63 'id' => 'opt-media-filter', 64 'type' => 'media', 65 'url' => true, 66 'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ), 67 'compiler' => 'true', 68 'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ), 69 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 70 'preview_size' => 'full', 71 'default' => array( 72 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png', 73 'filter' => array( 74 'grayscale' => array( 75 'checked' => true, 76 'value' => 50, 77 ), 78 ), 79 ), 80 'preview_size' => 'full', 81 'filter' => array( 82 'grayscale' => true, 83 'blur' => true, 84 'sepia' => true, 85 'saturate' => true, 86 'opacity' => true, 87 'brightness' => true, 88 'contrast' => true, 89 'hue-rotate' => true, 90 'invert' => true, 91 ), 92 'output' => array( '.header-image img, .site-logo' ), 93 ), 94 array( 95 'id' => 'media-no-url-filter', 96 'type' => 'media', 97 'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ), 98 'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ), 99 'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ), 100 'url' => false, 101 'filter' => array( 102 'grayscale' => true, 103 'blur' => true, 104 ), 105 'preview' => true, 106 'preview_size' => 'full', 107 ), 108 ), 109 ) 110 );