Deprecated issue in WordPress [closed]

First find C_Widget_Gallery widget code. Search all the theme directory first. Specially any *.php file with -widget name part. It can also be initiated by a plugin. So search in the plugin directory if you don’t find it in themes directory. Then find $this->WP_Widget inside the class and replace only just it with parent::__construct. And … Read more

How to inform the user that the save was not successful?

Handling admin notice on Edit Post When action related to post or editpost, we will be faced with redirect_post function. There are two filters you can use to handle the post messages, redirect_post_location and post_updated_messages ( see the list messages at https://core.trac.wordpress.org/browser/tags/4.8/src/wp-admin/edit-form-advanced.php#L135 ). Here the sample code how to handle the messages. Create new message … Read more

Cannot DIsplay a Snackbar Notice on Button Click – Notice is undefined

I figured it out. The component was not rerendering, when clicking the “Save” button. I included the compose component in the render method and all is working good now: const Notices = ({ notices, removeNotice }) => { const snackbarNotices = notices ? notices.filter((notice) => notice.type === ‘snackbar’) : []; return ( <> <SnackbarList className=”cwg-admin-notices” … Read more

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