Defined WordPress Memory Limit to Unlimited

If you search WP source code, you’ll find _MEMORY_LIMIT in wp-includes/default-constants.php $current_limit = @ini_get( ‘memory_limit’ ); $current_limit_int = wp_convert_hr_to_bytes( $current_limit ); //.. if ( ! defined( ‘WP_MAX_MEMORY_LIMIT’ ) ) { if ( false === wp_is_ini_value_changeable( ‘memory_limit’ ) ) { define( ‘WP_MAX_MEMORY_LIMIT’, $current_limit ); } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = … Read more

Theme activation hook in php class

It looks like you are adding the hook just inside the body of the class. Try adding it into an init() method and calling it after it is instantiated or at the very least in the constructor. I think the issues is that the hook is being registered before the class has been fully read … Read more

Widget back end radio button issue

You got that problem because the radio buttons have different name; i.e. the_style_1 and the_style_2. So I’d suggest you to use the_style as the name for both the radio buttons: <p> <input class=”radio” type=”radio” <?php checked( $instance[ ‘the_style’ ], ‘style_1’ ); ?> id=”<?php echo $this->get_field_id( ‘the_style_1’ ); ?>” name=”<?php echo $this->get_field_name( ‘the_style’ ); ?>” value=”style_1″ … Read more

Hardening uploads folder in IIS breaks images

I don’t know if that is the right way but the last time I worked with IIS, I used this code to prevent the loading of an PHP script in the uploads folder. <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <location path=”wp-content/uploads”> <system.webServer> <security> <requestFiltering> <fileExtensions> <add fileExtension=”.php” allowed=”false” /> </fileExtensions> </requestFiltering> </security> </system.webServer> </location> </configuration> If you … Read more