Home / Admin / Add TikTok to the social tab of settings
Duplicate Snippet

Embed Snippet on Your Site

Add TikTok to the social tab of settings

This will show the setting and it should be saved when saving the form.

Code Preview
php
<?php
add_filter( 'wcvendors_social_media_settings', 'wcvendors_add_social_media_settings' );
function wcvendors_add_social_media_settings( $settings ) {
    $tiktok = array(
		'id'                  => '_wcv_tiktok_username',
		'label'               => __( 'Tiktok username', 'wcvendors-pro' ),
		'placeholder'         => __( 'Tiktok Username', 'wcvendors-pro' ),
		'desc_tip'            => 'true',
		'description'         => __( 'Your tiktok username.', 'wcvendors-pro' ),
		'type'                => 'text',
		'icon'                => 'tiktok-square',
		'url_template'        => '//tiktok.com/%s',
		'admin_signup_form'   => array(
			'title'   => __( 'Tiktok', 'wcvendors-pro' ),
			'id'      => 'wcvendors_hide_signup_social_tiktok',
			'type'    => 'checkbox',
			'default' => false,
		),
		'admin_settings_form' => array(
			'title'   => __( 'Tiktok', 'wcvendors-pro' ),
			'id'      => 'wcvendors_hide_settings_social_tiktok',
			'type'    => 'checkbox',
			'default' => false,
		),
	);
    $settings['tiktok'] = $tiktok;
    return $settings;
}

Comments

Add a Comment