當前位置: 首頁>>代碼示例>>PHP>>正文


PHP of_get_header_classes_array函數代碼示例

本文整理匯總了PHP中of_get_header_classes_array函數的典型用法代碼示例。如果您正苦於以下問題:PHP of_get_header_classes_array函數的具體用法?PHP of_get_header_classes_array怎麽用?PHP of_get_header_classes_array使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了of_get_header_classes_array函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: json_encode

<div class="wrap" id="of_container">

	<div id="of-popup-save" class="of-save-popup">
		<div class="of-save-save">Options Updated</div>
	</div>
	
	<div id="of-popup-reset" class="of-save-popup">
		<div class="of-save-reset">Options Reset</div>
	</div>
	
	<div id="of-popup-fail" class="of-save-popup">
		<div class="of-save-fail">Error!</div>
	</div>
	
	<span style="display: none;" id="hooks"><?php 
echo json_encode(of_get_header_classes_array());
?>
</span>
	<input type="hidden" id="reset" value="<?php 
if (isset($_REQUEST['reset'])) {
    echo $_REQUEST['reset'];
}
?>
" />
	<input type="hidden" id="security" name="security" value="<?php 
echo wp_create_nonce('of_ajax_nonce');
?>
" />

	<form id="of_form" method="post" action="<?php 
echo esc_attr($_SERVER['REQUEST_URI']);
開發者ID:annegrundhoefer,項目名稱:courtney,代碼行數:31,代碼來源:options.php

示例2: json_encode

<div class="wrap" id="of_container">

    <div id="of-popup-save" class="of-save-popup">
        <div class="of-save-save">Options Updated</div>
    </div>
    
    <div id="of-popup-reset" class="of-save-popup">
        <div class="of-save-reset">Options Reset</div>
    </div>
    
    <div id="of-popup-fail" class="of-save-popup">
        <div class="of-save-fail">Error!</div>
    </div>
    
    <span style="display: none;" id="hooks"><?php echo json_encode(of_get_header_classes_array()); ?></span>
    <input type="hidden" id="reset" value="<?php if(isset($_REQUEST['reset'])) echo $_REQUEST['reset']; ?>" />
    <input type="hidden" id="security" name="security" value="<?php echo wp_create_nonce('of_ajax_nonce'); ?>" />

    <form id="of_form" method="post" action="<?php echo esc_attr( $_SERVER['REQUEST_URI'] ) ?>" enctype="multipart/form-data" >
    
        <div id="header">
        
            <div class="logo">
                <h2><?php echo THEMENAME; ?></h2>
                <span><?php echo ('v'. THEMEVERSION); ?></span>
            </div>
        
            <div id="js-warning">Warning- This options panel will not work properly without javascript!</div>
            <div class="icon-option"></div>
            <div class="clear"></div>
        
開發者ID:hugocuqui,項目名稱:paulaferracini,代碼行數:30,代碼來源:options.php

示例3: of_admin_head

