How to add a media option in the Frontend's settings
You have to read this article only if you're understanding already how to add Settings pages in the Frontend Component from the Administrator's panel https://www.midrub.com/articles/how-to-add-new-settings-pages-for-the-frontend-features
At the begin Midrub had two logos, for login and dashboard. In 2019 i've added support for themes and the logo has become optional. Each theme could have or no a logo. Is optionally and you can add the logo's option in the Frontend Settings by using the function get_option_media.
The function get_option_media has these parameters:
'An unique slug.',
'words' => array(
'placeholder' => 'Text for placeholder.'
The data will be saved in the options table with the slug as option's key. To call it in the theme or where you need, just use the function get_option('slug').
The media option is based on the Administrator Multimedia Gallery. But you can enter even external urls for your media.
- get_option_checkbox - adds checkboxes in the Frontend Settings
- How to add a media option in the Frontend's settings
- How to add a textarea option in the Frontend's settings
- How to add a dropdown option in the Frontend's settings
- How to add new Settings pages for the Frontend's features
- Midrub Frontend Introduction
- Components Introduction