示例#1
0
            <?php 
        }
        ?>
            
        <?php 
        if (!empty($profitmag_settings['right_side_gallery'])) {
            ?>
            <div id="sidebar-section-side-gallery" class="widget-area sidebar clearfix">
                <h2 class="block-title"><span class="bordertitle-red"></span><?php 
            _e('Photo Gallery', 'profitmag');
            ?>
</h2>
                <div class="photogallery-wrap clearfix">
                <?php 
            foreach ($profitmag_settings['right_side_gallery'] as $image) {
                $attachment_id = profitmag_get_image_id($image);
                $img_url = wp_get_attachment_image_src($attachment_id, 'sidebar-gallery');
                $img_url_full = wp_get_attachment_image_src($attachment_id, 'full');
                ?>
                            <a class="nivolight" data-lightbox-gallery="grp" href="<?php 
                echo $img_url_full[0];
                ?>
"><img src="<?php 
                echo $img_url[0];
                ?>
" alt="Gallery" /></a>
                <?php 
            }
            ?>
             </div>
            </div>
示例#2
0
    function profitmag_theme_options_page()
    {
        global $profitmag_default_options, $profitmag_cat_arr, $profitmag_slider_show, $profitmag_slider_controls, $profitmag_slider_auto, $menu_alignment_arr, $profitmag_postlist;
        if (!isset($_REQUEST['settings-updated'])) {
            $_REQUEST['settings-updated'] = false;
        }
        // This checks whether the form has just been submitted.
        ?>
 
     <div class="wrap" id="optionsframework-wrap">
        
        <div class="profitmag-header">
            <div class="profitmag-logo">
                <img src="<?php 
        echo get_template_directory_uri();
        ?>
/images/logo.png" alt="logo-backend" />      
            </div>
            
            
            <div class="profitmag-title">
                <p><?php 
        _e('Donate to Support Us', 'profitmag');
        ?>
</p>
                <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
                <input type="hidden" name="cmd" value="_donations">
                <input type="hidden" name="business" value="*****@*****.**">
                <input type="hidden" name="lc" value="US">
                <input type="hidden" name="item_name" value="Wp Gaint">
                <input type="hidden" name="no_note" value="0">
                <input type="hidden" name="currency_code" value="USD">
                <input type="hidden" name="bn" value="PP-DonationsBF:btn_donateCC_LG.gif:NonHostedGuest">
                <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
                <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
                </form>
            </div>
        </div>
        <div class="clear"></div>
        
        <?php 
        if (false !== $_REQUEST['settings-updated']) {
            ?>
        	<div class="updated fade"><p><strong><?php 
            _e('Options Saved', 'profitmag');
            ?>
</strong></p></div>
        	<?php 
        }
        // If the form has just been submitted, this shows the notification
        ?>
            
        <div class="wrapper-bg">
            <!-- Menu Tabs -->
            <div class="nav-tab-wrapper">
                <a id="options-group-1-tab" class="options-nav-tab" href="#options-group-1"><i class="fa fa-cog"></i><?php 
        _e('Basic Settings', 'profitmag');
        ?>
</a>                
                <a id="options-group-2-tab" class="options-nav-tab" href="#options-group-2"><i class="fa fa-desktop"></i><?php 
        _e('Home Page Settings', 'profitmag');
        ?>
</a>
                <a id="options-group-3-tab" class="options-nav-tab" href="#options-group-3"><i class="fa fa-sliders"></i><?php 
        _e('Slider Settings', 'profitmag');
        ?>
</a>
                <a id="options-group-4-tab" class="options-nav-tab" href="#options-group-4"><i class="fa fa-sidebar"></i><?php 
        _e('Sidebar Posts Settings', 'profitmag');
        ?>
</a>
                <a id="options-group-5-tab" class="options-nav-tab" href="#options-group-5"><i class="fa fa-ads"></i><?php 
        _e('Advertising', 'profitmag');
        ?>
</a>            	
            	<a id="options-group-6-tab" class="options-nav-tab" href="#options-group-6"><i class="fa fa-share-alt"></i><?php 
        _e('Social Links', 'profitmag');
        ?>
</a>
            	<a id="options-group-7-tab" class="options-nav-tab" href="#options-group-7"><i class="fa fa-magic"></i><?php 
        _e('Tools', 'profitmag');
        ?>
</a>
                <a id="options-group-8-tab" class="options-nav-tab" href="#options-group-8"><i class="fa fa-wordpress"></i><?php 
        _e('About ProfitMag Theme', 'profitmag');
        ?>
</a>
            	
            	
            </div> <!-- nav-tab-wrapper -->
            
            <div id="optionsframework-metabox">
                <div id="optionsframework" class="postbox">
                    <form id="form-options" method="post" action="options.php">
                        <?php 
        settings_fields('profitmag_theme_options');
        $settings = get_option('profitmag_options', $profitmag_default_options);
        ?>
                        <!-- Basic Settings -->
            			<div id="options-group-1" class="group">
            			<h3><?php 
        _e('Basic Settings', 'profitmag');
        ?>
</h3>
            				
                            <div class="form-row">
        						<label class="block" for="responsive_dsgn"><?php 
        _e('Disable Responsive Design?', 'profitmag');
        ?>
</label>
        						
        						<div class="checkbox">
        							<label for="responsive_design">
        							<input type="checkbox" id="responsive_design" name="profitmag_options[responsive_design]" value="1" <?php 
        checked(true, $settings['responsive_design']);
        ?>
 />
        							<?php 
        _e('Check to disable', 'profitmag');
        ?>
</label>
        						</div>
        					</div>
                                                        
                       
                           <div class="form-row">
                                <label class="block"><?php 
        _e('Web Page Layout', 'profitmag');
        ?>
</label>
            					<?php 
        $webpage_layouts = array('Fullwidth', 'Boxed');
        ?>
            					<?php 
        foreach ($webpage_layouts as $webpage_layout) {
            ?>
            						<div class="checkbox">
            						<label for="<?php 
            echo $webpage_layout;
            ?>
">
            						<input type="radio" id="<?php 
            echo esc_attr($webpage_layout);
            ?>
" name="profitmag_options[webpage_layout]" value="<?php 
            echo esc_attr($webpage_layout);
            ?>
" <?php 
            checked($settings['webpage_layout'], esc_attr($webpage_layout));
            ?>
 />
            						<?php 
            echo esc_attr($webpage_layout);
            ?>
            						</label>
            						</div>
            					<?php 
        }
        ?>
           					</div>
                               
                            <div class="form-row">
            						<label class="block"><?php 
        _e('Show Search in Menu?', 'profitmag');
        ?>
</label>
            						<div class="checkbox">
            							<label for="show_search">
            							<input type="checkbox" id="show_search" name="profitmag_options[show_search]" value="1" <?php 
        checked(true, $settings['show_search']);
        ?>
 />
            							<?php 
        _e('Check to enable', 'profitmag');
        ?>
            							</label>
            						</div>
           					</div>  
                               
                            <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Menu Alignment', 'profitmag');
        ?>
</label>
                					<select id="menu_alignment" name="profitmag_options[menu_alignment]">
                					<?php 
        foreach ($menu_alignment_arr as $menu_alignment) {
            echo '<option  value="' . $menu_alignment . '" ' . selected($menu_alignment, $settings['menu_alignment']) . '>' . $menu_alignment . '</option>';
        }
        ?>
                					</select>
                					
                                    
           					</div>   
                                
                            <div class="form-row">
                					<label class="block" for="favicon"><?php 
        _e('Upload Favicon', 'profitmag');
        ?>
</label>
                							<div class="profitmag_fav_icon">
                							  <input type="text" name="profitmag_options[media_upload]" id="profitmag_media_upload" value="<?php 
        if (!empty($settings['media_upload'])) {
            echo $settings['media_upload'];
        }
        ?>
" />
                							  <input class="button" name="media_upload_button" id="profitmag_media_upload_button" value="<?php 
        _e('Upload', 'profitmag');
        ?>
" type="button" />
                							  <em class="f13">&nbsp;&nbsp;<?php 
        _e('Upload favicon(.png) with size of 16px X 16px', 'profitmag');
        ?>
</em>
                
                							   <?php 
        if (!empty($settings['media_upload'])) {
            ?>
                    							  <div id="profitmag_media_image">
                    							  <img src="<?php 
            echo $settings['media_upload'];
            ?>
" id="profitmag_show_image">
                    							  <div id="profitmag_fav_icon_remove"><?php 
            _e('Remove', 'profitmag');
            ?>
</div>
                    							  </div>
                 							  <?php 
        } else {
            ?>
                    							  <div id="profitmag_media_image" style="display:none">
                    							  <img src="<?php 
            if (isset($settings['media_upload'])) {
                echo $settings['media_upload'];
            }
            ?>
" id="profitmag_show_image">
                    							  <a href="javascript:void(0)" id="profitmag_fav_icon_remove" title="<?php 
            _e('remove', 'profitmag');
            ?>
"><?php 
            _e('Remove', 'profitmag');
            ?>
</a>
                    							  </div>
                    							  <?php 
        }
        ?>
                							</div>
       					    </div>
                                
                            <div class="form-row">
                                <label class="block" for="site-logo"><?php 
        _e('Upload Header Logo', 'profitmag');
        ?>
</label>
                                <a  class="button" href="<?php 
        echo admin_url('/themes.php?page=custom-header');
        ?>
" ><?php 
        _e('Upload', 'profitmag');
        ?>
</a>
                            </div>
                            
                            <div class="form-row">
                				<label class="block"><?php 
        _e('Footer Copyright Text', 'profitmag');
        ?>
</label>
                				<input id="footer_copyright" name="profitmag_options[footer_copyright]" type="text" value="<?php 
        echo esc_attr($settings['footer_copyright']);
        ?>
" />
            				</div>

                            <div class="form-row">
                                <label class="block"><?php 
        _e('Read More Text in Archive Pages', 'profitmag');
        ?>
</label>
                                <input name="profitmag_options[read_more]" type="text" value="<?php 
        echo esc_attr($settings['read_more']);
        ?>
" />
                            </div>
                            
                            
            			</div> <!-- #options-group-1 -->
                        
                       
                        
                        <!-- Home Page Settings -->
            			<div id="options-group-2" class="group" style="display: none;">
            			     <h3><?php 
        _e('Home Page Settings', 'profitmag');
        ?>
</h3> 
                                 
                                 <div class="form-row inline-label">
                                 <label class="block"><?php 
        _e('Hide Posted Date', 'profitmag');
        ?>
</label>
                                 <div class="checkbox">
                                 <label for="hide_date">
                                     <input type="checkbox" id="hide_date" name="profitmag_options[hide_date]" value="1" <?php 
        checked(true, $settings['hide_date']);
        ?>
 />
                                        <?php 
        _e('Check to Hide', 'profitmag');
        ?>
                                        </label>
                                    </div>
                                 </div>

                                 <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Featured Block Category (Section Beside Slider )', 'profitmag');
        ?>
</label>
                					<select id="featured_block_beside" name="profitmag_options[featured_block_beside]">
                					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_beside']) . '>' . $label . '</option>';
        }
        ?>
                					</select>
                                    
            					</div>
                                 
                                 
                                 <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Featured Block One Category ( Section Below Slider )', 'profitmag');
        ?>
</label>
                					<select id="featured_block_one" name="profitmag_options[featured_block_one]">
                					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_one']) . '>' . $label . '</option>';
        }
        ?>
                					</select>
                					<br />
                                    <br />
                                    <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                    <input class="mini" type="text" name="profitmag_options[no_of_block_one]" value="<?php 
        echo absint($settings['no_of_block_one']);
        ?>
