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


PHP get_home_url函数代码示例

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


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

示例1: uls_get_link

/**
 * Return the HTML link of the translation of a post.
 *
 * @param $post_id integer id of post. If it is null, then it converts the current URL with the language specified.
 * @param $language string language of translation. If it is null or invalid, current language loaded in the page is used.
 * @param $label string inner text of the link.
 * @param $class string text to include as class parameter in the link
 *
 * @return string the HTML link of the translation link of a post.
 */
function uls_get_link($post_id = null, $language = null, $label = null, $class = 'uls-link')
{
    // instance the atribute
    $translation_url = "#";
    if ($post_id == null) {
        if (is_home() || is_front_page() || is_archive() || is_search() || is_author() || is_category() || is_tag() || is_date()) {
            $url = uls_get_browser_url();
            $translation_url = uls_get_url_translated($url, $language);
        } else {
            if (is_search()) {
                $url = get_home_url();
                $url .= "?s=" . get_search_query();
                $translation_url = uls_get_url_translated($url, $language);
            }
        }
    } else {
        $translation_id = uls_get_post_translation_id($post_id, $language);
        if (empty($translation_id)) {
            $translation_id = $post_id;
        }
        //set conversion of permalinks to true
        global $uls_permalink_convertion;
        $uls_permalink_convertion = true;
        $translation_url = uls_get_url_translated(get_permalink($translation_id), $language);
        //reset conversion of permalinks
        $uls_permalink_convertion = false;
        $title = get_the_title($translation_id);
    }
    if (null == $label) {
        return '<a class="' . $class . '" href="' . $translation_url . '" >' . $title . '</a>';
    } else {
        return '<a class="' . $class . '" href="' . $translation_url . '" >' . $label . '</a>';
    }
}
开发者ID:Webilop,项目名称:user-language-switch,代码行数:44,代码来源:uls-functions.php

示例2: theme_site_logo

/**
 * Website logo function
 */
function theme_site_logo()
{
    $get_image_id = wps_get_theme_option('company_logo');
    $output = '';
    $default = '<a href="' . get_home_url() . '">' . get_bloginfo('name') . '</a><br/><small>' . get_bloginfo('description') . '</small>';
    /**
     * Logo HTML wrapper
     */
    $output .= '<div data-ui-component="branding">';
    if (wps_get_theme_option('logo_setting') === 'brand_title') {
        $output .= $default;
    } else {
        if ($get_image_id) {
            $image = wp_get_attachment_image_src($get_image_id, 'full');
            $logo = $image[0];
            $output .= '<a title="' . get_bloginfo('name') . '" href="' . get_home_url() . '">';
            $output .= '<img src="' . $logo . '" alt="' . get_bloginfo('name') . '" class="brand-logo"/>';
            $output .= '</a>';
        } else {
            $output .= $default;
        }
    }
    $output .= '</div>';
    $allowed_html = array('a' => array('href' => array(), 'title' => array()), 'h1' => array(), 'h2' => array(), 'span' => array(), 'small' => array(), 'br' => array(), 'div' => array(), 'img' => array('src' => array(), 'alt' => array(), 'class' => array()));
    echo wp_kses($output, $allowed_html);
}
开发者ID:Zsolt-R,项目名称:wps-prime,代码行数:29,代码来源:theme-site-logo.php

示例3: get_site_url

 /**
  * (non-PHPdoc)
  * @see Ai1ec_Template_Adapter::get_site_url()
  */
 public function get_site_url()
 {
     if (is_admin() && defined('FORCE_SSL_ADMIN') && true === FORCE_SSL_ADMIN) {
         return get_home_url(null, '', 'https');
     }
     return get_home_url();
 }
开发者ID:briancompton,项目名称:knightsplaza,代码行数:11,代码来源:class-ai1ec-wordpress-template-adapter.php

