The torques exerted by stellar bars are expected to provoke the flow of cold gas within the disk, driving the secular evolution of the inner parts of the galaxy, as established in simulation models since the last century. To date, it remains a matter of debate why the distribution of ionized gas along bars and in the circumnuclear regions varies among galaxies. With unprecedented statistical significance, we investigate the spatial distribution of star formation (SF) in the inner parts of more than 800 nearby non-highly inclined disk galaxies drawn from the S4G survey. We use archival GALEX far- and near-UV imaging for 772 barred galaxies. We also assemble continuum-subtracted Halpha images for 433 barred galaxies (largest compilation for distances lower than 40 Mpc), several of which we produced from MUSE and CALIFA integral field unit data cubes. We employ two complementary approaches: 1) the analysis of bar/disk stacks built from co-added UV images of hundreds of galaxies; and 2) the classification of the morphology of ionised regions in galaxies by individually inspecting Halpha and UV images. We report distinct distributions of SF within bars in galaxies of different morphologies. Lenticular galaxies tend to host SF exclusively in the circumnuclear regions, which is probably linked to the role of bars in galaxy quenching postulated from studies at high-z and simulations. SF at the bar ends, but not along the bar, is typical for early- and intermediate-type spirals: this most likely results from the interplay of gas flow, shocks, and enhanced shear in centrally concentrated galaxies with large bar amplitudes. Star-forming bars are most common among late-type galaxies: we argue that this is a consequence of low shear. In bar stacks of spirals, the UV emission traces the stellar bars and dominates on their leading side, as witnessed in simulations. For early-types, the central UV emission is about 0.5 mag brighter in strongly barred galaxies, relative to their weakly barred counterparts: this is related to the efficiency of strong bars sweeping the disk gas and triggering central starbursts. We also report a UV/Halpha deficit within the inner rings: this hints at the effect of resonance rings trapping gas that is no longer funnelled inwards. We encourage these trends to be further studied elsewhere with numerical models. We conclude that bars are important agents in the regulation of SF in disks. (This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 893673).