WP showing “warning: call_user_func_array()”, What to do?

The error you’re getting is showing, because somewhere on your site (your theme or one of your plugins) is registering a filter function that doesn’t exist. Somewhere in your code, there will be such line (or similar to it): add_filter( ‘rewrite_rules_array’, ‘disable_embeds_rewrites’ ); It may use different hook, so it may also look like: add_filter( … Read more

Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area

You could over-ride the CSS by using the admin_print_scripts admin_head-media-upload-popup and add css to match your needs. This can be done via the functions.php file or by creating a plugin. Here is the code in a plugin format to begin adding style: <?php /* Plugin Name: Some Name Description: Custom Thickbox Styles */ add_action(‘admin_head-media-upload-popup’, ‘custom_tb_styles’); … Read more

Check php version before theme activation

As you want to implement the check within your theme files you can use the action after_switch_theme; as you can guess this will activate your theme to perform the check but will switch back to the previous theme if necessary. If the requirements are not fulfilled we’re going to notify the user via an admin … Read more

Hook for URL Request

Actually, my recommendation would be to do things a bit differently. You can add a custom rewrite endpoint to WordPress to handle these files specifically. For example, the URL http://site.com/download-xml/the_filename would automatically download the specified file as an attachment. First, you need to add a custom rewrite endpoint to set this up: function add_endpoint() { … Read more

Is there an action for when permalinks are rebuilt?

The action is update_option_permalink_structure. You get the old and the new value as parameters. add_action( ‘update_option_permalink_structure’ , ‘my_custom_function’, 10, 2 ); function my_custom_function( $oldvalue, $_newvalue ) { // do something } There are also the actions update_option_category_base and update_option_tag_base.

wp_mail – Remove sitename from email subject

Finally, I wrote some code and it worked very well. I hope it helps. Put this in your functions.php file //remove sitename from email subject add_filter(‘wp_mail’, ’email_subject_remove_sitename’); function email_subject_remove_sitename($email) { $blogname = wp_specialchars_decode(get_option(‘blogname’), ENT_QUOTES); $email[‘subject’] = str_replace(“[“.$blogname.”] – “, “”, $email[‘subject’]); $email[‘subject’] = str_replace(“[“.$blogname.”]”, “”, $email[‘subject’]); return $email; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)