function edcc_save_post_webhook($post_id, $post) { // Check to see if autosaving etc., if so ignore if ($post->post_status !== ‘publish’) { return; } if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE ) { return; } // Check if it is a REST Request if ( defined(…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_action(‘admin_head’, ‘sep_color’); function sep_color() { echo ‘ ‘; }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
// 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