" />
                   					
            					</div>
                                
                                
                                <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Featured Block Two Category (Section Below Featured block One )', 'profitmag');
        ?>
</label>
                					<select id="featured_block_two" name="profitmag_options[featured_block_two]">
                					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_two']) . '>' . $label . '</option>';
        }
        ?>
                					</select>
                					<br />
                                    <br />
                                    <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                    <input class="mini" type="text" name="profitmag_options[no_of_block_two]" value="<?php 
        echo absint($settings['no_of_block_two']);
        ?>
" />
                   					
            					</div>
                                
                                  
                                <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Featured Block Three Category ( 5 Column Block )', 'profitmag');
        ?>
</label>
                					<select id="featured_block_three" name="profitmag_options[featured_block_three]">
                					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_three']) . '>' . $label . '</option>';
        }
        ?>
                					</select>
                					<br />
                                    <br />
                                    
                                    <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                    <input class="mini" type="text" name="profitmag_options[no_of_block_three]" value="<?php 
        echo absint($settings['no_of_block_three']);
        ?>
" />
                   					
            					</div>
                                
                                
                                <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Featured Block Four ( Excerpt Posts )', 'profitmag');
        ?>
</label>
                					<select id="featured_block_four" name="profitmag_options[featured_block_four]">
                					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_four']) . '>' . $label . '</option>';
        }
        ?>
                					</select>
                					<br />
                                    <br />
                                    <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                    <input class="mini" type="text" name="profitmag_options[no_of_block_four]" value="<?php 
        echo absint($settings['no_of_block_four']);
        ?>
