The answer actually lies on the same page where you inspected your modifications: /wp-admin/media-new.php
.
If you get to the /wp-admin/media-new.php
file, you will get a function:
<?php media_upload_form(); ?>
And the function is located in /wp-admin/includes/media.php
, where you will get the following line:
$max_upload_size = wp_max_upload_size();
So the holly grail you are searching is: wp_max_upload_size()
.
So you can easily follow the core, and display the maximum uploaded size anywhere with the following bit of code (thanks to the core):
<?php
$max_upload_size = wp_max_upload_size();
if ( ! $max_upload_size ) {
$max_upload_size = 0;
}
/* translators: %s: Maximum allowed file size. */
printf( __( 'Maximum upload file size: %s.', 'wpse355118' ), esc_html( size_format( $max_upload_size ) ) );
?>
Related Posts:
- Different upload directory based on post type in a theme
- Post type specific upload folder in 3.5
- Why “Store uploads in this folder” option is not showing in Media Settings in WordPress
- wp.media add context
- Resize the WP media Uploader iFrame
- Can I stop wordpress generating media sizes
- Display attachments by the ID of the post being edited in the wp.media frame (frontend)
- One step picture upload
- How to change format of file link ( Name ) when insert from media uploder
- Set different max upload size limits based on file type/extension
- Efficient way to move media folder to another folder
- wordpress 3.6 media manager cropping timestamp
- How i can upload images to another folder?
- How to generate thumbnails when needed only?
- Set limit to media upload?
- Save camera info as metadata on image upload?
- Use a separate custom table (not posts) to handle file upload data
- Custom upload directory per CPT; when removed, file not deleted
- Modify featured image path to Amazon S3
- How to set an upload directory for each media type?
- How to protect uploads in multisite if user is not logged in?
- Trigger JS when featured image upload window is opened in admin
- Modify the array of selected images in media modal
- How can I upload SVG images using the media uploader?
- Delete images uploaded by ‘Subscriber’ role
- Remove upload_files capability from a role but allow role to manage an avatar image
- 3.5 media manager add CSS / JS to new ‘tab’ iframe content
- post_id missing from the wp-admin file upload request
- Insert Featured image from Feed
- Image uploading stuck on “crunching”
- HTTP Error when uploading mp4 video file
- Change the size of the image preview on the media edit page
- “upload_mimes” filter not working. Need to allow WOFF and WOFF2
- Saving WordPress generated thumbnails in a subdirectory
- Add select field to media uploader that adds a class to the image
- Retroactively place uploaded media into -month, -year based folders?
- Can’t seem to upload a file to a custom directory
- Conditional add_filter for upload directory?
- Need to download uploaded binary file
- Insert Image automatically when upload finishes wordpress media uploader
- How do I modify the url of uploaded media content?
- WordPress “HTTP error.” when uploading Media – IIS
- WordPress uploads folder path. how it is decided?
- Uploading images on front end doesn’t generate thumbnail sizes
- Filter / Hook to get attachment ID before uploading?
- Adding Media Upload to Custom Options Panel breaks “Insert into Post”
- PDF file upload issue
- WordPress bug with capabilities?
- Update image via WP REST API
- Media Library does not show the uploaded image
- Attach Thumbnail Generated from Video Upload as Featured Image for the Video
- ‘An error occurred in the upload. Please try again later.’ for users with different roles
- Manipulate CSV data during upload, is it possible?
- Check if uploaded file has a specific filename
- How to submit data between wp_iframe and backbone.js in media upload
- Uploading .mp3 files http error – 2 “exact” files one successful other fails
- HTTP Error after finishing uploading a video that is bigger than 64 MB -> After raising the upload limit manually in the wp-config file
- Set post_parent value for the images uploaded by Add Media button into post
- What are best practices to storing uploads in WordPress?
- Original image not saving?
- Restrict role to view own media
- Create featured image from a remote url when creating a post
- Using Add from Server to upload by post ID
- Stop image resizing in particular case – is that possible?
- Change the look of the media uploader
- Issue with images which have no sizes available
- Unable to upload file more than 1MB in size
- WordPress media upload issue could not insert attachment into the database
- Thumbnail images missing in WP media library
- Upload media (image) and set the category
- Using Windows Server 2012 How to Move Uploads Folder to another hard drive
- get_attached_file returns wrong path after changing media upload dir
- How to adapt upload_dir to save files outside of WP uploads folder
- wp_generate_attachment_metadata for non-images files
- Reattach media after moving to another server
- What if I have a large file on the server that I want the wp library to have?
- Limit image upload to 10
- Bug: Deleting file, then uploading same file again places file in an old month folder
- Can i add custom meta box (Media Uploader) at Category Description
- Complicated image name like flickr does and deny access just to original image
- Parsing the post title to the media box page
- Problems with uploading pictures to WordPress
- Create multiple folders in upload media folder
- Editor User Role can’t see other users media
- How to allow .ged file uploads
- Media files not loading
- problem when uploading file by metaboxes
- What folder to place Large Video files?
- WordPress Upload Speed
- Organizing the Media Library for Cleanup
- Allow author to upload image via Media button without plugin
- Make custom thumbnail size image in media_sideload_image function
- Upload file to front-end form and send as email attachment
- uploading photos
- Host Images from Link
- Upload media error: unable to create directory (windows hosting)
- Add frontend editor with media buttons for Visitors and display only their media
- Can’t upload files 1MB+ [closed]
- WordPress Custom Fonts Problem! [closed]
- I want to customize wp.media (the wordpress admin uploader) in order to change the file name but only in video custom post type