function of_admin_head()
{
    global $data;
    ?>
		
	<script type="text/javascript" language="javascript">

	jQuery.noConflict();
	jQuery(document).ready(function($){
	
	//hide hidden section on page load.
	jQuery('#section-body_bg, #section-body_bg_custom, #section-body_bg_properties').hide();
	
	//delays until AjaxUpload is finished loading
	//fixes bug in Safari and Mac Chrome
	if (typeof AjaxUpload != 'function') { 
			return ++counter < 6 && window.setTimeout(init, counter * 500);
	}
	//hides warning if js is enabled			
	$('#js-warning').hide();
	
	//Tabify Options			
	$('.group').hide();
	
	// Display last current tab	
	if ($.cookie("of_current_opt") === null) {
		$('.group:first').fadeIn();	
		$('#of-nav li:first').addClass('current');
	} else {
	
		var hooks = <?php 
    $hooks = of_get_header_classes_array();
    echo json_encode($hooks);
    ?>
;
		
		$.each(hooks, function(key, value) { 
		
			if ($.cookie("of_current_opt") == '#of-option-'+ value) {
				$('.group#of-option-' + value).fadeIn();
				$('#of-nav li.' + value).addClass('current');
			}
			
		});
	
	}
				
	//Current Menu Class
	$('#of-nav li a').click(function(evt){
	// event.preventDefault();
				
		$('#of-nav li').removeClass('current');
		$(this).parent().addClass('current');
							
		var clicked_group = $(this).attr('href');
		
		$.cookie('of_current_opt', clicked_group, { expires: 7, path: '/' });
			
		$('.group').hide();
							
		$(clicked_group).fadeIn();
		return false;
						
	});

	//Expand Options 
	var flip = 0;
				
	$('#expand_options').click(function(){
		if(flip == 0){
			flip = 1;
			$('#of_container #of-nav').hide();
			$('#of_container #content').width(755);
			$('#of_container .group').add('#of_container .group h2').show();
	
			$(this).removeClass('expand');
			$(this).addClass('close');
			$(this).text('Close');
					
		} else {
			flip = 0;
			$('#of_container #of-nav').show();
			$('#of_container #content').width(595);
			$('#of_container .group').add('#of_container .group h2').hide();
			$('#of_container .group:first').show();
			$('#of_container #of-nav li').removeClass('current');
			$('#of_container #of-nav li:first').addClass('current');
					
			$(this).removeClass('close');
			$(this).addClass('expand');
			$(this).text('Expand');
				
		}
			
	});



	// Reset Message Popup
	var reset = "<?php 
//.........這裏部分代碼省略.........
開發者ID:najashark,項目名稱:Touchfolio,代碼行數:101,代碼來源:admin-interface.php

示例4: json_encode

<?php

$hooks = $menu = $inputs = "";
if (isset($options_machine)) {
    $hooks = json_encode(of_get_header_classes_array());
    $menu = $options_machine->Menu;
    $inputs = $options_machine->Inputs;
    $nonce = "of_ajax_nonce";
    $class = "theme_options";
} elseif (isset($seo_machine)) {
    $hooks = json_encode(seo_of_get_header_classes_array());
    $menu = $seo_machine->Menu;
    $inputs = $seo_machine->Inputs;
    $nonce = "seo_of_ajax_nonce";
    $class = "seo_options";
} elseif (isset($comp_machine)) {
    $hooks = json_encode(comp_of_get_header_classes_array());
    $menu = $comp_machine->Menu;
    $inputs = $comp_machine->Inputs;
    $nonce = "comp_of_ajax_nonce";
    $class = "comp_options";
}
?>
<div class="wrap <?php 
echo $class;
?>
" id="of_container">

	<div id="of-popup-save" class="of-save-popup">
		<div class="of-save-save">Options Updated</div>
	</div>
開發者ID:earthshakira,項目名稱:rachanasansad-portfolio,代碼行數:31,代碼來源:options.php

示例5: json_encode

<?php

$output_html = '
<div class="wrap" id="of_container">
	<div id="of-popup-save" class="of-save-popup">
		<div class="of-save-save">Options Updated</div>
	</div>
	<div id="of-popup-reset" class="of-save-popup">
		<div class="of-save-reset">Options Reset</div>
	</div>
	<div id="of-popup-fail" class="of-save-popup">
		<div class="of-save-fail">Error!</div>
	</div>
	';
$output_html .= '<span style="display: none;" id="hooks">' . json_encode(of_get_header_classes_array()) . '</span>';
$v_t = "";
if (isset($_REQUEST['reset'])) {
    $v_t = $_REQUEST['reset'];
}
$output_html .= '<input type="hidden" id="reset" value="' . $v_t . '" />
	<input type="hidden" id="security" name="security" value="' . wp_create_nonce('of_ajax_nonce') . '" />';
$output_html .= '<form id="of_form" method="post" action="' . esc_attr($_SERVER['REQUEST_URI']) . '" enctype="multipart/form-data" >
	
		<div id="header">
		
			<div class="logo">
                            <img alt="' . THEMENAME . '" src="' . get_template_directory_uri() . '/images/logo.png">                            
			</div>
		
			<div id="js-warning">Warning- This options panel will not work properly without javascript!</div>
			<div class="icon-option"></div>
開發者ID:gurpreet-grazitti,項目名稱:Demisto,代碼行數:31,代碼來源:options.php


注:本文中的of_get_header_classes_array函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。