I think your best bet here is to hook into the flow at the time of uploading and processing the uploaded file.
There is a filter (line 327, file.php):
apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' );
You could create a filter within which you do nothing else but create a global variables to hold the current values for:
wp_get_themes();
wp_get_plugins();
then, within your existing functions
HandleThemeUpload() { }
HandlePluginUpload() { }
you get the themes and plugins again and then compare these results with your previous global results using array_diff(): e.g.
$NewPlugin = array_diff( $LatestPlugins, $OldGlobalPlugins );
Then you have the new plugins / themes.
Hope that helps.
Related Posts:
- how to split and upload a theme on wordpress?
- to perform the requested action wordpress needs to access your web server. please enter your ftp
- Hide prices and checkout functionality in woocommerce
- How do I exclude plugins from getting automatically updated?
- “Add Media” button in custom plugin
- How can I create a bash install script for my WordPress sites setup (WP+plugins+theme)?
- Shared functionality in plugins and themes
- Reordering themes in admin panel
- How get list of updates of wp site?
- how does wp.media javascript library work?
- Which hook callback has priority if both plugin and theme use the same hook?
- Themes VS Plugins [duplicate]
- Force wordpress to request for FTP Info on theme/plugin install/update
- How can I add a custom meta value on file upload?
- Can a WordPress plugin or theme contain a virus?
- How to upload thousands of images?
- Override the core function locate_template
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- Upload file inside plugins options page
- add_meta_box (Will display only in specific page admin WordPress)
- WordPress 5 upgrade: until when is it safe to keep project running in 4.x?
- Installing WordPress only for a separate page – ‘mydomain.com/blog’
- ‘Customize’ button in admin bar for CSS
- Uncode theme content block header ignoring saved changes/not updating?
- Theme and plugin install or update display error in localhost
- Reduce Drop down Menu Width in WordPress
- How organize uploaded media in WP?
- Create custom registration form for WordPress Multisite
- Removing included CSS file that doesn’t exist
- Classified ad website : which solutions to use? [closed]
- posts comments goes to trash
- Advanced Custom Field DatePicker [closed]
- wp.media javascript issue with on select
- What will happen if i deactivate my visual composer plug in? [closed]
- Finding the URL to be used to check if plugin is installed with a theme
- WordPress 3.8.3. custom theme – sliders won’t load js/css files
- Redirect to another page using contact form 7? [closed]
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Theme Custom Pages
- how can I do something on new user registration?
- Making that Admin Bar transparent or a blue color
- Use wp_upload_dir() correctly
- adding a button to the media uploader
- how to activate a plugin inside a theme
- Is there a function to list all uploaded images? How can I add one?
- Allowing .rfa Files In Media Upload [duplicate]
- There has been a critical error on your website – won’t fix no matter what
- How to get theme’s info from wordpress.org/themes using api.wordpress.org?
- Override/ignore CSS from active theme as not to interfere with my custom CSS
- To perform the requested action, WordPress needs to access your web > server
- How to find the list of custom post type where logged in user is author
- speed up pagination for huge database
- Override css rules of a plugin within my own theme
- I want to use wordpress themes and plugin to develop website
- How to check homepage contain blog post?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- Is it possible for a plugin to prevent certain plugins from being installed?
- How do you create a re-useable HTML fragment in wordpress
- Identify current wordpress theme
- Upgrade not working & themes not supporting
- Simple sildeshow/image-upload plugin?
- use EDD Content Restriction for restricting php in template
- Elementor pro page editing gives error There has been a critical error on this website. Please check your site admin email inbox for instructions
- Can’t load the the canges of field groups [duplicate]
- Javascript console errors and WSOD on edit post pages
- How to copy the all WordPress media items to another custom plugin folder?
- How Can I Create A Form In WordPress For Subscribers To Alert Them about new Listing posted?
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- WordPress site hamburger menu toggle not working
- WordPress wp get_temp_dir return non exiting folder, thus failing plugin & themes update
- Link custom post type to page
- How to disable a widget area of a specific page?
- Cannot display wordpress thumbnail
- upload multiple images using wp_handle_upload
- Showing different js file for different theme in wordpress customizer api
- How wordpress handle urls present in db for external wp-content directory
- woocommerce with external ftp site
- Getting unknown text in footer of email
- Seeking specific WordPress Layout
- WP default file upload hook not working if used in a plugin
- WordPress Theme/Plugin Install (about FTP Connection)
- WordPress core update fails – no issues with plugin updates
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- How to add the functionality of WordPress needed to be installed to be mandatory while installing themes
- Incentive theme – Getting ’You do not have sufficient permissions’ while trying to install plugins
- How do I make the selected layout display for all MarketPress pages?
- Issues with Post 2 Post Plugin
- Can’t get custom user meta to show in header
- include plugin folder directly in theme folder to load faster page n wp
- How to get current template file used by WordPress?
- How to make only selected posts appear on a selected wordpress page
- Is there a WP-Plugin to convert PNG to GIF? [closed]
- Terms id wordpress error
- wordpress illegal string offset ‘parameter’ error
- What is phpBB? Is it something like a plugin which I can use in WordPress? [closed]
- Is there a way to stop the theme and especially plugins listed?
- How to rename files during upload to a random string?
- Real estate schema markup not showing up on Rich Results test
- Convert from Portfolio post to WooCommerce products [closed]
- What’s the best way to update my WordPress theme to Elementor?