How to add rtMedia custom settings?
How to add rtMedia custom settings just like the example image above? Just add the codes to your functions.php of your theme.
add_filter( 'rtmedia_add_settings_sub_tabs', 'wdes_music_rtmedia_pro_settings_tabs_content' );
function wdes_music_rtmedia_pro_settings_tabs_content( $tabs ){
$tabs[] = array(
'href' => '#rtmedia-music-genre',
'icon' => 'dashicons-admin-tools',
'title' => esc_html__( 'Music Genre' ),
'name' => esc_html__( 'Music Genre' ),
'callback' => 'wdes_music_genre_settings_callback',
);
return $tabs;
}
function wdes_music_genre_settings_callback(){
global $rtmedia;
?>
<div class="rtm-option-wrapper">
<h3 class="rtm-option-title">Music Genre</h3>
<div class="wdes-music-genres">
<p><?php
printf(
'<input type="text" name="rtmedia-options[wdes_music_genre]" id="wdes_music_genre" value="%s" />',
$rtmedia->options['wdes_music_genre']
);
?></p>
</div>
</div>
<?php
}
