Plugin updates are not shown

Normal operation should show updates as they are needed with the Update screen. Although it is possible for plugins and/or code in your functions.php file to disable update notices. Checking with a ‘twenty’ theme, and looking at your plugins (perhaps even temporarily disabling them) should get you current. (Old question without an answer. Probably should … Read more

Sort archive view with pre_get_posts hook

I solved this with a different approach. I used posts_join and posts_orderby filters. Do not forget to cast meta value as unsiged to avoid string ordering instead of int. //edit query join function hsa_story_join($join){ global $wpdb; $option = get_option(‘hsa_story_cats’); if(!is_admin() && is_category($option)) { $current_category = get_queried_object(); $join .= ” LEFT JOIN (SELECT post_id, meta_key, meta_value … Read more

WordPress admin notice in plugin function

Your problem is pretty simple. Your callback for this hook is not a simple function but some method of a class. If you add action like this: add_action(‘admin_notices’, ‘simple_notice’); you tell WP that there is some simple function called simple_notice and it should be called when hook admin_notices is processed. But… There is no such … Read more

Find out what is using PHP sessions in WordPress

As far as I know, WP doesn’t use PHP Sessions, only Native solution (Storing Session data of logged-in users in DB). Perhaps some other additional functionality (plugin/addon/theme) use it? What you can do is check whats in sessions files. Search for occurrences of keys you found in sessions in your code base. Localize problem and … Read more

use WordPress theme / plugin editor in my plugin

To start with you could use the following code. For security you could also add some nonce check and even use the settings api. Here plugin-test is your plugin folder name. $file = stripslashes(‘plugin-test/style.css’); $plugin_files = get_plugin_files($file); $file = validate_file_to_edit($file, $plugin_files); $real_file = WP_PLUGIN_DIR . “https://wordpress.stackexchange.com/” . $file; if( isset($_POST[‘plugin_test_settings’][‘newcontent’]) ) { $newcontent = stripslashes($_POST[‘plugin_test_settings’][‘newcontent’]); … Read more

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