Change the action to ‘init’:
class My_Plugin {
public function __construct() {
add_action( 'init', array( $this, 'overwrite_wptheme_settings' ) );
}
public function overwrite_wptheme_settings() {
add_image_size( 'tie-small', 70, 70, false );
}
}
Related Posts:
- how to get path to images in the uploads folder to be used in a plugin
- How to write “alt” tag in image for wordpress code?
- Is there a Image Gallery which will load all my posted Images like twitter’s image grid?
- Elementor Sidebar not loading when PRO elements plugin is active
- dokan edit functionality
- when i activate my WordPress plugin cannot see customizer options or preview
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- how to add navigation icons in specific template?
- How to add separator between default and custom panels in WordPress customizer?
- Real estate schema markup not showing up on Rich Results test
- Issue with customizer and widget page
- How to create an Info Box on WordPress [closed]
- How to create new title and its description inside a section in WP Customizer?
- Show an image in my header.php
- Admin Theme customization
- Hooking in to replace the Sidebar/Widget areas
- WSOD after upgrading to 3.1
- How to create a managed image repository in wordpress
- Check for security updates
- How can I restrict image upload dimensions for non-admin WordPress users?
- (FES EDD) New vendor submission page is blank
- There is any way to remove post-format filter? [closed]
- Plugin-generated pages use Not Found or Pages Archive templates?
- Is there any kind of theme on WordPress to sell my own movies?
- Create custom registration form for WordPress Multisite
- Child Pages Short Code plug-in and hover capabilities?
- wp_generate_attachment_metadata is creating an empty array
- Classified ad website : which solutions to use? [closed]
- Plugin options page with live preview?
- Force media library editor to overwrite the original filename?
- Linux Permissions and Ownership for WordPress
- posts comments goes to trash
- WordPress site periodically goes down
- Contact Form 7 Get Image Function [closed]
- Masonry images not working
- How generate 200% image size and save with suffix @2x
- Load external images via proxy
- Advanced Custom Field DatePicker [closed]
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- Bulk edit WP posts to update embeded images with new alt tags
- All sites themes functions.php have been changed
- How to upload WordPress Images to remote web server and display those images in WordPress gallery [closed]
- Homemade plugin while using Themify Ultra
- Why namespaces are rarely used in WordPress plugins?
- What will happen if i deactivate my visual composer plug in? [closed]
- Add padding while generating thumbnail
- Finding the URL to be used to check if plugin is installed with a theme
- Theme/Plugin installation through url on button click
- WordPress plugin admin html being shown in Customizer iframe
- Problem Cropping Images From WP Customizer
- (Big issue) Blog is Getting Down Each day.. what should i do.?
- Custom wordpress Theme and Plugin repository
- Can we have an ‘Update metadata’ button in Image Gallery for all image instances?
- WordPress 3.8.3. custom theme – sliders won’t load js/css files
- Retrieving Meta from Image Attachment
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- remove add new post, if there is already one post
- How to require users to login when not logged in
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Adding custom image sizes and post types to a plugin or to a theme?
- Make change in media library affect images in published articles
- Error when using plugin QuickCache with plugin Mobile Smart ? [closed]
- Adding (image) caching to my Tumblr widget
- How to upload multiple files/images when developing a wordpress plugin?
- Image Manager Plugin [closed]
- Implementing an image hosting website using WordPress? [closed]
- Does WP delete deprecated plugin/theme files on plugin/theme upgrade?
- Is there any hook for theme activation ? or something similar?
- How to use get_template part in the plugin?
- How can I use get header from within my plugin?
- Bulk Image Upload And Rerrange Functionality
- Redirect to another page using contact form 7? [closed]
- How do I find out what is in control over a certain part of a website?
- “No Add Button” for me to customize my WordPress with themes and pluggins
- How to apply lazy loading in background images [closed]
- How do I combine a theme with a plugin
- How can I list all installed plugins/themes/versions from CLI/API?
- My single.php page does not show the related data to the post which is clicked
- Where are theme codes located for WordPress?
- Woocommerce showing images blurry in description page
- Overwrite category head title
- Slider/text combination plugin
- Plugin to hide image in excerpt
- Basic gallery plugin suggestion [closed]
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- How to check if my wordpress websiste is nulled or not?
- Why does my file_exist check fail?
- Remove specific plugins and themes from the Dashboard->Updates page [duplicate]
- Create a single website with 3 theme options in wordpress
- using do_shortcode
- Create custom pages with a plugin
- Image change on hover
- Does heavy theme and plugins affect server’s response time? [closed]
- Adding Static Image to WooCommerce Content-Single-Product template
- How to protect WordPress from security scanner [closed]
- How to load different homepage on Mobile.?
- How do I get a post author’s image/avatar via RSS from another blog?
- How to get menu location in wp_update_nav_menu hook
- Proper way to use plugin functions in functions.php
- How to activate a plugin on the activation of a theme?