Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function logo_display()
- {
- ?>
- <input type="file" name="logo" />
- <?php echo get_option('logo'); ?>
- <?php
- }
- function handle_logo_upload()
- {
- if(!empty($_FILES["demo-file"]["tmp_name"]))
- {
- $urls = wp_handle_upload($_FILES["logo"], array('test_form' => FALSE));
- $temp = $urls["url"];
- return $temp;
- }
- return $option;
- }
- function display_theme_panel_fields()
- {
- add_settings_section("section", "All Settings", null, "theme-options");
- add_settings_field("logo", "Logo", "logo_display", "theme-options", "section");
- register_setting("section", "logo", "handle_logo_upload");
- }
- add_action("admin_init", "display_theme_panel_fields");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement