当前位置: 首页>>代码示例>>PHP>>正文


PHP get_alloptions函数代码示例

本文整理汇总了PHP中get_alloptions函数的典型用法代码示例。如果您正苦于以下问题:PHP get_alloptions函数的具体用法?PHP get_alloptions怎么用?PHP get_alloptions使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_alloptions函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: theme_admin_print_scripts

function theme_admin_print_scripts()
{
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-bqq');
    wp_enqueue_script('jquery-ui-core');
    wp_enqueue_script('jquery-ui-tabs');
    wp_enqueue_script('theme-admin');
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_enqueue_style('thickbox');
    wp_enqueue_style("google-font-open-sans", "http://fonts.googleapis.com/css?family=Open+Sans:400,600");
    $sidebars = array("default" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "template-blog.php" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "single.php" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "single-features.php" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "search.php" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "template-default-without-breadcrumbs.php" => array(array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "template-home.php" => array(array("name" => "top", "label" => __("top", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))), "404.php" => array(array("name" => "header", "label" => __("header", 'medicenter')), array("name" => "footer_top", "label" => __("footer top", 'medicenter')), array("name" => "footer_bottom", "label" => __("footer bottom", 'medicenter'))));
    //get theme sidebars
    $theme_sidebars = array();
    $theme_sidebars_array = get_posts(array('post_type' => 'medicenter_sidebars', 'posts_per_page' => '-1', 'post_status' => 'publish', 'orderby' => 'menu_order', 'order' => 'ASC'));
    for ($i = 0; $i < count($theme_sidebars_array); $i++) {
        $theme_sidebars[$i]["id"] = $theme_sidebars_array[$i]->ID;
        $theme_sidebars[$i]["title"] = $theme_sidebars_array[$i]->post_title;
    }
    //get theme sliders
    $sliderAllShortcodeIds = array();
    $allOptions = get_alloptions();
    foreach ($allOptions as $key => $value) {
        if (substr($key, 0, 26) == "medicenter_slider_settings") {
            $sliderAllShortcodeIds[] = $key;
        }
    }
    //sort slider ids
    sort($sliderAllShortcodeIds);
    $data = array('img_url' => get_template_directory_uri() . "/images/", 'admin_img_url' => get_template_directory_uri() . "/admin/images/", 'sidebar_label' => __('Sidebar', 'medicenter'), 'slider_label' => __('Main Slider', 'medicenter'), 'sidebars' => $sidebars, 'theme_sidebars' => $theme_sidebars, 'page_sidebars' => get_post_meta(get_the_ID(), "medicenter_page_sidebars", true), 'theme_sliders' => $sliderAllShortcodeIds, 'main_slider' => get_post_meta(get_the_ID(), "main_slider", true));
    //pass data to javascript
    $params = array('l10n_print_after' => 'config = ' . json_encode($data) . ';');
    wp_localize_script("theme-admin", "config", $params);
}
开发者ID:unisexx,项目名称:drtooth,代码行数:34,代码来源:functions.php

示例2: get_tables

 function get_tables($tables = array())
 {
     $options = get_alloptions();
     foreach ($options as $key => $val) {
         if (substr($key, 0, strlen(self::$prefix)) == self::$prefix) {
             $tables[] = $key;
         }
     }
     return $tables;
 }
开发者ID:roncodes,项目名称:plugin-igniter,代码行数:10,代码来源:Model.php

示例3: update_option

 function update_option($option_name, $newvalue, $force = false)
 {
     $optionHandler =& wp_handler('Option');
     $optionObject =& $optionHandler->getByName($option_name);
     if ($optionObject->getVar('option_value', 'n') != $newvalue) {
         $optionObject->setVar('option_value', $newvalue);
         if (!$optionHandler->insert($optionObject, $force, true)) {
             return false;
         }
         $GLOBALS['cache_settings'][wp_id()] = get_alloptions();
         // Re cache settings
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:14,代码来源:functions.php

示例4: delete_option

function delete_option($name)
{
    $options = get_alloptions();
    unset($options[$name]);
    return config_save($options);
}
开发者ID:mroussel,项目名称:flatpress,代码行数:6,代码来源:core.wp-options.php

示例5: dspp_admin_page

    function dspp_admin_page()
    {
        $error = "";
        if ($_POST["action"] == "save") {
            if ($_POST["shortcodeId"] != "") {
                for ($i = 0; $i < count($_POST["step_title"]); $i++) {
                    if ($_POST["step_title"][$i] == "") {
                        $_POST["step_title"][$i] = "&nbsp;";
                    }
                    if ($_POST["step_content"][$i] == "") {
                        $_POST["step_content"][$i] = "&nbsp;";
                    }
                }
                $dspp_options = array("kind" => $_POST["kind"], "style" => $_POST["style"], "firstselected" => $_POST["firstSelected"], "icons" => $_POST["icons"], "imgfolder" => $_POST["imgFolder"], "chooseagain" => $_POST["chooseAgain"], "nextprevbuttons" => $_POST["nextPrevButtons"], "nextprevbuttonsposition" => $_POST["nextPrevButtonsPosition"], "nextbuttontitle" => $_POST["nextButtonTitle"], "prevbuttontitle" => $_POST["prevButtonTitle"], "fadespeed" => $_POST["fadeSpeed"], "event" => $_POST["event"], "packed" => $_POST["packed"], "jquery" => $_POST["jQuery"], "aspopup" => $_POST["asPopup"], "beforeload" => $_POST["beforeLoad"], "onload" => $_POST["onLoad"], "onopen" => $_POST["onOpen"], "afteropen" => $_POST["afterOpen"], "onhoverin" => $_POST["onHoverIn"], "onhoverout" => $_POST["onHoverOut"], "onopenpopup" => $_POST["onOpenPopup"], "onclosepopup" => $_POST["onClosePopup"], "paneltag" => $_POST["panel_tag"], "panelid" => $_POST["panel_id"], "panelclass" => $_POST["panel_class"], "panelstyle" => $_POST["panel_style"], "panelaction" => $_POST["panel_action"], "panelmethod" => $_POST["panel_method"], "stepscount" => $_POST["stepsCount"], "title" => $_POST["step_title"], "tag" => $_POST["step_tag"], "href" => $_POST["step_href"], "class" => $_POST["step_class"], "label" => $_POST["step_label"], "content" => $_POST["step_content"], "contentfromfile" => $_POST["step_content_from_file"], "contenttag" => $_POST["step_content_tag"], "contentid" => $_POST["step_content_id"], "contentclass" => $_POST["step_content_class"]);
                //add if not exist or update if exist
                $updated = true;
                if (!get_option('dspp_shortcode_settings_' . $_POST["shortcodeId"])) {
                    $updated = false;
                }
                update_option('dspp_shortcode_settings_' . $_POST["shortcodeId"], $dspp_options);
                $message .= "Settings saved!" . ($updated ? " (overwritten)" : "");
                $message .= "<br />Use <pre>[dspp id='" . $_POST["shortcodeId"] . "']</pre> shortcode to put process panel on your page.";
            } else {
                $error .= "Please fill 'Shortcode id' field!";
            }
        }
        $allOptions = get_alloptions();
        $dsppAllShortcodeIds = array();
        foreach ($allOptions as $key => $value) {
            if (substr($key, 0, 23) == "dspp_shortcode_settings") {
                $dsppAllShortcodeIds[] = $key;
            }
        }
        //sort shortcode ids
        sort($dsppAllShortcodeIds);
        ?>
		<div class="wrap">
			<div class="icon32" id="icon-options-general"><br></div>
			<h2>Dynamic Step Process Panels settings</h2>
		</div>
		<?php 
        if ($error != "" || $message != "") {
            ?>
		<div class="<?php 
            echo $message != "" ? "updated" : "error";
            ?>
 settings-error"> 
			<p>
				<strong style="line-height: 150%;">
					<?php 
            echo $message != "" ? $message : $error;
            ?>
				</strong>
			</p>
		</div>
		<?php 
        }
        ?>
		<form action="<?php 
        echo $_SERVER['REQUEST_URI'];
        ?>
" method="post" id="dspp_settings">
			<table class="form-table">
				<tbody>
					<?php 
        if (count($dsppAllShortcodeIds)) {
            ?>
					<tr valign="top">
						<th scope="row">
							<label for="editShortcodeId">Choose shortcode id</label>
						</th>
						<td>
							<select name="editShortcodeId" id="editShortcodeId">
								<option value="-1">choose...</option>
								<?php 
            for ($i = 0; $i < count($dsppAllShortcodeIds); $i++) {
                echo "<option value='{$dsppAllShortcodeIds[$i]}'>" . substr($dsppAllShortcodeIds[$i], 24) . "</option>";
            }
            ?>
							</select>
							<span id="ajax_loader" style="display: none;"><img style="margin-bottom: -3px;" src="<?php 
            echo WP_PLUGIN_URL;
            ?>
/dynamic_step_process_panels/img/ajax-loader.gif" /></span>
							<span class="description">Choose the shortcode id for editing</span>
						</td>
					</tr>
					<?php 
        }
        ?>
					<tr valign="top">
						<th scope="row">
							<label for="shortcodeId">Or create new shortcode id</label>
						</th>
						<td>
							<input type="text" class="regular-text" value="" id="shortcodeId" name="shortcodeId">
							<span class="description">Unique identifier for dspp shortcode. Don't use special characters.</span>
						</td>
					</tr>
					<tr valign="top">
//.........这里部分代码省略.........
开发者ID:keymanky,项目名称:sites,代码行数:101,代码来源:dynamic_step_process_panels.php

示例6: get_settings

function get_settings($setting)
{
    global $wpdb, $cache_settings, $use_cache, $REQUEST_URI;
    if (strstr($REQUEST_URI, 'install.php')) {
        return false;
    }
    if (empty($cache_settings) or !$use_cache) {
        $settings = get_alloptions();
        $cache_settings = $settings;
    } else {
        $settings = $cache_settings;
    }
    if (!isset($settings->{$setting})) {
        return false;
    } else {
        return $settings->{$setting};
    }
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:18,代码来源:functions.php

示例7: testProcessBlogOptions

 /**
  * @dataProvider providerTestProcessBlogOptions
  */
 function testProcessBlogOptions($data, $expected_fields)
 {
     update_option('test', 'test');
     $this->pf->process_blog_options($data, array('category' => 1));
     foreach ($expected_fields as $name => $value) {
         $this->assertEquals($value, get_option($name));
         if ($value === false) {
             $all_options = get_alloptions();
             $this->assertTrue(!isset($all_options[$name]));
         }
     }
 }
开发者ID:johnbintz,项目名称:post-fixtures,代码行数:15,代码来源:PostFixturesTest.php

示例8: update_option

function update_option($option_name, $newvalue)
{
    global $wpdb, $wp_id, $cache_settings;
    // No validation at the moment
    $newvalue = stripslashes($newvalue);
    $newvalue = trim($newvalue);
    // I can't think of any situation we wouldn't want to trim
    $newvalue = $wpdb->escape($newvalue);
    $wpdb->query("UPDATE {$wpdb->options[$wp_id]} SET option_value = '{$newvalue}' WHERE option_name = '{$option_name}'");
    $cache_settings[$wp_id] = get_alloptions();
    // Re cache settings
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:12,代码来源:functions.php

示例9: kohana_deactivate

/**
 * Function is called when plugin is deactivated by wordpress
 * 
 * Deletes the wordpress page that was acting as Kohana front loader
 * and removes all kohana options.
 * @return 
 */
function kohana_deactivate()
{
    error_log('deactivating kohana plugin');
    wp_delete_post(get_option('kohana_front_loader'));
    delete_option('kohana_front_loader');
    delete_option('kohana_default_placement');
    delete_option('kohana_process_all_uri');
    delete_option('kohana_system_path');
    delete_option('kohana_modules_path');
    delete_option('kohana_application_path');
    delete_option('kohana_bootstrap_path');
    delete_option('kohana_ext');
    delete_option('kohana_front_loader_in_nav');
    delete_option('kohana_modules');
    delete_option('kohana_default_controller');
    delete_option('kohana_default_action');
    delete_option('kohana_default_id');
    delete_option('kohana_page_template');
    // remove all page routes
    $all_options = get_alloptions();
    foreach ($all_options as $op_name => $op_value) {
        if (substr($op_name, 0, 12) == 'kohana_route') {
            delete_option($op_name);
        }
    }
}
开发者ID:kerkness,项目名称:kohana-for-wordpress,代码行数:33,代码来源:kohana-for-wordpress.php

示例10: update_option

function update_option($option_name, $newvalue) {
	global $wpdb, $cache_settings;
	if ( is_array($newvalue) || is_object($newvalue) )
		$newvalue = serialize($newvalue);

	$newvalue = trim($newvalue); // I can't think of any situation we wouldn't want to trim

    // If the new and old values are the same, no need to update.
    if ($newvalue == get_option($option_name)) {
        return true;
    }

	// If it's not there add it
	if ( !$wpdb->get_var("SELECT option_name FROM $wpdb->options WHERE option_name = '$option_name'") )
		add_option($option_name);

	$newvalue = $wpdb->escape($newvalue);
	$wpdb->query("UPDATE $wpdb->options SET option_value = '$newvalue' WHERE option_name = '$option_name'");
	$cache_settings = get_alloptions(); // Re cache settings
	return true;
}
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:21,代码来源:functions.php

示例11: wp_load_alloptions

function wp_load_alloptions()
{
    return get_alloptions();
}
开发者ID:rgeyer,项目名称:mockpress,代码行数:4,代码来源:mockpress.php

示例12: delete_option

        }
        $routes_updated = true;
    }
}
/**
 * Handle Deleting Routing Option
 */
if ($_POST['action'] == 'delete_page_routing') {
    $show_routing_tab = true;
    delete_option($_POST['route']);
    $routes_updated = true;
}
/**
 * Check wordpress options and find all kohana routes
 */
$all_options = get_alloptions();
$routes = array();
foreach ($all_options as $op_name => $op_value) {
    if (substr($op_name, 0, 12) == 'kohana_route') {
        $routes[] = explode('::', $op_name . '::' . $op_value);
    }
}
$option_set = get_option('kohana_system_path') && get_option('kohana_application_path') ? true : false;
$has_routes = $routes ? true : false;
/**
 * Determine the Kohana Front Loader URL
 */
$my_kohana_front = get_option('siteurl');
global $wpdb;
if (!get_option('permalink_structure')) {
    $my_kohana_front .= '/?page_id=' . get_option('kohana_front_loader');
开发者ID:kerkness,项目名称:kohana-for-wordpress,代码行数:31,代码来源:admin_menu.php

示例13: testGetAllOptions

 function testGetAllOptions()
 {
     update_option('test', 'value');
     $this->assertEquals(array('test' => 'value'), get_alloptions());
 }
开发者ID:rgeyer,项目名称:mockpress,代码行数:5,代码来源:MockPressTest.php

示例14: medicenter_options


//.........这里部分代码省略.........
    				"form_field_text_color" => $_POST["form_field_text_color"],
    				"form_field_border_color" => $_POST["form_field_border_color"],
    				"form_field_active_border_color" => $_POST["form_field_active_border_color"],
    				"date_box_color" => $_POST["date_box_color"],
    				"date_box_text_color" => $_POST["date_box_text_color"],
    				"date_box_comments_number_text_color" => $_POST["date_box_comments_number_text_color"],
    				"date_box_comments_number_border_color" => $_POST["date_box_comments_number_border_color"],
    				"date_box_comments_number_hover_border_color" => $_POST["date_box_comments_number_hover_border_color"],
    				"gallery_box_text_first_line_color" => $_POST["gallery_box_text_first_line_color"],
    				"gallery_box_text_second_line_color" => $_POST["gallery_box_text_second_line_color"],
    				"gallery_box_hover_color" => $_POST["gallery_box_hover_color"],
    				"gallery_box_hover_text_first_line_color" => $_POST["gallery_box_hover_text_first_line_color"],
    				"gallery_box_hover_text_second_line_color" => $_POST["gallery_box_hover_text_second_line_color"],
    				"timetable_box_color" => $_POST["timetable_box_color"],
    				"timetable_box_hover_color" => $_POST["timetable_box_hover_color"],
    				"gallery_details_box_border_color" => $_POST["gallery_details_box_border_color"],
    				"bread_crumb_border_color" => $_POST["bread_crumb_border_color"],
    				"accordion_item_border_color" => $_POST["accordion_item_border_color"],
    				"accordion_item_border_hover_color" => $_POST["accordion_item_border_hover_color"],
    				"accordion_item_border_active_color" => $_POST["accordion_item_border_active_color"],
    				"copyright_area_border_color" => $_POST["copyright_area_border_color"],
    				"comment_reply_button_color" => $_POST["comment_reply_button_color"],
    				"post_author_link_color" => $_POST["post_author_link_color"],
    				"contact_details_box_background_color" => $_POST["contact_details_box_background_color"],
    				"header_font" => $_POST["header_font"],
    				"subheader_font" => $_POST["subheader_font"]
    			);
    			update_option($themename . "_options", $theme_options);
    			$selected_tab = 0;
    		}
    	}*/
    $theme_options = theme_stripslashes_deep(get_option($themename . "_options"));
    $sliderAllShortcodeIds = array();
    $allOptions = get_alloptions();
    foreach ($allOptions as $key => $value) {
        if (substr($key, 0, 26) == "medicenter_slider_settings") {
            $sliderAllShortcodeIds[] = $key;
        }
    }
    //sort slider ids
    sort($sliderAllShortcodeIds);
    ?>
	<div class="wrap">
		<div class="icon32" id="icon-options-general"><br></div>
		<h2><?php 
    echo ucfirst('medicenter');
    ?>
 Options</h2>
	</div>
	<?php 
    if ($_POST["action"] == $themename . "_save") {
        ?>
	<div class="updated"> 
		<p>
			<strong>
				<?php 
        _e('Options saved', 'medicenter');
        ?>
			</strong>
		</p>
	</div>
	<?php 
    }
    //get google fonts
    $google_api_url = 'https://www.googleapis.com/webfonts/v1/webfonts?key=AIzaSyB4_VClnbxilxqjZd7NbysoHwAXX1ZGdKQ';
    $fontsJson = wp_remote_retrieve_body(wp_remote_get($google_api_url, array('sslverify' => false)));
开发者ID:unisexx,项目名称:drtooth,代码行数:67,代码来源:theme-options.php


注:本文中的get_alloptions函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。