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


PHP dsq_i函数代码示例

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


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

示例1: dsq_pre_comment_on_post

/**
* Disable internal Wordpress commenting if Disqus is enabled - this prevents spam bots from
* commenting using POST requests to /wp-comments-post.php.
*
* @param int $comment_post_ID
* @return int
*/
function dsq_pre_comment_on_post($comment_post_ID)
{
    if (dsq_can_replace()) {
        wp_die(dsq_i('Sorry, the built-in commenting system is disabled because Disqus is active.'));
    }
    return $comment_post_ID;
}
开发者ID:VizualAbstract,项目名称:Marilyn,代码行数:14,代码来源:disqus.php

示例2: confirm

						<input type="submit" value="Uninstall" name="uninstall" onclick="return confirm('<?php 
echo dsq_i('Are you sure you want to uninstall Disqus?');
?>
')" class="button" />
					</form>
				</td>
			</tr>
			
		</table>
		<br/>
		<h3><?php 
echo dsq_i('Debug Information');
?>
</h3>
		<p><?php 
echo dsq_i('Having problems with the plugin? <a href="%s">Drop us a line</a> and include the following details and we\'ll do what we can.', 'mailto:help+wp@disqus.com');
?>
</p>
		<textarea style="width:90%; height:200px;">URL: <?php 
echo get_option('siteurl');
?>
 
Version: <?php 
echo esc_html($wp_version);
?>

Plugin Version: <?php 
echo esc_html($dsq_version);
?>
Forum Shortname: <?php 
echo esc_html(get_option('disqus_forum_url'));
开发者ID:gopinathshiva,项目名称:wordpress-vip-plugins,代码行数:31,代码来源:manage.php

示例3: dsq_i

</h3>
        <p>
            <?php 
echo dsq_i('Having problems with the plugin? Check out our troubleshooting documentation.');
?>
&nbsp;
            <a href="https://help.disqus.com/customer/portal/articles/472005" target="_blank"><?php 
echo dsq_i('WordPress troubleshooting ocumentation');
?>
</a>
            <?php 
echo dsq_i('You can also email us and include the debug info below.');
?>
&nbsp;
            <a href="mailto:help+wp@disqus.com"><?php 
echo dsq_i('Contact support');
?>
</a>
        </p>
        <textarea style="width:90%; height:200px;">
URL: <?php 
echo esc_url(get_option('siteurl'));
?>

PHP Version: <?php 
echo esc_html(phpversion());
?>

Version: <?php 
echo esc_html($wp_version);
?>
开发者ID:coreymargulis,项目名称:karenmargulis,代码行数:31,代码来源:manage.php

示例4: confirm

                        <p><input type="submit" value="Uninstall" name="uninstall" onclick="return confirm('<?php 
echo dsq_i('Are you sure you want to uninstall Disqus?');
?>
')" class="button" /> This will remove all Disqus specific settings, but it will leave your comments unaffected.</p>
                        NOTE: If you have problems with uninstallation taking too long you may wish to manually drop the <code>disqus_dupecheck</code> index from your <code>commentmeta</code> table.
                    </form>
                </td>
            </tr>
        </table>
        <br/>
        <h3><?php 
echo dsq_i('Debug Information');
?>
</h3>
        <p><?php 
echo dsq_i('Having problems with the plugin? Check out our <a href="%s" onclick="window.open(this.href); return false">WordPress Troubleshooting</a> documentation. You can also <a href="%s">drop us a line</a> including the following details and we\'ll do what we can.', 'http://docs.disqus.com/help/87/', 'mailto:help+wp@disqus.com');
?>
</p>
        <textarea style="width:90%; height:200px;">URL: <?php 
echo get_option('siteurl');
?>
PHP Version: <?php 
echo phpversion();
?>
Version: <?php 
echo $wp_version;
?>
Active Theme: <?php 
$theme = get_theme(get_current_theme());
echo $theme['Name'] . ' ' . $theme['Version'];
?>
开发者ID:hscale,项目名称:webento,代码行数:31,代码来源:manage.php

示例5: isset

<?php

require ABSPATH . 'wp-includes/version.php';
if (!current_user_can('manage_options')) {
    die;
}
$step = isset($_GET['step']) ? $_GET['step'] : null;
?>
<div class="wrap">
    <h2><?php 
echo dsq_i('Upgrade Disqus Comments');
?>
</h2>
    <form method="POST" action="?page=disqus&amp;step=<?php 
echo $step;
?>
">
        <p><?php 
