SAN FRANCISCO — The cavalry came in the form of a slugger determined to shoot down the notion that a golf round sent him to the disabled list and a shortstop who joked that the Florida sun had dyed his hair platinum blond.

When Yoenis Cespedes and Asdrubal Cabrera finally arrived in the clubhouse Friday, the Mets regained a pair of stalwarts. They hope it isn’t too late to turn around their season.

“We’re going to look different here in the next couple of days,” said manager Terry Collins, whose team entered Friday a game below the .500 mark (60-61) and 4 1⁄2 games out of the final wild-card spot.

Cespedes last played Aug. 3 at Yankee Stadium, when he uncorked a swing late in the game and knew almost immediately that he no longer could play through the strained right quadriceps he had spent a month protecting. It happened on the same day that he was spotted playing golf with former big-leaguer Kevin Millar, prompting the Mets to ask him to cease playing during his recovery.

“I just want to make it really clear that I don’t believe golf affected me,” Cespedes said through a translator, the first time he has directly addressed the issue. “And it’s not just that I believe that; the doctors actually said that golf did not affect me. Last year, I played golf, as well, but there were different results last year with the team. So I think there was just less critique of me doing that in my free time.”

Indeed, the last time Cespedes’ golf habit wound up in the spotlight, the Mets were busy sweeping the Cubs during the National League Championship Series on the way to the franchise’s first appearance in the World Series since 2000.

But this season, the Mets have not hit their stride the way they did last season, when they surged past the Nationals after Cespedes’ arrival at the trade deadline.

advertisement | advertise on newsday

Cabrera had been sidelined since July 31 with a strained patellar tendon in his left knee. “It’s really hard to watch on TV and see your team lose,” he said. “I feel really good. I’m happy to be back. I’m ready to help the team.”

Cabrera started at shortstop, allowing the Mets to shift Jose Reyes back to third base. Cespedes batted cleanup and played leftfield, where Collins said he’s expected to remain, at least in the short term.

Cespedes began the season as the Mets’ primary centerfielder, though his leg issue prompted a move to left.

“I think that I prefer leftfield,” Cespedes said. “But honestly, wherever the team needs me, I’ll go at this point.”

In 100 games, Cabrera is hitting .255 with 13 homers and 33 RBIs. Cespedes is hitting a team-high .289 with 22 homers and 59 RBIs.

Mets videos

“They’re talented, talented guys,” Collins said. “It’s great to have them back.”

To make room on the roster, the Mets optioned Ty Kelly and T.J. Rivera to Triple-A Las Vegas.