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


PHP RGForms::get_changelog方法代码示例

本文整理汇总了PHP中RGForms::get_changelog方法的典型用法代码示例。如果您正苦于以下问题:PHP RGForms::get_changelog方法的具体用法?PHP RGForms::get_changelog怎么用?PHP RGForms::get_changelog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RGForms的用法示例。


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

示例1: update_page

    public static function update_page()
    {
        if (!GFCommon::current_user_can_any('gravityforms_view_updates')) {
            wp_die(__("You don't have permissions to view this page", 'gravityforms'));
        }
        if (!GFCommon::ensure_wp_version()) {
            return;
        }
        GFCommon::cache_remote_message();
        echo GFCommon::get_remote_message();
        wp_print_styles(array('thickbox'));
        ?>

		<link rel="stylesheet" href="<?php 
        echo GFCommon::get_base_url() . '/css/admin.css';
        ?>
" />

		<div class="wrap <?php 
        echo GFCommon::get_browser_class();
        ?>
">
			<h2><?php 
        _e('Gravity Forms Updates', 'gravityforms');
        ?>
</h2>
			<?php 
        $version_info = GFCommon::get_version_info(false);
        do_action('gform_after_check_update');
        if (version_compare(GFCommon::$version, $version_info['version'], '<')) {
            $plugin_file = 'gravityforms/gravityforms.php';
            $upgrade_url = wp_nonce_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin_file), 'upgrade-plugin_' . $plugin_file);
            $message = __('There is a new version of Gravity Forms available.', 'gravityforms');
            if (rgar($version_info, 'is_valid_key')) {
                ?>
					<div class="gf_update_outdated alert_yellow">
						<?php 
                echo $message . ' ' . sprintf(__('<p>You can update to the latest version automatically or download the update and install it manually. %sUpdate Automatically%s %sDownload Update%s', 'gravityforms'), "</p><a class='button-primary' href='{$upgrade_url}'>", '</a>', "&nbsp;<a class='button' href='{$version_info["url"]}'>", '</a>');
                ?>
					</div>
				<?php 
            } else {
                ?>
					<div class="gf_update_expired alert_red">
						<?php 
                echo $message . ' ' . __(sprintf('%sRegister%s your copy of Gravity Forms to receive access to automatic updates and support. Need a license key? %sPurchase one now%s.', '<a href="admin.php?page=gf_settings">', '</a>', '<a href="http://www.gravityforms.com">', '</a>'), 'gravityforms');
                ?>
					</div>
				<?php 
            }
            echo '<br/><br/>';
            $changelog = RGForms::get_changelog();
            echo $changelog;
        } else {
            ?>
				<div class="gf_update_current alert_green">
					<?php 
            _e('Your version of Gravity Forms is up to date.', 'gravityforms');
            ?>
				</div>
			<?php 
        }
        do_action('gform_updates');
        ?>

			<div id='gform_upgrade_license' style="display:none;"></div>
			<script type="text/javascript">
				jQuery(document).ready(function () {
					jQuery.post(ajaxurl, {
							action            : "gf_upgrade_license",
							gf_upgrade_license: "<?php 
        echo wp_create_nonce('gf_upgrade_license');
        ?>
"},

						function (data) {
							if (data.trim().length > 0)
								jQuery("#gform_upgrade_license").replaceWith(data);
						}
					);
				});
			</script>
		</div>
	<?php 
    }
开发者ID:Nguyenkain,项目名称:strida.vn,代码行数:85,代码来源:update.php

示例2: update_page

    public static function update_page()
    {
        if (!GFCommon::current_user_can_any("gravityforms_view_updates")) {
            wp_die(__("You don't have permissions to view this page", "gravityforms"));
        }
        if (!GFCommon::ensure_wp_version()) {
            return;
        }
        GFCommon::cache_remote_message();
        echo GFCommon::get_remote_message();
        ?>

        <link rel="stylesheet" href="<?php 
        echo GFCommon::get_base_url() . "/css/admin.css";
        ?>
" />

        <div class="wrap">
        
        	<div class="icon32" id="gravity-update-icon"><br></div>
          <h2><?php 
        echo _e("Gravity Forms Updates", "gravityforms");
        ?>
</h2>
            <?php 
        $version_info = GFCommon::get_version_info(false);
        if (version_compare(GFCommon::$version, $version_info["version"], '<')) {
            $plugin_file = "gravityforms/gravityforms.php";
            $upgrade_url = wp_nonce_url('update.php?action=upgrade-plugin&amp;plugin=' . urlencode($plugin_file), 'upgrade-plugin_' . $plugin_file);
            $message = __("There is a new version of Gravity Forms available.", "gravityforms");
            if ($version_info["is_valid_key"]) {
                ?>
                    <div class="gf_update_outdated alert_yellow">
                        <?php 
                echo $message . " " . sprintf(__("<p>You can update to the latest version automatically or download the update and install it manually. %sUpdate Automatically%s %sDownload Update%s", "gravityforms"), "</p><a class='button-primary' href='{$upgrade_url}'>", "</a>", "&nbsp;<a class='button' href='{$version_info["url"]}'>", "</a>");
                ?>
                    </div>
                    <?php 
            } else {
                ?>
                    <div class="gf_update_expired alert_red">
                        <?php 
                echo $message . " " . __('<a href="admin.php?page=gf_settings">Register</a> your copy of Gravity Forms to receive access to automatic updates and support. Need a license key? <a href="http://www.gravityforms.com">Purchase one now</a>.', 'gravityforms');
                ?>
                    </div>
                    <?php 
            }
            echo "<br/><br/>";
            $changelog = RGForms::get_changelog();
            echo $changelog;
        } else {
            ?>
                <div class="gf_update_current alert_green">
                    <?php 
            _e("Your version of Gravity Forms is up to date.", "gravityforms");
            ?>
                </div>
                <?php 
        }
        ?>

            <div id='gform_upgrade_license' style="display:none;"></div>
              <script type="text/javascript">
                jQuery(document).ready(function(){
                    jQuery.post(ajaxurl,{
                            action:"gf_upgrade_license",
                            gf_upgrade_license: "<?php 
        echo wp_create_nonce("gf_upgrade_license");
        ?>
",
                            cookie: encodeURIComponent(document.cookie)},

                            function(data){
                                if(data.trim().length > 0)
                                    jQuery("#gform_upgrade_license").replaceWith(data);
                            }
                    );
                });
              </script>
            </div>
        <?php 
    }
开发者ID:Blueprint-Marketing,项目名称:interoccupy.net,代码行数:82,代码来源:update.php


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