echo dsq_i('You need to upgrade your database to continue.');
?>
</p>

        <p class="submit" style="text-align: left">
            <input type="submit" name="upgrade" value="Upgrade &raquo;" />
        </p>
    </form>
</div>
开发者ID:shahadat014,项目名称:geleyi,代码行数:27,代码来源:upgrade.php

示例6: dsq_request_handler

function dsq_request_handler()
{
    global $dsq_response;
    global $dsq_api;
    global $post;
    global $wpdb;
    if (!empty($_GET['cf_action'])) {
        switch ($_GET['cf_action']) {
            case 'sync_comments':
                if (!($post_id = $_GET['post_id'])) {
                    header("HTTP/1.0 400 Bad Request");
                    die;
                }
                // schedule the event for 5 minutes from now in case they
                // happen to make a quick post
                $post_ids = dsq_get_pending_post_ids();
                if (!in_array($post_id, $post_ids)) {
                    $post_ids[] = $post_id;
                    update_option('_disqus_sync_post_ids', $post_ids);
                }
                if (DISQUS_DEBUG) {
                    dsq_sync_post($post_id);
                    $response = dsq_sync_forum();
                    if (!$response) {
                        die('// error: ' . $dsq_api->get_last_error());
                    } else {
                        list($last_comment_id, $comments) = $response;
                        die('// synced ' . $comments . ' comments');
                    }
                } else {
                    $ts = time() + 300;
                    wp_schedule_single_event($ts, 'dsq_sync_forum');
                    die('// sync scheduled');
                }
                break;
            case 'export_comments':
                if (current_user_can('manage_options') && DISQUS_CAN_EXPORT) {
                    $timestamp = intval($_GET['timestamp']);
                    $post_id = intval($_GET['post_id']);
                    global $wpdb, $dsq_api;
                    $post = $wpdb->get_results($wpdb->prepare("\n                        SELECT *\n                        FROM {$wpdb->posts}\n                        WHERE post_type != 'revision'\n                        AND post_status = 'publish'\n                        AND comment_count > 0\n                        AND ID > %d\n                        ORDER BY ID ASC\n                        LIMIT 1\n                    ", $post_id));
                    $post = $post[0];
                    $post_id = $post->ID;
                    $max_post_id = $wpdb->get_var($wpdb->prepare("\n                        SELECT MAX(ID)\n                        FROM {$wpdb->posts}\n                        WHERE post_type != 'revision'\n                        AND post_status = 'publish'\n                        AND comment_count > 0\n                    ", $post_id));
                    $eof = (int) ($post_id == $max_post_id);
                    if ($eof) {
                        $status = 'complete';
                        $msg = 'Your comments have been sent to Disqus and queued for import!<br/><a href="' . DISQUS_IMPORTER_URL . '" target="_blank">See the status of your import at Disqus</a>';
                    } else {
                        $status = 'partial';
                        $msg = dsq_i('Processed comments on post #%s&hellip;', $post_id);
                    }
                    $result = 'fail';
                    $response = null;
                    if ($post) {
                        require_once dirname(__FILE__) . '/export.php';
                        $wxr = dsq_export_wp($post);
                        $response = $dsq_api->import_wordpress_comments($wxr, $timestamp, $eof);
                        if (!($response['group_id'] > 0)) {
                            $result = 'fail';
                            $msg = '<p class="status dsq-export-fail">' . dsq_i('Sorry, something unexpected happened with the export. Please <a href="#" id="dsq_export_retry">try again</a></p><p>If your API key has changed, you may need to reinstall Disqus (deactivate the plugin and then reactivate it). If you are still having issues, refer to the <a href="%s" onclick="window.open(this.href); return false">WordPress help page</a>.', 'http://disqus.com/help/wordpress') . '</p>';
                            $response = $dsq_api->get_last_error();
                        } else {
                            if ($eof) {
                                $msg = dsq_i('Your comments have been sent to Disqus and queued for import!<br/><a href="%s" target="_blank">See the status of your import at Disqus</a>', $response['link']);
                            }
                            $result = 'success';
                        }
                    }
                    // send AJAX response
                    $response = compact('result', 'timestamp', 'status', 'post_id', 'msg', 'eof', 'response');
                    header('Content-type: text/javascript');
                    echo cf_json_encode($response);
                    die;
                }
                break;
            case 'import_comments':
                if (current_user_can('manage_options')) {
                    if (!isset($_GET['last_comment_id'])) {
                        $last_comment_id = false;
                    } else {
                        $last_comment_id = $_GET['last_comment_id'];
                    }
                    $force = $_GET['force'] == '1';
                    if ($_GET['wipe'] == '1') {
                        $wpdb->query("DELETE FROM `" . $wpdb->prefix . "commentmeta` WHERE meta_key IN ('dsq_post_id', 'dsq_parent_post_id')");
                        $wpdb->query("DELETE FROM `" . $wpdb->prefix . "comments` WHERE comment_agent LIKE 'Disqus/%%'");
                    }
                    ob_start();
                    $response = dsq_sync_forum($last_comment_id, $force);
                    $debug = ob_get_clean();
                    if (!$response) {
                        $status = 'error';
                        $result = 'fail';
                        $error = $dsq_api->get_last_error();
                        $msg = '<p class="status dsq-export-fail">' . dsq_i('There was an error downloading your comments from Disqus.') . '<br/>' . htmlspecialchars($error) . '</p>';
                    } else {
                        list($comments, $last_comment_id) = $response;
                        if (!$comments) {
                            $status = 'complete';
//.........这里部分代码省略.........
开发者ID:revathskumar,项目名称:Coderepo,代码行数:101,代码来源:disqus.php

示例7: previous_comments_link

<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        // Are there comments to navigate through?
        ?>

            <div class="navigation">
                <div class="nav-previous">
                    <span class="meta-nav">&larr;</span>
                    &nbsp;<?php 
        previous_comments_link(dsq_i('Older Comments'));
        ?>

                </div>
                <div class="nav-next">
                    <?php 
        next_comments_link(dsq_i('Newer Comments'));
        ?>

                    &nbsp;<span class="meta-nav">&rarr;</span>
                </div>
            </div><!-- .navigation -->
<?php 
    }
    // check for comment navigation
    ?>


        </div>

    <?php 
}
开发者ID:wiratama,项目名称:gardenbal,代码行数:31,代码来源:comments.php

示例8: dcl_plugin_action_links

 /**
  * Custom Plugin Action Link.
  *
  * Function to add a quick link to DCL, when being listed on your
  * plugins list view.
  *
  * @since    1.0.0
  * @return	$links		Links to display.
  * @author	Joel James
  */
 public function dcl_plugin_action_links($links, $file)
 {
     $plugin_file = basename('disqus-conditional-load.php');
     if (basename($file) == $plugin_file) {
         if (!dsq_is_installed()) {
             $settings_link = '<a href="edit-comments.php?page=disqus">' . dsq_i('Configure') . '</a>';
         } else {
             $settings_link = '<a href="admin.php?page=dcl-settings">' . dsq_i('Settings') . '</a>';
         }
         array_unshift($links, $settings_link);
     }
     return $links;
 }
开发者ID:VizualAbstract,项目名称:Marilyn,代码行数:23,代码来源:class-dcl-admin.php

示例9: wp_list_comments

     */
    wp_list_comments(array('callback' => 'dsq_comment'));
    ?>
            </ul>

<?php 
    if (get_comment_pages_count() > 1 && get_option('page_comments')) {
        // Are there comments to navigate through?
        ?>
            <div class="navigation">
                <div class="nav-previous"><?php 
        previous_comments_link(dsq_i('<span class="meta-nav">&larr;</span> Older Comments'));
        ?>
</div>
                <div class="nav-next"><?php 
        next_comments_link(dsq_i('Newer Comments <span class="meta-nav">&rarr;</span>'));
        ?>
</div>
            </div><!-- .navigation -->
<?php 
    }
    // check for comment navigation
    ?>

        </div>

    <?php 
}
?>
</div>
开发者ID:bidhanbaral,项目名称:fotodep_store,代码行数:30,代码来源:comments.php

示例10: dsq_plugin_action_links

function dsq_plugin_action_links($links, $file)
{
    $plugin_file = basename(__FILE__);
    if (basename($file) == $plugin_file) {
        $settings_link = '<a href="edit-comments.php?page=disqus#adv">' . dsq_i('Settings') . '</a>';
        array_unshift($links, $settings_link);
    }
    return $links;
}
开发者ID:hscale,项目名称:webento,代码行数:9,代码来源:disqus.php

示例11: dsq_i

</p>
                        <?php 
echo dsq_i('If you have problems with resetting taking too long you may wish to first manually drop the <code>disqus_dupecheck</code> index from your <code>commentmeta</code> table.');
?>
                    </form>
                </td>
            </tr>
        </table>
        <br/>

        <h3><?php 
echo dsq_i('Debug Information');
?>
</h3>
        <p><?php 
echo dsq_i('Having problems with the plugin? Check out our <a href="%s" onclick="window.open(this.href); return false">WordPress Troubleshooting</a> documentation. You can also <a href="%s">drop us a line</a> including the following details and we\'ll do what we can.', 'https://help.disqus.com/customer/portal/articles/472005-wordpress-troubleshooting', 'mailto:help+wp@disqus.com');
?>
</p>
        <textarea style="width:90%; height:200px;">
URL: <?php 
echo esc_attr(get_option('siteurl'));
?>

PHP Version: <?php 
echo phpversion();
?>

Version: <?php 
echo $wp_version;
?>
开发者ID:denis-chmel,项目名称:wordpress,代码行数:30,代码来源:manage.php

示例12: wp_nonce_field

        <?php wp_nonce_field('dsq-wpnonce_upgrade', 'dsq-form_nonce_upgrade'); ?>
        <p><?php echo dsq_i('You need to upgrade your database to continue.'); ?></p>

        <p class="submit" style="text-align: left">
            <input type="submit" name="upgrade" class="button-primary button" value="Upgrade &raquo;" />
        </p>
    </form>
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
=======
<?php
require(ABSPATH . 'wp-includes/version.php');

if ( !current_user_can('manage_options') ) {
    die();
}

$step = (isset($_GET['step']) ? $_GET['step'] : null);

?>
<div class="wrap">
    <h2><?php echo dsq_i('Upgrade Disqus Comments'); ?></h2>
    <form method="POST" action="?page=disqus&amp;step=<?php echo esc_attr($step); ?>">
        <?php wp_nonce_field('dsq-wpnonce_upgrade', 'dsq-form_nonce_upgrade'); ?>
        <p><?php echo dsq_i('You need to upgrade your database to continue.'); ?></p>

        <p class="submit" style="text-align: left">
            <input type="submit" name="upgrade" class="button-primary button" value="Upgrade &raquo;" />
        </p>
    </form>
>>>>>>> b875702c9c06ab5012e52ff4337439b03918f453
</div>
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:31,代码来源:upgrade.php

示例13: confirm

                            <input type="submit" value="Reset" name="reset" onclick="return confirm('<?php echo dsq_i('Are you sure you want to reset the Disqus plugin?'); ?>')" class="button" /> 
                            <?php echo dsq_i('This removes all Disqus-specific settings. Comments will remain unaffected.') ?>
                        </p>
                        <?php echo dsq_i('If you have problems with resetting taking too long you may wish to first manually drop the \'disqus_dupecheck\' index from your \'commentmeta\' table.') ?>
                    </form>
                </td>
            </tr>
        </table>
        <br/>

        <h3><?php echo dsq_i('Debug Information'); ?></h3>
        <p>
            <?php echo dsq_i('Having problems with the plugin? Check out our troubleshooting documentation.'); ?>&nbsp;
            <a href="https://help.disqus.com/customer/portal/articles/472005" target="_blank"><?php echo dsq_i('WordPress troubleshooting ocumentation'); ?></a>
            <?php echo dsq_i('You can also email us and include the debug info below.'); ?>&nbsp;
            <a href="mailto:help+wp@disqus.com"><?php echo dsq_i('Contact support'); ?></a>
        </p>
        <textarea style="width:90%; height:200px;">
URL: <?php echo esc_url( get_option('siteurl') ); ?>

PHP Version: <?php echo esc_html( phpversion() ); ?>

Version: <?php echo esc_html( $wp_version ); ?>

Active Theme: 
<?php
if ( !function_exists('wp_get_theme') ) {
    $theme = get_theme(get_current_theme());
    echo esc_html( $theme['Name'] . ' ' . $theme['Version'] );
} else {
    $theme = wp_get_theme();
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:31,代码来源:manage.php

示例14: dsq_i

<?php

require ABSPATH . 'wp-includes/version.php';
if (!current_user_can('manage_options')) {
    die;
}
?>
<div class="wrap">
	<h2><?php 
echo dsq_i('Upgrade Disqus Comments');
?>
</h2>
	<form method="POST" action="?page=disqus&amp;step=<?php 
echo $_GET['step'];
?>
">
		<p>You need to upgrade your database to continue.</p>

		<p class="submit" style="text-align: left">
			<input type="submit" name="upgrade" value="Upgrade &raquo;" />
		</p>
	</form>
</div>
开发者ID:Three20,项目名称:Backend,代码行数:23,代码来源:upgrade.php


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