" />
                   					
            					</div>
                                
                                
                                
                                <div class="form-row inline-label">
                					<div class="block-section-title"><?php 
        _e('Featured Block Five', 'profitmag');
        ?>
</div>
                                    
                                    <div class="block-section-left">
                                        <label class="block"><?php 
        _e('Featured Block Left Category', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_left" name="profitmag_options[featured_block_left]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_left']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[no_of_block_left]" value="<?php 
        echo absint($settings['no_of_block_left']);
        ?>
" />
                                    </div>
                                    
                                    <div class="block-section-right">
                                        <label class="block"><?php 
        _e('Featured Block Right Category', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_right" name="profitmag_options[featured_block_right]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['featured_block_right']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[no_of_block_right]" value="<?php 
        echo absint($settings['no_of_block_right']);
        ?>
" />
                                    </div>
                   					
            					</div>
                                
                                <div class="form-row clearfix">
						          <label class="block"><?php 
        _e('Media Gallery', 'profitmag');
        ?>
</label>                                                                                                                                        
                                  <div class="media-image-fields clearfix">
                                    <?php 
        $total_img = 0;
        if (!empty($settings['media_gallery'])) {
            $total_img = count($settings['media_gallery']);
            $img_counter = 0;
            foreach ($settings['media_gallery'] as $gallery_image) {
                $attachment_id = profitmag_get_image_id($gallery_image);
                $img_url = wp_get_attachment_image_src($attachment_id, 'thumbnail');
                ?>
                                                <div class="gal-img-block">
                                                    
                                                    <div class="gal-img"><img src="<?php 
                echo $img_url[0];
                ?>
" /><span class="fig-remove">Remove</span></div>
                                                    <input type="hidden" name="profitmag_options[media_gallery][<?php 
                echo $img_counter;
                ?>
]" class="hidden-media-gallery" value="<?php 
                echo $gallery_image;
                ?>
" />
                                                </div>
                                    <?php 
                $img_counter++;
            }
        }
        ?>
                                    
                                  </div> 
                                  <input type="hidden" id="media_gallery_img_count" value="<?php 
        echo $total_img;
        ?>
" />                                                                       
                                  <a href="javascript:void(0)" class="media-add-gallery-image" class="button-primary"><?php 
        _e('Add Image', 'profitmag');
        ?>
</a>
	                           </div>
            
            					
                        </div>
                        <!-- End Home Page Settings -->
                        
                        
                        <!-- Slider Settings -->
            			<div id="options-group-3" class="group" style="display: none;">
            				<h3><?php 
        _e('Slider Settings', 'profitmag');
        ?>
</h3>
            					
            					
                                
                                <div class="form-row">
                					<label class="block"><?php 
        _e('Show Slide From', 'profitmag');
        ?>
</label>                					                                    
				                    <label class="checkbox block" id="single_post_slider"><input value="single_post_slider" type="radio" name="profitmag_options[slider_options]" <?php 
        checked($settings['slider_options'], 'single_post_slider');
        ?>
 /><?php 
        _e('Single Posts', 'profitmag');
        ?>
</label>                                                                      
                                    <label class="checkbox block" id="cat_post_slider"><input value="cat_post_slider" name="profitmag_options[slider_options]" type="radio" <?php 
        checked($settings['slider_options'], 'cat_post_slider');
        ?>
 /><?php 
        _e('Category Posts', 'profitmag');
        ?>
</label>                                                                        									            
            					</div>
                                
                                
                                <div class="form-row post-as-slider" >
                					<label class="block"><?php 
        _e('Select the post that you want to display as a Slider', 'profitmag');
        ?>
</label>
                                    
                                    <div class="form-block-row">
                                        <label for="slider1" class="inline-block"><?php 
        _e('Silder 1', 'profitmag');
        ?>
</label>
                                        <select id="slider1" name="profitmag_options[slider1]">
                        					<?php 
        foreach ($profitmag_postlist as $single_post) {
            $label = $single_post['label'];
            echo '<option value="' . $single_post['value'] . '" ' . selected($single_post['value'], $settings['slider1']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                                    </div>
                					
                                                                        
                                    
                                    <div class="form-block-row">
                                        <label for="slider2" class="inline-block"><?php 
        _e('Silder 2', 'profitmag');
        ?>
</label>
                                        <select id="slider2" name="profitmag_options[slider2]">
                        					<?php 
        foreach ($profitmag_postlist as $single_post) {
            $label = $single_post['label'];
            echo '<option value="' . $single_post['value'] . '" ' . selected($single_post['value'], $settings['slider2']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                                    </div>
                                    
                                    <div class="form-block-row">
                                        <label for="slider3" class="inline-block"><?php 
        _e('Silder 3', 'profitmag');
        ?>
</label>
                                        <select id="slider3" name="profitmag_options[slider3]">
                        					<?php 
        foreach ($profitmag_postlist as $single_post) {
            $label = $single_post['label'];
            echo '<option value="' . $single_post['value'] . '" ' . selected($single_post['value'], $settings['slider3']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                                    </div>
                                    
                                    <div class="form-block-row">
                                        <label for="slider3" class="inline-block"><?php 
        _e('Silder 4', 'profitmag');
        ?>
</label>
                                        <select id="slider4" name="profitmag_options[slider4]">
                        					<?php 
        foreach ($profitmag_postlist as $single_post) {
            $label = $single_post['label'];
            echo '<option value="' . $single_post['value'] . '" ' . selected($single_post['value'], $settings['slider4']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                                    </div>
                                                                        
            					</div>
                                
                                <div class="form-row cat-as-slider" >
                                        <label class="block"><?php 
        _e('Select Category', 'profitmag');
        ?>
</label>
                    					<select id="slider_cat" name="profitmag_options[slider_cat]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['slider_cat']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>                    					
                                </div>
                                                               
            
            					<div class="form-row">
            					<label class="block"><?php 
        _e('Show Slider Controls (Arrows)', 'profitmag');
        ?>
</label>
            					<?php 
        foreach ($profitmag_slider_controls as $slider_controls) {
            ?>
                					<div class="checkbox">
                					<label for="<?php 
            echo $slider_controls['value'];
            ?>
">
                					<input type="radio" id="<?php 
            echo $slider_controls['value'];
            ?>
" name="profitmag_options[slider_show_controls]" value="<?php 
            echo $slider_controls['value'];
            ?>
" <?php 
            checked($settings['slider_show_controls'], $slider_controls['value']);
            ?>
 />
                					<?php 
            echo $slider_controls['label'];
            ?>
                					</label>
                					</div> 
            					<?php 
        }
        ?>
            					</div>
            
            					<div class="form-row">
         					   <label class="block"><?php 
        _e('Slider auto Transition', 'profitmag');
        ?>
</label>
            					<?php 
        foreach ($profitmag_slider_auto as $slider_autos) {
            ?>
            					<div class="checkbox">
            					<label for="<?php 
            echo $slider_autos['value'];
            ?>
">
            					<input type="radio" id="<?php 
            echo $slider_autos['value'];
            ?>
" name="profitmag_options[slider_auto]" value="<?php 
            echo $slider_autos['value'];
            ?>
" <?php 
            checked($settings['slider_auto'], $slider_autos['value']);
            ?>
 />
            					<?php 
            echo $slider_autos['label'];
            ?>
            					</label>
            					</div>
            					<?php 
        }
        ?>
            					</div>
            
            					
            
            					<div class="form-row">
            					<label class="block"><?php 
        _e('Slider Speed', 'profitmag');
        ?>
</label>
            					<input id="slider_speed" name="profitmag_options[slider_speed]" type="text" value="<?php 
        echo $settings['slider_speed'];
        ?>
" />
            					</div>
            
            					
            			</div>
                        
                        <!-- Sidebar Settings -->
            			<div id="options-group-4" class="group" style="display: none;">
            				<h3><?php 
        _e('Sidebar Posts Settings', 'profitmag');
        ?>
</h3>
            				
                            <div class="option-sidebar-layout">
                                <div class="form-row form-row-layout-wrap clearfix">
                					<label for="sidebar_layout" class="sidebar_layout"><strong>Sidebar Layout</strong></label>
                                    
                                    <div class="layout-wrap">
                                    <img src="<?php 
        echo get_template_directory_uri() . '/inc/admin-panel/images/left-sidebar.png';
        ?>
" />
                                    <label class="checkbox" id="single_post_slider">
                                    <input value="left_sidebar" type="radio" name="profitmag_options[sidebar_layout]" <?php 
        checked($settings['sidebar_layout'], 'left_sidebar');
        ?>
 >
                                    <?php 
        _e('Left Sidebar', 'profitmag');
        ?>
</label>   
                                    </div>

                                    <div class="layout-wrap">
                                    <img src="<?php 
        echo get_template_directory_uri() . '/inc/admin-panel/images/right-sidebar.png';
        ?>
" />
                                    <label class="checkbox" id="cat_post_slider">    
                                    <input value="right_sidebar" name="profitmag_options[sidebar_layout]" type="radio" <?php 
        checked($settings['sidebar_layout'], 'right_sidebar');
        ?>
 >
                                    <?php 
        _e('Right Sidebar', 'profitmag');
        ?>
</label>
                                    </div>

                                    <div class="layout-wrap">
                                        <img src="<?php 
        echo get_template_directory_uri() . '/inc/admin-panel/images/both-sidebar.png';
        ?>
" />
                                    <label class="checkbox" id="cat_post_slider"><input value="both_sidebar" name="profitmag_options[sidebar_layout]" type="radio" <?php 
        checked($settings['sidebar_layout'], 'both_sidebar');
        ?>
 >
                                    
                                    <?php 
        _e('Both Sidebar', 'profitmag');
        ?>
</label>
                                    </div>

                                    <div class="layout-wrap">
                                        <img src="<?php 
        echo get_template_directory_uri() . '/inc/admin-panel/images/no-sidebar.png';
        ?>
" />
                                    <label class="checkbox" id="cat_post_slider"><input value="no_sidebar" name="profitmag_options[sidebar_layout]" type="radio" <?php 
        checked($settings['sidebar_layout'], 'no_sidebar');
        ?>
 >
                                    
                                   
                                    <?php 
        _e('No Sidebar', 'profitmag');
        ?>
</label>   
                                     </div>                                                                     									            
            					</div>
                            </div>
                            
                            
                            <div class="option-left-sidebar">
                                
                                <h4 class="f15"><strong><?php 
        _e('Left Sidebar Settings', 'profitmag');
        ?>
</strong></h4>
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Category Sidebar One', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_beside" name="profitmag_options[left_cat_post_one]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['left_cat_post_one']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        <label class="block"><?php 
        _e('No.of Post to Display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[left_no_of_cat_post_one]" value="<?php 
        echo absint($settings['left_no_of_cat_post_one']);
        ?>
" />
                                        
               					</div>	
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Middle Ads', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[left_sidebar_middle_ads]"><?php 
        echo $settings['left_sidebar_middle_ads'];
        ?>
</textarea>
                                        <br/>
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X222px', 'profitmag');
        ?>
</em>		
              					</div>
                                
                                <div class="form-row">
						          <label class="block"><?php 
        _e('Photo Gallery', 'profitmag');
        ?>
</label>                                                                                                                                        
                                  <div class="left-image-fields clearfix">
                                    <?php 
        $total_img = 0;
        if (!empty($settings['left_side_gallery'])) {
            $total_img = count($settings['left_side_gallery']);
            $img_counter = 0;
            foreach ($settings['left_side_gallery'] as $gallery_image) {
                $attachment_id = profitmag_get_image_id($gallery_image);
                $img_url = wp_get_attachment_image_src($attachment_id, 'thumbnail');
                ?>
                                                <div class="gal-img-block">
                                                    
                                                    <div class="gal-img"><img src="<?php 
                echo $img_url[0];
                ?>
" /><span class="fig-remove">Remove</span></div>
                                                    <input type="hidden" name="profitmag_options[left_side_gallery][<?php 
                echo $img_counter;
                ?>
]" class="hidden-left-gallery" value="<?php 
                echo $gallery_image;
                ?>
" />
                                                </div>
                                    <?php 
                $img_counter++;
            }
        }
        ?>
                                    
                                  </div> 
                                  <input type="hidden" id="left_gallery_img_count" value="<?php 
        echo $total_img;
        ?>
" />                                                                       
                                  <a href="javascript:void(0)" class="left-add-gallery-image" class="button-primary"><?php 
        _e('Add Image', 'profitmag');
        ?>
</a>
	                           </div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Category Sidebar Two', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_beside" name="profitmag_options[left_cat_post_two]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['left_cat_post_two']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[left_no_of_cat_post_two]" value="<?php 
        echo absint($settings['left_no_of_cat_post_two']);
        ?>
" />
                                        
               					</div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Bottom Ads One', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[left_sidebar_bottom_ads_one]"><?php 
        echo $settings['left_sidebar_bottom_ads_one'];
        ?>
</textarea>
                                        <br/>
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X592px', 'profitmag');
        ?>
</em>		
              					</div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Bottom Ads Two', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[left_sidebar_bottom_ads_two]"><?php 
        echo $settings['left_sidebar_bottom_ads_two'];
        ?>
</textarea>
                                        <br/>
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X592px', 'profitmag');
        ?>
</em>		
              					</div>
          					</div><!-- .option-left-sidebar -->
                            
                            <div class="option-right-sidebar">
                                
                                <h4 class="f15"><strong><?php 
        _e('Right Sidebar Settings', 'profitmag');
        ?>
</strong></h4>
                                <div class="form-row inline-label">
                                        <label class="block"><?php 
        _e('Category Posts One', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_beside" name="profitmag_options[right_cat_post_one]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['right_cat_post_one']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[right_no_of_cat_post_one]" value="<?php 
        echo absint($settings['right_no_of_cat_post_one']);
        ?>
" />
                                        
               					</div>	
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Middle Ads', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[right_sidebar_middle_ads]"><?php 
        echo $settings['right_sidebar_middle_ads'];
        ?>
</textarea>
                                        <br/>
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X222px ', 'profitmag');
        ?>
</em>		
              					</div>
                                
                                <div class="form-row">
						          <label class="block"><?php 
        _e('Photo Gallery', 'profitmag');
        ?>
</label>                                                                                                                                        
                                  <div class="right-image-fields clearfix">
                                    <?php 
        $total_img = 0;
        if (!empty($settings['right_side_gallery'])) {
            $total_img = count($settings['right_side_gallery']);
            $img_counter = 0;
            foreach ($settings['right_side_gallery'] as $gallery_image) {
                $attachment_id = profitmag_get_image_id($gallery_image);
                $img_url = wp_get_attachment_image_src($attachment_id, 'thumbnail');
                ?>
                                                <div class="gal-img-block">
                                                    
                                                    <div class="gal-img"><img src="<?php 
                echo $img_url[0];
                ?>
" /><span class="fig-remove"><?php 
                _e('Remove', 'profitmag');
                ?>
</span></div>
                                                    <input type="hidden" name="profitmag_options[right_side_gallery][<?php 
                echo $img_counter;
                ?>
]" class="hidden-right-gallery" value="<?php 
                echo $gallery_image;
                ?>
" />
                                                </div>
                                    <?php 
                $img_counter++;
            }
        }
        ?>
                                    
                                  </div> 
                                  <input type="hidden" id="right_gallery_img_count" value="<?php 
        echo $total_img;
        ?>
" />                                                                       
                                  <a href="javascript:void(0)" class="right-add-gallery-image" class="button-primary"><?php 
        _e('Add Image', 'profitmag');
        ?>
</a>
	                           </div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Category Posts Two', 'profitmag');
        ?>
</label>
                    					<select id="featured_block_beside" name="profitmag_options[right_cat_post_two]">
                    					<?php 
        foreach ($profitmag_cat_arr as $single_cat) {
            $label = $single_cat['label'];
            echo '<option  value="' . $single_cat['value'] . '" ' . selected($single_cat['value'], $settings['right_cat_post_two']) . '>' . $label . '</option>';
        }
        ?>
                    					</select>
                    					<br />
                                        <br />
                                        
                                        <label class="block"><?php 
        _e('No of post to display', 'profitmag');
        ?>
</label>
                                        <input class="mini" type="text" name="profitmag_options[right_no_of_cat_post_two]" value="<?php 
        echo absint($settings['right_no_of_cat_post_two']);
        ?>
" />
                                        
               					</div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Bottom Ads One', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[right_sidebar_bottom_ads_one]"><?php 
        echo $settings['right_sidebar_bottom_ads_one'];
        ?>
</textarea>
                                        <br/>
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X592px', 'profitmag');
        ?>
</em>		
              					</div>
                                
                                <div class="form-row inline-label">
                    					<label class="block"><?php 
        _e('Bottom Ads Two', 'profitmag');
        ?>
</label>
                    					<textarea cols="60" rows="3" name="profitmag_options[right_sidebar_bottom_ads_two]"><?php 
        echo $settings['right_sidebar_bottom_ads_two'];
        ?>
</textarea>
                                        <br />
                                        <em class="f13"><?php 
        _e('Please insert the image of size 302X592px', 'profitmag');
        ?>
</em>		
              					</div>
          					</div><!-- .option-left-sidebar -->
            
            					
            			</div>
                        
                        
                        <!-- Advertising -->
                        <div id="options-group-5" class="group" style="display: none;">
            			     <h3><?php 
        _e('Advertising', 'profitmag');
        ?>
</h3>
                            <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Header Ads', 'profitmag');
        ?>
</label>
                					<textarea cols="60" rows="3" name="profitmag_options[header_ads]"><?php 
        echo $settings['header_ads'];
        ?>
</textarea><br />
                                    <em class="f13"><?php 
        _e('Please insert the image of size 790X90px', 'profitmag');
        ?>
</em>		
          					</div>
                            <div class="form-row inline-label">
                					<label class="block"><?php 
        _e('Home Page Ads ( Mid Section )', 'profitmag');
        ?>
</label>
                					<textarea cols="60" rows="5" name="profitmag_options[mid_section_ads]"><?php 
        echo $settings['mid_section_ads'];
        ?>
</textarea><br />
                                    <em class="f13"><?php 
        _e('Please insert the image of size 855X91px', 'profitmag');
        ?>
</em>		
          					</div>
            
            					
                        </div>
                        <!-- End Advertising -->
                        
                        
                        <!-- Social Links Settings -->
                        <div id="options-group-6" class="group" style="display: none;">
            			<h3><?php 
        _e('Social links - Put your social url', 'profitmag');
        ?>
</h3>
            					<div class="form-row">
            					<em class="f13"><?php 
        _e('Put your social url below.. Leave blank if you don\'t want to show it.', 'profitmag');
        ?>
</em>
            					</div>
            
            					<div class="form-row">
            					<label class="block"><?php 
        _e('Disable Social icons in header?', 'profitmag');
        ?>
</label>
            						<div class="checkbox">
            							<label for="show_social_header">
            							<input type="checkbox" id="show_social_header" name="profitmag_options[show_social_header]" value="1" <?php 
        checked(true, $settings['show_social_header']);
        ?>
 />
            							<?php 
        _e('Check to disable', 'profitmag');
        ?>
            							</label>
            						</div>
            					</div>
            
            					<table class="social-urls">
            					<tr><td scope="row"><label for="facebook"><?php 
        _e('Facebook', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="facebook" name="profitmag_options[facebook]" type="text" value="<?php 
        echo $settings['facebook'];
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="twitter"><?php 
        _e('Twitter', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="twitter" name="profitmag_options[twitter]" type="text" value="<?php 
        echo esc_url($settings['twitter']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="gplus"><?php 
        _e('Google plus', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="gplus" name="profitmag_options[gplus]" type="text" value="<?php 
        echo esc_url($settings['gplus']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="youtube"><?php 
        _e('Youtube', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="youtube" name="profitmag_options[youtube]" type="text" value="<?php 
        echo esc_url($settings['youtube']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="pinterest"><?php 
        _e('Pinterest', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="pinterest" name="profitmag_options[pinterest]" type="text" value="<?php 
        echo esc_url($settings['pinterest']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="flickr"><?php 
        _e('Flickr', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="flickr" name="profitmag_options[flickr]" type="text" value="<?php 
        echo esc_url($settings['flickr']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="vimeo"><?php 
        _e('Vimeo', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="vimeo" name="profitmag_options[vimeo]" type="text" value="<?php 
        echo esc_url($settings['vimeo']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="stumbleupon"><?php 
        _e('Stumbleupon', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="stumbleupon" name="profitmag_options[stumbleupon]" type="text" value="<?php 
        echo esc_url($settings['stumbleupon']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="dribble"><?php 
        _e('Dribble', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="dribble" name="profitmag_options[dribble]" type="text" value="<?php 
        echo esc_url($settings['dribble']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="profitmag_tumblr"><?php 
        _e('Tumblr', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="tumblr" name="profitmag_options[tumblr]" type="text" value="<?php 
        echo esc_url($settings['tumblr']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="linkedin"><?php 
        _e('Linkedin', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="linkedin" name="profitmag_options[linkedin]" type="text" value="<?php 
        echo esc_url($settings['linkedin']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="sound_cloud"><?php 
        _e('Sound Cloud', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="sound_cloud" name="profitmag_options[sound_cloud]" type="text" value="<?php 
        echo esc_url($settings['sound_cloud']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="skype"><?php 
        _e('Skype', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="skype" name="profitmag_options[skype]" type="text" value="<?php 
        echo esc_attr($settings['skype']);
        ?>
" />
            					</td>
            					</tr>
            
            					<tr><td scope="row"><label for="rss"><?php 
        _e('RSS', 'profitmag');
        ?>
</label></td>
            					<td>
            					<input id="rss" name="profitmag_options[rss]" type="text" value="<?php 
        echo esc_url($settings['rss']);
        ?>
" />
            					</td>
            					</tr>
            				</table>
            			</div> <!-- End of social links setting -->
                        
                        
                        <!-- Tools -->
            			<div id="options-group-7" class="group" style="display: none;">
                			<h3><?php 
        _e('Tools', 'profitmag');
        ?>
</h3>
                			<div class="form-row">
                				<label class="block"><?php 
        _e('Custom CSS', 'profitmag');
        ?>
</label>
                				<textarea id="custom_css" name="profitmag_options[custom_css]" rows="6" cols="60"><?php 
        echo $settings['custom_css'];
        ?>
</textarea>
                				<p class="f13"><em><?php 
        _e('Enter the custom css here', 'profitmag');
        ?>
</em></p>
                			</div>
                
                			<div class="form-row">
                				<label class="block"><?php 
        _e('Analytics Code', 'profitmag');
        ?>
</label>
                				<textarea id="custom_code" name="profitmag_options[custom_code]" rows="6" cols="60"><?php 
        echo $settings['custom_code'];
        ?>
</textarea>
                				<p class="f13"><em><?php 
        _e('Enter the code from Facebook, Google or any other media here.', 'profitmag');
        ?>
</em></p>
                			</div>                		
            			</div>
                        
                        <!-- About Magazine Theme -->
            			<div id="options-group-8" class="group" style="display: none;">
                			<h3><?php 
        _e('Know more about ProfitMag Themes', 'profitmag');
        ?>
</h3>
                				<div class="form-row">
                		      		<p><?php 
        echo sprintf(__('ProfitMag Theme developed by <a href="%s" target="_blank">Keysthemes</a>', 'profitmag'), esc_url('http://www.keysthemes.com/'));
        ?>
</p>
                				</div>		
                                <div class="form-row">
                                    <p><?php 
        _e('For Live Preview of the Theme', 'profitmag');
        ?>
</p>
                                    <p><a target="_blank" class="button" href="<?php 
        echo esc_url('http://keysthemes.com/theme-demo/?theme=profitmag-pro/');
        ?>
"><?php 
        _e('Live Demo', 'profitmag');
        ?>
</a></p>
                                </div>	
                                <div class="form-row">
                                    <p><?php 
        _e('For Support / Premium Customization', 'profitmag');
        ?>
</p>
                                    <p><a target="_blank" href="mailto:payments@keysthemes.com">payments@keysthemes.com</a></p>
                                </div>


            			</div>
     
			            <div id="optionsframework-submit">
            			     <input type="submit" class="button-primary" value="<?php 
        esc_attr_e('Save Options', 'profitmag');
        ?>
" />
            			</div>
                        
                        
                        
                    </form>
                </div> <!-- #optionsframework -->
            </div> <!-- #optionsframework-metabox -->
            
        </div> <!-- .wrapper-bg -->
     </div> <!-- .wrap -->
     
    <?php 
    }