Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

S7 Tools – Media Library Dashboard

// Create a custom admin page function images_with_link_and_size_menu() { add_media_page( ‘Media Library Optimization Dashboard’, ‘Media Optimization’, ‘manage_options’, ‘media-library-optimization-dashboard’, ‘media_library_optimization_dashboard’ ); } add_action(‘admin_menu’, ‘images_with_link_and_size_menu’); // Get posts where image is embedded function find_post_using_image($image_url) { global $wpdb; // The modified query includes…Continue reading

PHP [Vendor Profile]: Notify User with Vendor Profile Approval/Denial Status

// This code snippet sends email notifications to the vendor when their vendor profile is approved, or denied. It ensures users are notified about the status of their vendor profiles. add_action(‘transition_post_status’, ‘send_user_notification_for_approved_profile’, 10, 3); add_action(‘transition_post_status’, ‘send_user_notification_for_denied_profile’, 10, 3); function send_user_notification_for_approved_profile($new_status,…Continue reading

Duplicate Post/Page Link (copy)

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading

Removing Otter Pro upsell notification

$notifications = get_option( ‘themeisle_blocks_settings_notifications’, array() ); if ( ! isset( $notifications[‘dashboard_upsell’] ) || $notifications[‘dashboard_upsell’] !== true ) { $notifications[‘dashboard_upsell’] = true; update_option( ‘themeisle_blocks_settings_notifications’, $notifications ); }Continue reading

Remove Customer Role From Excluded Roles

add_filter( ‘aioseo_access_control_excluded_roles’, ‘aioseo_filter_access_control_excluded_roles’ ); function aioseo_filter_access_control_excluded_roles( $roles ) { if ( ( $key = array_search( ‘customer’, $roles ) ) !== false ) { unset( $roles[ $key ] ); } return $roles; }Continue reading