// 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
// 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
// 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
// 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
add_filter( ‘aioseo_flyout_menu_enable’, ‘aioseo_filter_flyout_menu_enable’ ); function aioseo_filter_flyout_menu_enable( $enabled ) { if ( ! aioseo()->access->isAdmin() ) { $enabled = false; } return $enabled; }Continue reading
$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
// Hide all admin notices in a collapsible sidebar function hide_all_admin_notices_in_sidebar() { ?>Continue reading
add_filter( ‘aioseo_post_metabox_priority’, ‘aioseo_filter_metabox_priority’ ); function aioseo_filter_metabox_priority( $priority) { return ‘low’; }Continue reading
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
add_filter( ‘aioseo_show_seo_news’, ‘aioseo_disable_dashboard_widget’ ); function aioseo_disable_dashboard_widget( $enabled ) { return false; }Continue reading