add_action('plugins_loaded', 'initialize_custom_image_sizes');
plugins_loaded
is fired off way before functions.php is included. Change that hook to init
.
http://codex.wordpress.org/Plugin_API/Action_Reference#Actions_Run_During_a_Typical_Request
Related Posts:
- Disabling post images for not logged in users
- How can i change an image’s author?
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- How to change ID of an attachment in wp_posts and its related tables correctly?
- bulk change of image setting “link to” to “link to: image url “
- Converting Attachment to Images?
- Get the url of the full sized attachment image using post ID?
- Inserting HTML tag with ACF into shortcode
- Redirect to another page using contact form 7? [closed]
- Image change on hover
- Search by Attachment ID
- JSON API Plugin not showing Attachments id reused
- Add_image_size not generating correct size
- Elementor Pro display featured image on section -> style -> image using shortcode
- Get all image in media Gallery with alt/title?
- How to wrap image tag into div for post only?
- How to force regenerate thumbnails in WordPress posts?
- How to show post attachment image
- Building custom pages with a video player
- Best collection of code for your 'functions.php' file [closed]
- How to include a plugin’s php file to another plugin functions file [duplicate]
- How to Delete All regenerated thumbnails but keep the original ones?
- if plugin is active? check if plugin is enabled or not?
- How to upload image with simple form?
- How to override a theme function (within a class) using a plugin
- Seeking clarification on page request life-cycle
- How to remove action from plugin?
- resize only height using wp_get_image_editor
- Get uploaded image url
- Can wp_script_is used in pluginA check if a script is being enqueued/registered from pluginB?
- Where to place custom functions?
- How to add an image from web-link?
- Display post lists in 2nd paragraph
- How to display custom sidebar in wordpress 5.5.2
- creating html reusable blocks via shortcodes
- Replacing a plugin function with a custom renamed function doesn’t work
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Bulk edit WP posts to update embeded images with new alt tags
- Disqus deleted comments are syncing with wordpress but active comments do not
- WordPress get_avatar function not correct working
- Make change in media library affect images in published articles
- WordPress metaboxes – textfield suggestion automatically populated
- Which file of wordpress manage plugins functionalities?
- Improving the perfomance of a plugin action
- Plugin to hide image in excerpt
- Check if variable is set in filter
- How to write “alt” tag in image for wordpress code?
- Passing stored variables to add_filter
- JQuery prepend a function
- Clear out old images, any advice?
- Send email with list of active plugins upon activation/deactivation
- Using custom fields for image alt and title
- Large amount image data transfer
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- How do I convert my WordPress website to be domain agnostic?
- Get Image Having the ID [closed]
- Add the_post_thumbnail_url to a shortcode in function.php
- Add action to custom Function
- Show media-uploads to all users
- Scrape a webpage for image and add it to post
- Help with a function in a widget
- how can authors to define custom pages?
- Adding a Tag Parameter / Filter to My Shortcode
- How do I create pages within a WordPress post?
- How to upload large media file in chunks, without any plugin?
- WP Function does not trigger on Webhook API Call
- Why do I need to reload the page for WordPress to see the new custom field added with jQuery
- Cookie value changes back to previous value after changing
- RSS Feed on WordPress showing code (hypertext) in articles titles
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- Post source link plugin – small modification
- How to add specific script to WordPress webpage that will working with user input and databases
- Do images in plugins automatically load?
- Hide Plugin Custom Post Type Menu Link
- How to create algorithm for ordering posts in WordPress?
- Add external javascript to post template
- Block plugin update possibilities (but not by hiding notifications)
- Execute function activate/deactivate plugin in specific pages
- WP_get_image_editor resizing images in a foreach loop
- Plugin function in child theme
- How to make cover image in post block expand to entire screen?
- Soflyy WP All Import Custom File Download Issue
- Update (a function) post’s featured image as soon as $image_url changes
- Why isn’t my plugin seeing other classes?
- How to add submenu to WordPress plugin in the same Directory of main Plugin?
- Contact Form 7: custom validation [closed]
- Make a wordpress site similar to Hot Or Not – Image rating system [closed]
- Single dash converted to double dash
- Displaying single Instagram images as a tile
- How use Dynamic hyperlink on each wordpress post?
- How to declare this function correctly?
- Can’t modify plugin function
- PHP if url extension action=discussion condition use [closed]
- How to Allow Users to Select Recipients In a WordPress Comment section?
- How often should I execute add_filter and function declaration in Code Snippets?
- Product customizing quiz – quiz adding products to the cart
- How to change all the urls of the WordPress site?
- Event Made Easy – Block registration to two or more events that have the same category
- I want to allow certain file types on dokan upload files