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


PHP GoogleSitemapGeneratorLoader类代码示例

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


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

示例1: CallCheckForManualBuild

 function CallCheckForManualBuild()
 {
     if (GoogleSitemapGeneratorLoader::LoadPlugin()) {
         $gs = GoogleSitemapGenerator::GetInstance();
         $gs->CheckForManualBuild();
     }
 }
开发者ID:alx,项目名称:alexgirard.com-blog,代码行数:7,代码来源:sitemap.php

示例2: GetBackLink

 /**
  * Returns a link pointing back to the plugin page in WordPress
  *
  * @since 3.0
  * @return string The full url
  */
 public static function GetBackLink()
 {
     global $wp_version;
     $url = admin_url("options-general.php?page=" . GoogleSitemapGeneratorLoader::GetBaseName());
     return $url;
 }
开发者ID:yarwalker,项目名称:ecobyt,代码行数:12,代码来源:sitemap-core.php

示例3: jobman_print_other_plugins_box

function jobman_print_other_plugins_box()
{
    $options = get_option('jobman_options');
    ?>
	<p><?php 
    _e('Job Manager provides extra functionality through the use of other plugins available for WordPress. These plugins are not required for Job Manager to function, but do provide enhancements.', 'jobman');
    ?>
</p>
	<form action="" method="post">
	<input type="hidden" name="jobmanotherpluginssubmit" value="1" />
<?php 
    wp_nonce_field('jobman-other-plugins-updatedb');
    if (class_exists('GoogleSitemapGeneratorLoader')) {
        $gxs = true;
        $gxs_status = __('Installed', 'jobman');
        $gxs_version = GoogleSitemapGeneratorLoader::GetVersion();
    } else {
        $gxs = false;
        $gxs_status = __('Not Installed', 'jobman');
    }
    ?>
		<h4><?php 
    _e('Google XML Sitemaps', 'jobman');
    ?>
</h4>
		<p><?php 
    _e('Allows you to automatically add all your job listing and job detail pages to your sitemap. By default, only the main job list is added.', 'jobman');
    ?>
</p>
		<p>
			<a href="http://wordpress.org/extend/plugins/google-sitemap-generator/"><?php 
    _e('Download', 'jobman');
    ?>
</a><br/>
			<?php 
    _e('Status', 'jobman');
    ?>
: <span class="<?php 
    echo $gxs ? 'pluginokay' : 'pluginwarning';
    ?>
"><?php 
    echo $gxs_status;
    ?>
</span><br/>
			<?php 
    echo $gxs ? __('Version', 'jobman') . ": {$gxs_version}" : '';
    ?>
			<?php 
    echo !$gxs || version_compare($gxs_version, '3.2', '<') ? ' <span class="pluginwarning">' . __('Job Manager requires Google XML Sitemaps version 3.2 or later.', 'jobman') . '</span>' : '';
    ?>
		</p>
<?php 
    if ($gxs && version_compare($gxs_version, '3.2', '>=')) {
        ?>
		<strong><?php 
        _e('Options', 'jobman');
        ?>
</strong>
		<table class="form-table">
			<tr>
				<th scope="row"><?php 
        _e('Add Job pages to your Sitemap?', 'jobman');
        ?>
</th>
				<td><input type="checkbox" value="1" name="plugin-gxs"<?php 
        echo $options['plugins']['gxs'] ? ' checked="checked"' : '';
        ?>
 /></td>
			</tr>
		</table>
<?php 
    }
    $sicaptcha = false;
    $class = 'pluginwarning';
    $sistatus = __('Not Installed', 'jobman');
    if (class_exists('siCaptcha')) {
        $sicaptcha = true;
        $class = 'pluginokay';
        $sistatus = __('Installed', 'jobman');
    }
    ?>
		<h4><?php 
    _e('SI Captcha', 'jobman');
    ?>
</h4>
		<p><?php 
    _e('Allows you to add a Captcha to your Application submission form.', 'jobman');
    ?>
</p>
		<p>
			<a href="http://wordpress.org/extend/plugins/si-captcha-for-wordpress/"><?php 
    _e('Download', 'jobman');
    ?>
</a><br/>
			<?php 
    _e('Status', 'jobman');
    ?>
: <span class="<?php 
    echo $class;
    ?>
//.........这里部分代码省略.........
开发者ID:spontaneouslypresent,项目名称:job-manager,代码行数:101,代码来源:admin-settings.php

示例4: CallDoRobots

 function CallDoRobots()
 {
     if (GoogleSitemapGeneratorLoader::LoadPlugin()) {
         $gs =& GoogleSitemapGenerator::GetInstance();
         $gs->DoRobots();
     }
 }
开发者ID:sjcockell,项目名称:fuzzierlogic.blog,代码行数:7,代码来源:sitemap.php

示例5: HtmlShowOptionsPage


//.........这里部分代码省略.........
				<!--[if lt IE 7]>
					<style type="text/css">
						div#advancedstuff {
							width:735px;
						}
					</style>
				<![endif]-->
				
			<?php 
        } else {
            ?>
				<style type="text/css">
					div.updated-message {
						margin-left:0; margin-right:0;
					}
				</style>
			<?php 
        }
        ?>
		
		<div class="wrap" id="sm_div">
			<form method="post" action="<?php 
        echo $this->sg->GetBackLink();
        ?>