示例4: wpo_init_constants

 function wpo_init_constants()
 {
     $theme_mods = get_theme_mods();
     if (!defined('TEMPLATEURI')) {
         define('TEMPLATEURI', trailingslashit(get_stylesheet_directory_uri()));
     }
     if (!defined('HOMEURL')) {
         define('HOMEURL', trailingslashit(get_home_url()));
     }
     if (!defined('THEMECOLOR')) {
         if (!empty($theme_mods['wpo_theme_color'])) {
             $meta_color = $theme_mods['wpo_theme_color'];
         } else {
             $meta_color = '#000000';
         }
         define('THEMECOLOR', $meta_color);
     }
     if (!defined('HEADERCOLOR')) {
         if (!empty($theme_mods['wpo_header_color'])) {
             $meta_color = $theme_mods['wpo_header_color'];
         } else {
             $meta_color = '#000000';
         }
         define('HEADERCOLOR', $meta_color);
     }
 }
开发者ID:bigandy,项目名称:wp-offline,代码行数:26,代码来源:misc.php

示例5: get_default_logout_url

 public function get_default_logout_url($current_url = null, $redirect_slug = 'customer-dashboard', $redirect_url = null)
 {
     if ($current_url != null) {
         return $current_url;
     }
     $cp_addon = $this->plugin->get_addon('customer-pages');
     // Where should we redirect?
     if (!empty($redirect_slug)) {
         $redirect_page_id = $cp_addon->get_page_id($redirect_slug);
         if ($redirect_page_id > 0) {
             $redirect_url = get_permalink($redirect_page_id);
         }
     }
     if ($redirect_url == null) {
         $redirect_url = get_home_url();
     }
     // The account page ID
     $page_id = $cp_addon->get_page_id('user-account');
     if ($page_id > 0) {
         $permalink = get_permalink($page_id);
         $logout_url = $permalink . '?cuar_redirect=' . $redirect_url;
     } else {
         $logout_url = wp_login_url($redirect_url);
     }
     return $logout_url;
 }
开发者ID:joasssko,项目名称:schk,代码行数:26,代码来源:customer-logout-addon.class.php

示例6: options_general_add_js

/**
 * Display JavaScript on the page.
 *
 * @since 3.5.0
 */
function options_general_add_js()
{
    ?>
<script type="text/javascript">
//<![CDATA[
	jQuery(document).ready(function($){
		var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
			homeURL = ( <?php 
    echo wp_json_encode(get_home_url());
    ?>
 || '' ).replace( /^(https?:\/\/)?(www\.)?/, '' );

		$( '#blogname' ).on( 'input', function() {
			var title = $.trim( $( this ).val() ) || homeURL;

			// Truncate to 40 characters.
			if ( 40 < title.length ) {
				title = title.substring( 0, 40 ) + '\u2026';
			}

			$siteName.text( title );
		});

		$("input[name='date_format']").click(function(){
			if ( "date_format_custom_radio" != $(this).attr("id") )
				$("input[name='date_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
		});
		$("input[name='date_format_custom']").focus(function(){
			$( '#date_format_custom_radio' ).prop( 'checked', true );
		});

		$("input[name='time_format']").click(function(){
			if ( "time_format_custom_radio" != $(this).attr("id") )
				$("input[name='time_format_custom']").val( $(this).val() ).siblings('.example').text( $(this).siblings('span').text() );
		});
		$("input[name='time_format_custom']").focus(function(){
			$( '#time_format_custom_radio' ).prop( 'checked', true );
		});
		$("input[name='date_format_custom'], input[name='time_format_custom']").change( function() {
			var format = $(this);
			format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here
			$.post(ajaxurl, {
					action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',
					date : format.val()
				}, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } );
		});

		var languageSelect = $( '#WPLANG' );
		$( 'form' ).submit( function() {
			// Don't show a spinner for English and installed languages,
			// as there is nothing to download.
			if ( ! languageSelect.find( 'option:selected' ).data( 'installed' ) ) {
				$( '#submit', this ).after( '<span class="spinner language-install-spinner" />' );
			}
		});
	});
//]]>
</script>
<?php 
}
开发者ID:sb-xs,项目名称:que-pour-elle,代码行数:65,代码来源:options-general.php

示例7: swp_check_registration_status

