Removing the “Your backup folder MIGHT be visible to the public” Message Generated by the WP-DBManager Plugin

gear-solid**: Looking in the Source Code… Here’s the function from WP-DBManager Plugin that generates that error: function dbmanager_admin_notices() { $backup_options = get_option(‘dbmanager_options’); if(!@file_exists($backup_options[‘path’].’/.htaccess’)) { echo ‘<div class=”error” style=”text-align: center;”><p style=”color: red; font-size: 14px; font-weight: bold;”>’.__(‘Your backup folder MIGHT be visible to the public’, ‘wp-postratings’).'</p><p>’.sprintf(__(‘To correct this issue, move the <strong>.htaccess</strong> file from <strong>wp-content/plugins/wp-dbmanager</strong> to <strong>%s</strong>’, … Read more

Prevent trash/delete action on specific post types

Here’s another approach using the map_meta_cap filter that’s applied within the map_meta_cap() function within the has_cap() method of the WP_User class (PHP 5.4+): add_filter( ‘map_meta_cap’, function ( $caps, $cap, $user_id, $args ) { // Nothing to do if( ‘delete_post’ !== $cap || empty( $args[0] ) ) return $caps; // Target the payment and transaction post … Read more

Remove action from plugin on other plugin

There are two things that confuse people when trying to remove a hook: The remove_action() or remove_filter() calls must take place after the add_action() or add_filter() calls, and before the hook is actually fired. This means that you must know the hook when the calls were added and when the hook is fired. The remove_action() … Read more

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