Esempio n. 1
0
function kwayyhs_page()
{
    // storing plugin options as array
    if (isset($_POST['kwayyhs-update'])) {
        update_option('kwayyhs_sortorder', $_POST['kwayyhs-sortorder']);
        update_option('kwayyhs_exclude', $_POST['kwayyhs-exclude']);
        $post_types2 = kwayyhs_post_types();
        foreach ($post_types2 as $post_type) {
            if (isset($_POST['kwayyhs_active_' . $post_type->name])) {
                update_option('kwayyhs_active_' . $post_type->name, 'active');
            } else {
                update_option('kwayyhs_active_' . $post_type->name, 'deactive');
            }
            // Change default name
            update_option('kwayyhs_newname_' . $post_type->name, $_POST['kwayyhs_newname_' . $post_type->name]);
            // kwayyhs_newname_
            /*if( $_POST['kwayyhs_active_'.$post_type->label->name] != ''   ){
            			
            		}*/
        }
    }
    // Retrive all options
    $kwayyhs_sortorder = get_option('kwayyhs_sortorder');
    $kwayyhs_exclude = get_option('kwayyhs_exclude');
    ?>
	
	
	<div class="wrap">
		<div id="icon-options-general" class="icon32"><br></div> <h2>Kwayy HTML Sitemap Options</h2>
		<br />
	
		<form method="post" action="">
			<input type="hidden" name="kwayyhs-update" id="kwayyhs-update" value="y" />
		
			<?php 
    settings_fields('kwayyhs');
    kwayyhs_set_default_option();
    ?>
    
			
			<div id="poststuff">
				<div id="post-body" class="metabox-holder columns-2" style="min-width:650px;">
					<div id="post-body-content">
						<div id="kwayyhs-option-wrapper">
							<div id="kwayyhs-option-title">
								<div class="kwayyhs-title kwayyhs-title1">Drag to Sort</div>
								<div class="kwayyhs-title kwayyhs-title2">Show</div>
								<div class="kwayyhs-title kwayyhs-title3">Custom Post Name</div>
								<div class="kwayyhs-title kwayyhs-title4">Custom Post SLUG</div>
							</div><!-- #kwayyhs-option-title -->
				
							<ul id="kwayyhs-sortable">
								<?php 
    $allposttype = array();
    $post_types = kwayyhs_post_types();
    $post_list_array = kwayyhs_post_list();
    //var_dump($post_list_array);
    echo kwayyhs_sortableList($post_list_array);
    // creating sort order adding new post tye and removing removed post type
    $kwayyhs_sortorder = implode(',', array_keys($post_list_array));
    ?>
							</ul><!-- #sortable -->
					
					
					
					
						</div><!-- #kwayyhs-option-wrapper -->
					
						
						<br />
					
					
						<div class="postbox" style="width:650px;" >
							<h3 class='hndle'>Exclude Post</h3>
							<div class="inside">
								<div class="submitbox">
									Exclude post:
									<input type="text" name="kwayyhs-exclude" id="kwayyhs-exclude" style="width:400px;" value="<?php 
    echo $kwayyhs_exclude;
    ?>
" />
									<p class="description">Please insert comma separated page IDs which you want to hide on Sitemap page. <br> Example: <code>8,56,98,106</code></p>
									<div class="clear"></div>
								</div><!-- .submitbox -->
							</div><!-- .inside -->
						</div><!-- #postbox-container-1 .postbox-container -->
					
					
					
					

					
					
					
						
				
						<input type="hidden" name="kwayyhs-sortorder" id="kwayyhs-sortorder" value="<?php 
    echo $kwayyhs_sortorder;
    ?>
" />
						<p class="submit"><input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" /></p>
				
					</div><!-- #post-body-content -->
			
			
			
					<div id="postbox-container-1" class="postbox-container">
						<div class="postbox">
							<h3 class='hndle'>Quick Guide</h3>
							<div class="inside">
								<div class="submitbox">
									Steps:
									<ol>
										<li>Select Custom Post Type from left, which you want to show on Sitemap Page. Than click "Save Changes" button.</li>
										<li>Create a new page (for sitemap) and insert <code>[kwayy-sitemap]</code> in content area.</li>
										<li>Done, yeah that's easy.</li>
									</ol>
									<hr>
									<div style="padding:10px; text-align:center;">
									<a href="http://forum.kwayyinfotech.com/categories/kwayy-html-sitemap" target="_blank" class="button-primary" >Get Help</a> &nbsp; &nbsp; &nbsp; <a href="http://forum.kwayyinfotech.com/categories/kwayy-html-sitemap" target="_blank" class="button">Report Bug</a>
									</div>
									<div class="clear"></div>
								
								</div><!-- .submitbox -->
							</div><!-- .inside -->
						</div><!-- .postbox -->
						
						
						<div class="postbox">
							<h3 class='hndle'>Support Us</h3>
							<div class="inside">
								<div style="text-align:center;">
								<h2>Buy our theme</h2>
								<div id="creativemarket-product3691"></div>
								<script>
								var __creativemarket__ = {width: 195,height: 163,productID: 3691};
								</script>
								<script type="text/javascript" src="https://s3.amazonaws.com/static.creativemarket.com/js/embed/1/product.js"></script>
								<p>We just released a new theme called "Colorised - Pro Wordpress Theme". You can purchase the theme from above link.</p>
								</div>
								
								<ul style="list-style:disc; padding-left:40px;">
									<li>Fully Responsive</li>
									<li>HTML5 &nbsp; CSS3 &nbsp; jQuery</li>
									<li>Parallax Slider</li>
									<li>240+ Icons</li>
									<li>SEO Optimized</li>
									<li>and Many More...</li>
								</ul>
								<div style="text-align:center;">
									<div id="buyoncm3691"></div>
									<script>
									var __creativemarket__ = {url: 'https://creativemarket.com/kwayy/3691-Colorised-Pro-Wordpress-Theme&utm_source=cmembed&utm_medium=button&utm_campaign=3691',text: 'Buy on Creative Market',productID: 3691};
									</script>
									<script type="text/javascript" src="https://s3.amazonaws.com/static.creativemarket.com/js/embed/1/button.js"></script>
								</div>
							</div><!-- .inside -->
						</div><!-- .postbox -->
						
						
					</div><!-- .postbox-container #postbox-container-1 -->
					
					
					
					<div class="clear"></div>
				</div><!-- #post-body -->
				<div class="clear"></div>
			
			</div><!-- #poststuff -->
			
			
			
			
		</form>
		
	</div><!-- .wrap -->
	
	<?php 
}
Esempio n. 2
0
function kwayyhs_page()
{
    // storing plugin options as array
    if (isset($_POST['kwayyhs-update'])) {
        update_option('kwayyhs_sortorder', $_POST['kwayyhs-sortorder']);
        update_option('kwayyhs_exclude', $_POST['kwayyhs-exclude']);
        $post_types2 = kwayyhs_post_types();
        foreach ($post_types2 as $post_type) {
            if (isset($_POST['kwayyhs_active_' . $post_type->name])) {
                update_option('kwayyhs_active_' . $post_type->name, 'active');
            } else {
                update_option('kwayyhs_active_' . $post_type->name, 'deactive');
            }
        }
    }
    // Retrive all options
    $kwayyhs_sortorder = get_option('kwayyhs_sortorder');
    $kwayyhs_exclude = get_option('kwayyhs_exclude');
    ?>
	
	
	<div class="wrap">
		<div id="icon-options-general" class="icon32"><br></div> <h2>Kwayy HTML Sitemap Options</h2>
		<br />
	
		<form method="post" action="">
			<input type="hidden" name="kwayyhs-update" id="kwayyhs-update" value="y" />
		
			<?php 
    settings_fields('kwayyhs');
    kwayyhs_set_default_option();
    ?>
    
			
			<div id="poststuff">
				<div id="post-body" class="metabox-holder columns-2" style="min-width:650px;">
					<div id="post-body-content">
						<div id="kwayyhs-option-wrapper">
							<div id="kwayyhs-option-title">
								<div class="kwayyhs-title kwayyhs-title1">Drag to Sort</div>
								<div class="kwayyhs-title kwayyhs-title2">Show</div>
								<div class="kwayyhs-title kwayyhs-title3">Custom Post Name</div>
								<div class="kwayyhs-title kwayyhs-title4">Custom Post SLUG</div>
							</div><!-- #kwayyhs-option-title -->
				
							<ul id="kwayyhs-sortable">
								<?php 
    $allposttype = array();
    $post_types = kwayyhs_post_types();
    $post_list_array = kwayyhs_post_list();
    echo kwayyhs_sortableList($post_list_array);
    // creating sort order adding new post tye and removing removed post type
    $kwayyhs_sortorder = implode(',', array_keys($post_list_array));
    ?>
							</ul><!-- #sortable -->
					
					
					
					
						</div><!-- #kwayyhs-option-wrapper -->
					
						
						<br />
					
					
						<div class="postbox" style="width:650px;" >
							<h3 class='hndle'>Exclude Post</h3>
							<div class="inside">
								<div class="submitbox">
									Exclude post:
									<input type="text" name="kwayyhs-exclude" id="kwayyhs-exclude" style="width:400px;" value="<?php 
    echo $kwayyhs_exclude;
    ?>
" />
									<p class="description">Please insert comma separated page IDs which you want to hide on Sitemap page. <br> Example: <code>8,56,98,106</code></p>
									<div class="clear"></div>
								</div><!-- .submitbox -->
							</div><!-- .inside -->
						</div><!-- #postbox-container-1 .postbox-container -->
					
					
					
					
					
					
					
					
					
						
				
						<input type="hidden" name="kwayyhs-sortorder" id="kwayyhs-sortorder" value="<?php 
    echo $kwayyhs_sortorder;
    ?>
" />
						<p class="submit"><input type="submit" class="button-primary" value="<?php 
    _e('Save Changes');
    ?>
" /></p>
				
					</div><!-- #post-body-content -->
			
			
			
					<div id="postbox-container-1" class="postbox-container">
						<div class="postbox">
							<h3 class='hndle'>Quick Guide</h3>
							<div class="inside">
								<div class="submitbox">
									Steps:
									<ol>
										<li>Select Custom Post Type from left, which you want to show on Sitemap Page. Than click "Save Changes" button.</li>
										<li>Create a new page (for sitemap) and insert <code>[kwayy-sitemap]</code> in content area.</li>
										<li>Done, yeah that's easy.</li>
									</ol>
									<hr>
									<div style="padding:10px; text-align:center;">
									<a href="http://forum.kwayyinfotech.com/categories/kwayy-html-sitemap" target="_blank" class="button-primary" >Get Help</a> &nbsp; &nbsp; &nbsp; <a href="http://forum.kwayyinfotech.com/categories/kwayy-html-sitemap" target="_blank" class="button">Report Bug</a>
									</div>
									<div class="clear"></div>
								
								</div><!-- .submitbox -->
							</div><!-- .inside -->
						</div><!-- .postbox -->
					</div><!-- .postbox-container #postbox-container-1 -->
					
					
					
					<div class="clear"></div>
				</div><!-- #post-body -->
				<div class="clear"></div>
			
			</div><!-- #poststuff -->
			
			
			
			
		</form>
		
	</div><!-- .wrap -->
	
	<?php 
}