function swp_check_registration_status()
{
    // Fetch the User's Options Array
    $swp_user_options = swp_get_user_options();
    // Fetch URL of the home page
    $homeURL = get_home_url();
    // Create a Registration Code from the Domain Name
    $regCode = md5($homeURL);
    // IF the plugin thinks that it is already registered....
    if (is_swp_registered()) {
        // Construct the request URL
        $url = 'https://warfareplugins.com/registration-api/?activity=check_registration&emailAddress=' . $swp_user_options['emailAddress'] . '&domain=' . $homeURL . '&registrationCode=' . md5($homeURL);
        // Send the link and load the response
        $response = swp_file_get_contents_curl($url);
        // If the response is negative, unregister the plugin....
        if ($response == 'false') {
            // Set the premium code to null
            $swp_user_options['premiumCode'] = '';
            // Update the options array with the premium code nulled
            update_option('socialWarfareOptions', $swp_user_options);
        }
        // If the codes didn't match, but a premium code does exist
    } elseif (isset($swp_user_options['premiumCode'])) {
        // Attemp to unregister this from the Warfare Plugins Server
        $url = 'https://warfareplugins.com/registration-api/?activity=unregister&emailAddress=' . $swp_user_options['emailAddress'] . '&premiumCode=' . $swp_user_options['premiumCode'];
        // Parse the response
        $response = swp_file_get_contents_curl($url);
        $response = json_decode($response, true);
        // If it unregistered, let's try to auto-reregister it....
        if ($response['status'] == 'Success') {
            // Attempt to reregister it
            $url = 'https://warfareplugins.com/registration-api/?activity=register&emailAddress=' . $swp_user_options['emailAddress'] . '&domain=' . get_home_url() . '&registrationCode=' . $regCode;
            // Parse the response
            $response = swp_file_get_contents_curl($url);
            $response = json_decode($response, true);
            // IF the registration attempt was successful....
            if ($response['status'] == 'Success') {
                // Save our updated options
                $swp_user_options['premiumCode'] == $response['premiumCode'];
                // Update the options storing in our new updated Premium Code
                update_option('socialWarfareOptions', $swp_user_options);
                return true;
                // IF the registration attempt was NOT successful
            } else {
                // Set the premium code to null
                $swp_user_options['premiumCode'] = '';
                // Update the options array with the premium code nulled
                update_option('socialWarfareOptions', $swp_user_options);
                return false;
            }
            // IF it wasn't able to unregister
        } else {
            // Set the premium code to null
            $swp_user_options['premiumCode'] = '';
            // Update the options array with the premium code nulled
            update_option('socialWarfareOptions', $swp_user_options);
            return false;
        }
    }
}
开发者ID:warfare-plugins,项目名称:social-warfare,代码行数:60,代码来源:registration.php

示例8: bb_register_navmenus

/**
 *
 * Function for registering wp_nav_menu() in 3 locations
 */
function bb_register_navmenus()
{
    register_nav_menus(array('Top' => __('Top Navigation'), 'Header' => __('Header Navigation'), 'Footer' => __('Footer Navigation')));
    // Check if Top menu exists and make it if not
    if (!is_nav_menu('Top')) {
        $menu_id = wp_create_nav_menu('Top');
        $menu = array('menu-item-type' => 'custom', 'menu-item-url' => get_home_url('/'), 'menu-item-title' => 'Home');
        wp_update_nav_menu_item($menu_id, 1, $menu);
    }
    // Check if Header menu exists and make it if not
    if (!is_nav_menu('Header')) {
        $menu_id = wp_create_nav_menu('Header');
        $menu = array('menu-item-type' => 'custom', 'menu-item-url' => get_home_url('/'), 'menu-item-title' => 'Home');
        wp_update_nav_menu_item($menu_id, 1, $menu);
    }
    // Check if Footer menu exists and make it if not
    if (!is_nav_menu('Footer')) {
        $menu_id = wp_create_nav_menu('Footer');
        $menu = array('menu-item-type' => 'custom', 'menu-item-url' => get_home_url('/'), 'menu-item-title' => 'Home');
        wp_update_nav_menu_item($menu_id, 1, $menu);
    }
    // Get any menu locations that dont have a menu assigned to it and give it on
    /*
    $loc = array('Top', 'Header', 'Footer');
    if ( has_nav_menu( $location )) {
    	$locations = get_nav_menu_locations();
    	return (!empty( $locations[ $location ] ));
    }
    */
}
开发者ID:jaredwilli,项目名称:3.0basics,代码行数:34,代码来源:functions.php

