/**
 * Migrate Option Panel To Customizer
 */
function roadfighter_migrate_option()
{
    if (get_option('roadfighter_options') && !get_option('roadfighter_option_migrate')) {
        $theme_options = array('roadfighter_logo', 'roadfighter_favicon', 'roadfighter_slideimage1', 'roadfighter_fimg1', 'roadfighter_fimg2', 'roadfighter_fimg3');
        $wp_upload_dir = wp_upload_dir();
        require ABSPATH . 'wp-admin/includes/image.php';
        foreach ($theme_options as $option) {
            $option_value = roadfighter_get_option($option);
            if ($option_value && $option_value != '') {
                $filetype = wp_check_filetype(basename($option_value), null);
                $image_name = preg_replace('/\\.[^.]+$/', '', basename($option_value));
                $new_image_url = $wp_upload_dir['path'] . '/' . $image_name . '.' . $filetype['ext'];
                roadfighter_import_file($new_image_url);
            }
        }
        update_option('roadfighter_option_migrate', true);
    }
}
Example #2
0
                        <div class="bottom_tagline_button">
                            <?php 
if (roadfighter_get_option('roadfighter_homepage_button') != '') {
    ?>
                                <a href="<?php 
    echo esc_url(roadfighter_get_option('roadfighter_homepage_button_link'));
    ?>
"><?php 
    echo stripslashes(roadfighter_get_option('roadfighter_homepage_button'));
    ?>
</a>
                                <?php 
} else {
    ?>
                                <a href="<?php 
    echo esc_url(roadfighter_get_option('roadfighter_homepage_button_link'));
    ?>
"><?php 
    _e('View Portfolio', 'road-fighter');
    ?>
</a>
                            <?php 
}
?>
  
                        </div>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </div>
Example #3
0
bloginfo('name');
?>
 logo"/></a>
                                </div>
                            </div>
                            <div class="grid_14 omega">            
                                <div class="call-us">
                                    <?php 
if (roadfighter_get_option('roadfighter_topright') != '') {
    ?>
                                        <p> <?php 
    echo stripslashes(roadfighter_get_option('roadfighter_topright'));
    ?>
</p>
                                        <a class="btn" href="tel:<?php 
    echo stripslashes(roadfighter_get_option('roadfighter_contact_number'));
    ?>
">
                                        </a>
                                <?php 
}
?>
                                </div>
                            </div>        
                        </div>
                        <div class="clear"></div>
                        <div class="menu-wrapper">
                            <div id="MainNav">
                                <a href="#" class="mobile_nav closed"><?php 
_e('Pages Navigation Menu', 'road-fighter');
?>
function roadfighter_of_head_css()
{
    $output = '';
    $custom_css = roadfighter_get_option('roadfighter_customcss');
    if ($custom_css != '') {
        $output .= $custom_css . "\n";
    }
    // Output styles
    if ($output != '') {
        $output = "<!-- Custom Styling -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
        echo $output;
    }
}