bp_media_settings_callback_media_allowed_size()

Setting > Media > Photos > Allowed Max File Size

Description

Source

File: bp-media/bp-media-settings.php

function bp_media_settings_callback_media_allowed_size() {
	$max_size = bp_core_upload_max_size();
	$max_size_mb = bp_media_format_size_units( $max_size, false, 'MB' );
	?>
	<input type="number"
		   name="bp_media_allowed_size"
		   id="bp_media_allowed_size"
		   class="regular-text"
		   min="1"
		   step="1"
		   max="<?php echo esc_attr( $max_size_mb ) ?>"
		   required
		   value="<?php echo esc_attr( bp_media_allowed_upload_media_size() ); ?>"
		   style="width: 70px;"
	/> <?php esc_html_e( 'MB', 'buddyboss' ); ?>
	<p class="description">
		<?php
		printf(
				'%1$s <strong>%2$s %3$s</strong>',
				__( 'Set a maximum file size for photo uploads, in megabytes. Your server\'s maximum upload size is ', 'buddyboss' ),
				$max_size_mb,
				'MB.'
		);
		?>
	</p>
	<?php
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.8 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.