0, 'fullwidth' => 0 // Parameter for fullwidth override (CSS handled in alba-board-style.css) ], $atts); $board_id = intval($atts['id']); $is_fullwidth = intval($atts['fullwidth']) === 1; if (!$board_id) { return '
' . esc_html__('Invalid board ID', 'alba-board') . '
'; } // 2. Zero-Friction Auto-Capture: Learn the public URL for notifications silently if ( ! is_admin() && get_the_ID() ) { $current_url = get_permalink( get_the_ID() ); $stored_url = get_post_meta( $board_id, 'alba_board_public_url', true ); // Only trigger DB write if the URL has changed (Highly performant, self-healing) if ( $current_url && $current_url !== $stored_url ) { update_post_meta( $board_id, 'alba_board_public_url', $current_url ); } } // 3. Fetch Display Options $display_opts = get_option('alba_board_display', ['show_avatars' => 1, 'theme' => 'default']); $show_avatars = !empty($display_opts['show_avatars']); $theme_class = isset($display_opts['theme']) ? 'alba-theme-' . $display_opts['theme'] : 'alba-theme-default'; // Append fullwidth class if requested if ($is_fullwidth) { $theme_class .= ' alba-board-fullwidth-override'; } ob_start(); // 4. Render "My Tasks Only" filter for logged-in users $current_user_id = get_current_user_id(); if ($current_user_id) { echo '