示例9: publication_query

 /**
  * Search for publications.
  *
  * @param array $args
  * @return array
  */
 private function publication_query($args = array())
 {
     $query = array('post_type' => 'seoslides-slideset', 'suppress_filters' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'post_status' => 'publish', 'order' => 'DESC', 'orderby' => 'post_date', 'posts_per_page' => 20);
     $args['pagenum'] = isset($args['pagenum']) ? absint($args['pagenum']) : 1;
     if (isset($args['s'])) {
         $query['s'] = $args['s'];
     }
     $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ($args['pagenum'] - 1) : 0;
     // Run the query
     $get_posts = new WP_Query();
     $posts = $get_posts->query($query);
     $results = array();
     if (0 === $get_posts->post_count) {
         return $results;
     }
     // Populate results
     foreach ($posts as $post) {
         // Get the embed ID for the first slide in the presentation
         $slideset = new SEOSlides_Slideset($post->ID);
         /** @var SEOSlides_Embed $embed */
         $embed = SEOSlides_Module_Provider::get('SEOSlides Embed');
         $embed_id = $embed->get_embed_unique_id($post->ID, $slideset->first_slide()->slug);
         $embed_url = $embed->get_embed_url($post->ID, $slideset->first_slide()->slug);
         $shortcode = '[seoslides embed_id="' . $embed_id . '"';
         $shortcode .= ' script_src="' . preg_replace('/\\/(slides|embeds)\\//', '/embed-script/', $embed_url) . '"';
         $shortcode .= ' overview_src="' . get_permalink($post) . '"';
         $shortcode .= ' title="' . get_the_title($post) . '"';
         $shortcode .= ' site_src="' . get_home_url() . '"';
         $shortcode .= ' site_title="' . get_bloginfo('name') . '"';
         $shortcode .= ' /]';
         $results[] = array('ID' => $post->ID, 'title' => trim(esc_html(strip_tags(get_the_title($post)))), 'shortcode' => esc_attr($shortcode), 'info' => mysql2date(__('Y/m/d'), $post->post_date));
     }
     return $results;
 }
开发者ID:Neminath,项目名称:lastmile,代码行数:40,代码来源:SEOSlides_TinyMCE.php

示例10: js_wp_editor

function js_wp_editor($settings = array())
{
    if (!class_exists('_WP_Editors')) {
        require ABSPATH . WPINC . '/class-wp-editor.php';
    }
    $set = _WP_Editors::parse_settings('apid', $settings);
    if (!current_user_can('upload_files')) {
        $set['media_buttons'] = false;
    }
    if ($set['media_buttons']) {
        wp_enqueue_script('thickbox');
        wp_enqueue_style('thickbox');
        wp_enqueue_script('media-upload');
        $post = get_post();
        if (!$post && !empty($GLOBALS['post_ID'])) {
            $post = $GLOBALS['post_ID'];
        }
        wp_enqueue_media(array('post' => $post));
    }
    _WP_Editors::editor_settings('apid', $set);
    $ap_vars = array('url' => get_home_url(), 'includes_url' => includes_url());
    wp_register_script('ap_wpeditor_init', get_template_directory_uri() . '/functions/js-wp-editor.js', array('jquery'), '1.1', true);
    wp_localize_script('ap_wpeditor_init', 'ap_vars', $ap_vars);
    wp_enqueue_script('ap_wpeditor_init');
}
开发者ID:rsantellan,项目名称:wordpress-ecommerce,代码行数:25,代码来源:js-wp-editor.php

