: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( 'theme' === type ) {
* Add opt-in/out button to the active theme's buttons collection
* in the theme's extended details overlay.
* @author Vova Feldman (@svovaf)
$( '.theme-overlay' ).contentChange( function () {
if ( 0 === $( '.theme-overlay.active' ).length ) {
// Add opt-in/out button only to the currently active theme.
if ( $( '#fs_theme_opt_in_out' ).length > 0 ) {
var label = getOptInLabel( ! isTrackingAllowed ),
href = ( isTrackingAllowed || isRegistered ) ? '' : reconnectUrl,
$actionLink = $( '<a id="fs_theme_opt_in_out" href="' + encodeURI( href ) + '" class="button">' + label + '</a>' );
$( '.theme-wrap .theme-actions .active-theme' ).append( $actionLink );
if ( isRegistered && '' === href ) {
registerActionLinkClick();
if ( 'theme' !== type ) {
registerActionLinkClick();