">
				<h2><?php 
        _e('XML Sitemap Generator for WordPress', 'sitemap');
        echo " " . $this->sg->GetVersion();
        ?>
 </h2>
		<?php 
        if (function_exists("wp_update_plugins") && (!defined('SM_NO_UPDATE') || SM_NO_UPDATE == false)) {
            wp_update_plugins();
            $file = GoogleSitemapGeneratorLoader::GetBaseName();
            $plugin_data = get_plugin_data(GoogleSitemapGeneratorLoader::GetPluginFile());
            $current = get_option('update_plugins');
            if (isset($current->response[$file])) {
                $r = $current->response[$file];
                ?>
<div id="update-nag" class="sm-update-nag"><?php 
                if (!current_user_can('edit_plugins') || version_compare($wp_version, "2.5", "<")) {
                    printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version);
                } else {
                    if (empty($r->package)) {
                        printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> <em>automatic upgrade unavailable for this plugin</em>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version);
                    } else {
                        printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&amp;plugin={$file}", 'upgrade-plugin_' . $file));
                    }
                }
                ?>
</div><?php 
            }
        }
        ?>
				
				<?php 
        if (version_compare($wp_version, "2.5", "<")) {
            ?>
				<script type="text/javascript" src="../wp-includes/js/dbx.js"></script>
				<script type="text/javascript">
				//<![CDATA[
				addLoadEvent( function() {
					var manager = new dbxManager('sm_sitemap_meta_33');
					
					//create new docking boxes group
					var meta = new dbxGroup(
开发者ID:SymbiSoft,项目名称:litprojects,代码行数:67,代码来源:sitemap-ui.php

示例6: HtmlShowOptionsPage


//.........这里部分代码省略.........
		
		</style>
	

		<style type="text/css">
	
			.sm-padded .inside {
				margin:12px!important;
			}
			.sm-padded .inside ul {
				margin:6px 0 12px 0;
			}
			
			.sm-padded .inside input {
				padding:1px;
				margin:0;
			}
		</style>


		<div class="wrap" id="sm_div">
			<form method="post" action="<?php 
        echo $this->sg->GetBackLink();
        ?>
">
				<h2><?php 
        _e('XML Sitemap Generator for WordPress', 'sitemap');
        echo " " . $this->sg->GetVersion();
        ?>
 </h2>
				<?php 
        if (function_exists("wp_update_plugins") && (!defined('SM_NO_UPDATE') || SM_NO_UPDATE == false)) {
            wp_update_plugins();
            $file = GoogleSitemapGeneratorLoader::GetBaseName();
            $plugin_data = get_plugin_data(GoogleSitemapGeneratorLoader::GetPluginFile());
            $current = function_exists('get_transient') ? get_transient('update_plugins') : get_option('update_plugins');
            if (isset($current->response[$file])) {
                $r = $current->response[$file];
                ?>
<div id="update-nag" class="sm-update-nag"><?php 
                if (!current_user_can('edit_plugins')) {
                    printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version);
                } else {
                    if (empty($r->package)) {
                        printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> <em>automatic upgrade unavailable for this plugin</em>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version);
                    } else {
                        printf(__('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.', 'default'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&amp;plugin={$file}", 'upgrade-plugin_' . $file));
                    }
                }
                ?>
</div><?php 
            }
        }
        if (get_option('blog_public') != 1) {
            ?>
<div class="error"><p><?php 
            echo str_replace("%s", "options-privacy.php", __('Your blog is currently blocking search engines! Visit the <a href="%s">privacy settings</a> to change this.', 'sitemap'));
            ?>
</p></div><?php 
        }
        ?>

					<?php 
        if (!$snl) {
            ?>
						<div id="poststuff" class="metabox-holder has-right-sidebar">
开发者ID:songsanren,项目名称:My-blog,代码行数:67,代码来源:sitemap-ui.php

示例7: GetBackLink

 /**
  * Returns a link pointing back to the plugin page in WordPress
  *
  * @since 3.0
  * @return string The full url
  */
 public static function GetBackLink()
 {
     global $wp_version;
     $url = admin_url("options-general.php?page=" . GoogleSitemapGeneratorLoader::GetBaseName());
     //Some browser cache the page... great! So lets add some no caching params depending on the WP and plugin version
     $url .= '&sm_wpv=' . $wp_version . '&sm_pv=' . GoogleSitemapGeneratorLoader::GetVersion();
     return $url;
 }
开发者ID:rossbruniges,项目名称:content.thecssdiv.co.uk,代码行数:14,代码来源:sitemap-core.php

示例8: GetBackLink

 /**
  * Returns a link pointing back to the plugin page in NXTClass
  * 
  * @since 3.0
  * @return string The full url
  */
 function GetBackLink()
 {
     global $nxt_version;
     $url = '';
     //admin_url was added in nxt 2.6.0
     if (function_exists("admin_url")) {
         $url = admin_url("options-general.php?page=" . GoogleSitemapGeneratorLoader::GetBaseName());
     } else {
         $url = $_SERVER['PHP_SELF'] . "?page=" . GoogleSitemapGeneratorLoader::GetBaseName();
     }
     //Some browser cache the page... great! So lets add some no caching params depending on the nxt and plugin version
     $url .= '&sm_nxtv=' . $nxt_version . '&sm_pv=' . GoogleSitemapGeneratorLoader::GetVersion();
     return $url;
 }
开发者ID:nxtclass,项目名称:NXTClass-Plugin,代码行数:20,代码来源:sitemap-core.php

示例9: GetVersion

     */
    public static function GetVersion()
    {
        if (!isset($GLOBALS["sm_version"])) {
            if (!function_exists('get_plugin_data')) {
                if (file_exists(ABSPATH . 'wp-admin/includes/plugin.php')) {
                    require_once ABSPATH . 'wp-admin/includes/plugin.php';
                } else {
                    return "0.ERROR";
                }
            }
            $data = get_plugin_data(self::GetPluginFile(), false, false);
            $GLOBALS["sm_version"] = $data['Version'];
        }
        return $GLOBALS["sm_version"];
    }
    public static function GetSvnVersion()
    {
        return self::$svnVersion;
    }
}
//Enable the plugin for the init hook, but only if WP is loaded. Calling this php file directly will do nothing.
if (defined('ABSPATH') && defined('WPINC')) {
    add_action("init", array("GoogleSitemapGeneratorLoader", "Enable"), 15, 0);
    register_activation_hook(sm_GetInitFile(), array('GoogleSitemapGeneratorLoader', 'ActivatePlugin'));
    register_deactivation_hook(sm_GetInitFile(), array('GoogleSitemapGeneratorLoader', 'DeactivatePlugin'));
    //Set up hooks for adding permalinks, query vars.
    //Don't wait until init with this, since other plugins might flush the rewrite rules in init already...
    GoogleSitemapGeneratorLoader::SetupQueryVars();
    GoogleSitemapGeneratorLoader::SetupRewriteHooks();
}
开发者ID:rongandat,项目名称:best-picture,代码行数:31,代码来源:sitemap-loader.php

示例10: GetVersion

 /**
  * Returns the version of the generator
  *
  * @since 3.0
  * @access public
  * @author Arne Brachhold
  * @return int The version
  */
 function GetVersion()
 {
     return GoogleSitemapGeneratorLoader::GetVersion();
 }
开发者ID:SymbiSoft,项目名称:litprojects,代码行数:12,代码来源:sitemap-core.php

示例11: GetBackLink

 /**
  * Returns a link pointing back to the plugin page in WordPress
  * 
  * @since 3.0
  * @return string The full url
  */
 function GetBackLink()
 {
     //admin_url was added in WP 2.6.0
     if (function_exists("admin_url")) {
         return admin_url("options-general.php?page=" . GoogleSitemapGeneratorLoader::GetBaseName());
     } else {
         return $_SERVER['PHP_SELF'] . "?page=" . GoogleSitemapGeneratorLoader::GetBaseName();
     }
 }
开发者ID:alx,项目名称:douce-offensive,代码行数:15,代码来源:sitemap-core.php


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