示例11: content

 protected function content($atts, $content = null)
 {
     $width = $input_class = $el_class = $output = $post_type = $search_form = $el_position = '';
     extract(shortcode_atts(array('el_position' => '', 'search_input_text' => '', 'input_size' => 'standard', 'post_type' => '', 'width' => '1/1', 'twitter_username' => '', 'el_class' => ''), $atts));
     if ($input_size == "large") {
         $input_class = 'input-large';
     } else {
         $input_class = 'input-standard';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = spb_translateColumnWidthToSpan($width);
     $search_form .= '<form method="get" class="search-form search-widget" action="' . get_home_url() . '/">';
     $search_form .= '<input type="text" placeholder="' . $search_input_text . '" name="s" class="' . $input_class . '" />';
     if ($post_type != "any") {
         $search_form .= '<input type="hidden" name="post_type" value="' . $post_type . '" />';
     }
     $search_form .= '</form>';
     $output .= "\n\t" . '<div class="spb_search_widget spb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="spb-asset-content">';
     $output .= "\n\t\t" . $search_form;
     $output .= "\n\t\t" . '</div>';
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
开发者ID:arobbins,项目名称:spellestate,代码行数:25,代码来源:search.php

示例12: analyse

 /**
  * count the click statistic and redirect to the right url
  * @return boolean
  */
 function analyse()
 {
     if (isset($_REQUEST['email_id']) && isset($_REQUEST['user_id'])) {
         $WJ_Stats = new WJ_Stats();
         if (!empty($WJ_Stats->clicked_url)) {
             // clicked stats
             $url = $this->encode_url($WJ_Stats->subscriber_clicked());
             $external_url = htmlentities($WJ_Stats->subscriber_clicked());
             // escape HTML characters (that's how URLs are saved in the DB)
             $external_url = preg_replace('!/?\\?utm.*!', '', $external_url);
             // remove anything that starts with ?utm or /?utm
             $internal_site_url = htmlentities(get_site_url());
             $internal_home_url = htmlentities(get_home_url());
             $model_email = WYSIJA::get('email', 'model');
             $email_object = $model_email->getOne(false, array('email_id' => $_REQUEST['email_id']));
             if (preg_match('/' . preg_quote($external_url, '/') . '/', $email_object['body']) || preg_match('/^' . preg_quote($internal_site_url, '/') . '/', $url) || preg_match('/^' . preg_quote($internal_home_url, '/') . '/', $url)) {
                 do_action('mpoet_click_stats', $WJ_Stats);
                 $this->redirect($url);
             }
             header('HTTP/1.0 404 Not Found');
             echo '<h1>404 Not Found</h1>';
             echo 'The page that you have requested could not be found.';
             exit;
         } else {
             // opened stat
             $WJ_Stats->subscriber_opened();
         }
     }
     return true;
 }
开发者ID:duboisGeof,项目名称:deliciousMeals,代码行数:34,代码来源:stats.php

示例13: widget

    function widget($args, $instance)
    {
        extract($args);
        extract($instance);
        $options = get_option(DSIDXWIDGETS_OPTION_NAME);
        $randString = dsWidgets_Service_Base::get_random_string('abcdefghijklmnopqrstuvwxyz1234567890', 5);
        $income = htmlspecialchars($instance["income"]);
        $downPayment = htmlspecialchars($instance["downPayment"]);
        $monthlyDebts = htmlspecialchars($instance["monthlyDebts"]);
        $state = htmlspecialchars($instance["state"]);
        $city = htmlspecialchars($instance["city"]);
        $zip = htmlspecialchars($instance["zip"]);
        $priceMin = htmlspecialchars($instance["priceMin"]);
        $propType = '';
        $imagesStub = dsWidgets_Service_Base::$widgets_images_stub;
        $apiStub = dsWidgets_Service_Base::$widgets_api_stub;
        $curURL = get_home_url();
        $idxpress_options = get_option(DSIDXPRESS_OPTION_NAME);
        if (!empty($idxpress_options["AccountID"])) {
            $aid = $idxpress_options["AccountID"];
        } else {
            $aid = $options["AccountID"];
        }
        if (!empty($idxpress_options["SearchSetupID"])) {
            $ssid = $idxpress_options["SearchSetupID"];
        } else {
            $ssid = $options["SearchSetupID"];
        }
        echo $before_widget;
        if (defined('ZPRESS_API') && ZPRESS_API != '') {
            $widget_header = call_user_func('\\zpress\\themes\\Options::GetOption', 'theme_widgets_require_header');
            if (!empty($widget_header->meta) && $widget_header->meta == 'true') {
                echo $before_title;
                echo 'Affordability';
                echo $after_title;
            }
        }
        echo <<<HTML
        <div>
            <script type="text/javascript" id="divLocal{$randString}_">
\t\t\t\twindow.affordabilityHasDependency = true;
                LaunchBase{$randString} = function(){
                    var affordabilityScript, _ds_midx;
                    CreateObject{$randString} = function () { _ds_midx = {currentURL: '{$curURL}',  curAPIStub: '{$apiStub}', curImageStub: '{$imagesStub}', targetDomain: window["zpress_widget_domain_token"], accountId: '{$aid}',searchSetupId: '{$ssid}',muteStyles: true,income: '{$income}',downPayment: '{$downPayment}',monthlyDebts: '{$monthlyDebts}',state: '{$state}',city: '{$city}',zip: '{$zip}',priceMin: '{$priceMin}',curDivID: 'divLocal{$randString}_',querySchema: '12dGTTViUjEzC1rrNlw6Lq6A6wZQlgBarlIcucpGTkQrUP3gCimYF6deRFaavu2IbPpaOkZ9I4K42QaAhLVEcA==',productType: '0' }; }
                    AddJavaScriptToDOM{$randString}=function(c,d,e){if(1!=d){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.async=!0;a.src=c;a.onload=function(){ window[e] = 1;};b.parentNode.insertBefore(a,b)}return 1};
                    CreateWidget{$randString} = function () {
                     (window.affordabilityFinished == 1) ? (window["ds.widget.view.affordability"].isProcessing = true, CreateObject{$randString}(), new window["ds.widget.view.affordability"](_ds_midx), window["ds.widget.view.affordability"].isProcessing = false, window.affordabilityHasDependency = false) : window.setTimeout("CreateWidget{$randString}(false)", 20); 
                    }
                    if (affordabilityScript != 1) { affordabilityScript = AddJavaScriptToDOM{$randString}("{$this->widgetsCdn}/Scripts/PostCompile/Affordability_v1_1.js", affordabilityScript, 'affordabilityFinished') }; 
                      CreateWidget{$randString}();
                }
                GetToken{$randString}=function(){if(!window.zpress_widget_domain_token&&1!=window.zpress_widget_domain_token_progress){window.zpress_widget_domain_token_progress=1;var c=-1<navigator.userAgent.indexOf("MSIE 7.0")?!0:!1,d=-1<navigator.userAgent.indexOf("MSIE 8.0")||-1<navigator.userAgent.indexOf("MSIE 9.0")?!0:!1;if(c)rr=document.createElement("script"),rr.async=!0,rr.id="domainScript",rr.type="text/javascript",rr.src="{$apiStub}Encrypt/?targetString="+window.location.hostname+"&targetObject=domain&authType=Basic&curDomain="+
                window.location.hostname+"&objectName_=error",rr.onload=rr.onreadystatechange=function(){"undefined"!=typeof window.error?alert("We had a problem authenticating this domain"):(window.zpress_widget_domain_token=window.encrypted_domain,LaunchBase{$randString}())},document.getElementsByTagName("head")[0].appendChild(rr);else if(c="{$apiStub}Encrypt/?targetString="+window.location.hostname+"&targetObject=domain&authType=CORS&objectName_=error",d){var a=new XDomainRequest;a.onload=function(){window.zpress_widget_domain_token=
                eval(a.responseText);LaunchBase{$randString}()};a.onerror=function(){};a.onprogress=function(){};a.open("GET",c,!0);a.send(null)}else{var b;if(b=new XMLHttpRequest)b.onreadystatechange=function(){if(4==b.readyState)if(200==b.status){var a=eval(b.responseText);"undefined"!=typeof a.listingsError?alert(a.listingsError[0].Message):(window.zpress_widget_domain_token=a,LaunchBase{$randString}())}},b.open("GET",c,!0),b.send()}}else window.zpress_widget_domain_token?LaunchBase{$randString}():
                window.setTimeout("GetToken{$randString}()",20)};GetToken{$randString}();
            </script>
        </div>
HTML;
        echo $after_widget;
    }
开发者ID:VadimSid,项目名称:thinkgreek,代码行数:60,代码来源:widget-service-affordability.php

示例14: mayo_login_screen_url

function mayo_login_screen_url($url)
{
    global $mayo_login_screen_option;
    if (isset($mayo_login_screen_option['login_screen_logo_link']) && $mayo_login_screen_option['login_screen_logo_link'] !== '') {
        switch ($mayo_login_screen_option['login_screen_logo_link']) {
            case '@front':
            case '@home':
                $url = get_home_url();
                break;
            case '@posts':
            case '@post':
                $url = get_permalink(get_option('page_for_posts'));
                break;
            case '':
                $url = '';
                break;
            default:
                $url = $mayo_login_screen_option['login_screen_logo_link'];
                break;
        }
    } else {
        $url = '';
    }
    return $url;
}
开发者ID:satishux,项目名称:fitnesshack,代码行数:25,代码来源:mayo-login-screen.php

示例15: zb_add_defaults

function zb_add_defaults($reset = false)
{
    if ($reset === true) {
        delete_option('zappbar_site');
        delete_option('zappbar_colors');
        delete_option('zappbar_panels');
        delete_option('zappbar_layout');
    }
    $zb_site = get_option('zappbar_site');
    if (empty($zb_site)) {
        $zb_site = array('responsive' => '0', 'auto_width' => 'off', 'theme_width' => '940', 'fix_admin' => 'no', 'sidebars' => '1', 'adminbar' => 'off', 'showon' => 'none', 'applyto' => 'all', 'altertheme' => array('header' => 'header', 'sitenav' => 'sitenav', 'commentform' => 'commentform', 'push' => 'push'), 'app_icon' => '', 'splash_screen' => '', 'splash_size' => 'contain', 'header_custom' => '', 'nav_custom' => '', 'comment_custom' => '', 'sidebars_custom' => '', 'comic_nav' => '', 'alter_woo_theme' => array('woo_reviews' => 'woo_reviews', 'woo_desc' => 'woo_desc', 'woo_addl' => 'woo_addl'));
        update_option('zappbar_site', $zb_site);
    }
    $zb_social = get_option('zappbar_social');
    if (empty($zb_social)) {
        $zb_social = array('fb_default_img' => '', 'twitter_id' => '', 'phone_number' => '', 'email_address' => '', 'social_panel' => array('facebook' => 'facebook', 'twitter' => 'twitter', 'google' => 'google', 'reddit' => 'reddit', 'stumble' => 'stumble', 'digg' => 'digg', 'linkedin' => 'linkedin', 'pinterest' => 'pinterest', 'delicious' => 'delicious', 'rss' => 'rss', 'email' => 'email'));
        update_option('zappbar_social', $zb_social);
    }
    $zb_colors = get_option('zappbar_colors');
    if (empty($zb_colors)) {
        $zb_colors = array('color_src' => 'basic', 'custom_styles' => '', 'bar_bg' => '#ffffff', 'bar_bg_opacity' => '1.0', 'button_bg' => '#ffffff', 'button_bg_opacity' => '1.0', 'button_hover_bg' => '#cccccc', 'button_bg_hover_opacity' => '1.0', 'font_color' => '#333333', 'font_hover_color' => '#000000', 'bar_border_color' => '#000000', 'bar_border_style' => '', 'bar_border_width' => '');
        update_option('zappbar_colors', $zb_colors);
    }
    $zb_panels = get_option('zappbar_panels');
    if (empty($zb_panels)) {
        $zb_panels = array('panel_menu' => '0', 'panel_tabs' => 'yes', 'panel_styles' => 'on', 'panel_bg' => '#ffffff', 'panel_bg_opacity' => '1.0', 'panel_button_bg' => '#ffffff', 'panel_button_bg_opacity' => '1.0', 'panel_button_hover_bg' => '#cccccc', 'panel_button_hover_bg_opacity' => '1.0', 'panel_font_color' => '#333333', 'panel_font_hover_color' => '#000000', 'panel_border_color' => '#000000', 'panel_border_style' => '', 'panel_border_width' => '');
        update_option('zappbar_panels', $zb_panels);
    }
    $zb_layout = get_option('zappbar_layout');
    if (empty($zb_layout)) {
        $zb_layout = array('button_layout' => 'spread', 'search_button' => 'on', 'logo' => '', 'default_top' => array(array('dashicons|dashicons-menu', 'Menu', 'appmenu_left'), array('dashicons|dashicons-blank', '', ''), array('dashicons|dashicons-admin-home', 'Home', get_home_url()), array('dashicons|dashicons-blank', '', ''), array('dashicons|dashicons-search', 'Search', 'search_right')), 'default_bottom' => array(array('dashicons|dashicons-wordpress', 'Blog', 'blogposts'), array('dashicons|dashicons-info', 'About', ''), array('dashicons|dashicons-admin-comments', 'Comment', 'commentform'), array('dashicons|dashicons-edit', 'Contact', 'mailto:' . get_bloginfo('admin_email')), array('dashicons|dashicons-share', 'Share', 'share_this')), 'use_archive_top_bar' => 'yes', 'archive_top_bar' => array(array('dashicons|dashicons-menu', 'Menu', 'appmenu_left'), array('dashicons|dashicons-blank', '', ''), array('dashicons|dashicons-admin-home', 'Home', get_home_url()), array('dashicons|dashicons-blank', '', ''), array('dashicons|dashicons-search', 'Search', 'search_right')), 'use_archive_bottom_bar' => 'yes', 'archive_bottom_bar' => array(array('dashicons|dashicons-arrow-left-alt', 'First', 'first_page'), array('dashicons|dashicons-arrow-left-alt2', 'Previous', 'prev_page'), array('dashicons|dashicons-blank', '', ''), array('dashicons|dashicons-arrow-right-alt2', 'Next', 'next_page'), array('dashicons|dashicons-arrow-right-alt', 'Last', 'last_page')), 'use_comic_top_bar' => 'yes', 'comic_top_bar' => array(array('dashicons|dashicons-menu', 'Menu', 'appmenu_left'), array('fa|fa-angle-double-left', 'Prev Chap', 'prev_comic'), array('dashicons|dashicons-admin-home', 'Home', get_home_url()), array('fa|fa-angle-double-right', 'Next chap', 'next_comic'), array('dashicons|dashicons-images-alt2', 'Archive', 'comic_archive')), 'use_comic_bottom_bar' => 'yes', 'comic_bottom_bar' => array(array('dashicons|dashicons-arrow-left-alt', 'First', 'first_comic'), array('dashicons|dashicons-arrow-left-alt2', 'Previous', 'prev_comic'), array('dashicons|dashicons-admin-comments', 'Comment', 'commentform'), array('dashicons|dashicons-arrow-right-alt2', 'Next', 'next_comic'), array('dashicons|dashicons-arrow-right-alt', 'Last', 'last_comic')), 'use_woo_top_bar' => 'yes', 'woo_top_bar' => array(array('dashicons|dashicons-menu', 'Menu', 'appmenu_left'), array('dashicons|dashicons-cart', 'Cart', 'woo_cart'), array('dashicons|dashicons-admin-home', 'Home', get_home_url()), array('dashicons|dashicons-admin-users', 'Account', 'woo_account'), array('dashicons|dashicons-search', 'Search', 'woo_search_right')), 'use_woo_bottom_bar' => 'yes', 'woo_bottom_bar' => array(array('dashicons|dashicons-products', 'Store', 'woo_store'), array('dashicons|dashicons-tag', 'Info', 'woo_desc'), array('dashicons|dashicons-star-filled', 'Reviews', 'woo_review'), array('fa|fa-tags', 'More Info', 'woo_addl'), array('dashicons|dashicons-share', 'Share', 'share_this')));
        update_option('zappbar_layout', $zb_layout);
    }
}
开发者ID:kmhcreative,项目名称:zappbar,代码行数:34,代码来源:zappbar.php


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