PHP notice coming from the WordPress core?

1) Looks like you are using the Visual Composer Plugin which is a legacy version which has a deprecated function. If you are using old version upgrade your Visual Composer plugin to the latest version which is 5.0.1. 2) Another case might be your are using a theme which might be using Visual Composer as … Read more

Notice: wp_enqueue_script was called incorrectly

You do not show how you hook your wp_enqueue_script() call. But the error message you get is pretty clear, use one of the following hooks: wp_enqueue_scripts admin_enqueue_scripts login_enqueue_scripts depending on the use case – see the notes at the wp_enqueue_script() codex page for additional information. For example do for correctly enqueuing on the frontend: function … Read more

my theme breaks WP export

The basic idea for debug here is that theme apparently influences something it totally should not. Either something is done in a wrong way or in a wrong place. Check that theme is not running any functionality directly in functions.php. Check that all of theme’s functionality runs on appropriate hooks. For hooks that are used … Read more

admin_notices not displaying in plugin

Try this. I cleaned up your arg array and placed everything in a function. Also, why are you using the getInstance method when your efpd_admin_notice is public? See the code below for accessing this method properly. function plugin_update(){ $plugin_update = Efpdd::efpd_admin_notice(array( ‘type’ => ‘update’, ‘message’ => ‘The plugin has just been updated.’, ‘button’ => ‘Click … Read more

Remove Admin Notice on page refresh

This is done by wp_admin_canonical_url: It calls wp_removable_query_args to fetch a list of query string parameters to remove, which includes settings-updated. It then writes some script into the page header to use window.history.replaceState to remove the query string from your browser’s URL bar. <link id=”wp-admin-canonical” rel=”canonical” href=”http://example.com/wp-admin/admin.php?page=xyz”> <script> if ( window.history.replaceState ) { window.history.replaceState( null, … Read more

Change message given when deleting post from custom post type

There’s no hook named post_trashed_messages, but there is the bulk_post_updated_messages hook which you can use to change the bulk action updated messages: add_filter( ‘bulk_post_updated_messages’, function ( $bulk_messages, $bulk_counts ) { $bulk_messages[‘post’][‘trashed’] = _n( ‘%s post successfully deleted.’, ‘%s posts successfully deleted.’, $bulk_counts[‘trashed’] ); return $bulk_messages; }, 10, 2 ); Or to target a specific post … Read more

Admin Notices coding standard issue

One way you can handle this would be to do the wp_sprintf when assigning the value of the $message variable and then use wp_kses when you want to output. You could also output the div and paragraph tags before and after the message, which would eliminate the need for wp_sprintf in this instance. add_action( ‘admin_notices’, … Read more

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