本文整理汇总了PHP中dsq_is_installed函数的典型用法代码示例。如果您正苦于以下问题:PHP dsq_is_installed函数的具体用法?PHP dsq_is_installed怎么用?PHP dsq_is_installed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dsq_is_installed函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dsq_comments_template
function dsq_comments_template($value)
{
global $EMBED;
global $post;
global $comments;
if (!(is_singular() && (have_comments() || 'open' == $post->comment_status))) {
return;
}
if (!dsq_is_installed() || !dsq_can_replace()) {
return $value;
}
// TODO: If a disqus-comments.php is found in the current template's
// path, use that instead of the default bundled comments.php
//return TEMPLATEPATH . '/disqus-comments.php';
$EMBED = true;
if (dcl_check_shortcode('js-disqus') || 'open' !== $post->comment_status) {
return dirname(__FILE__) . '/../public/dcl-empty.php';
} else {
return dirname(__FILE__) . '/../public/dcl-comments.php';
}
}
示例2: get_option
/admin/moderate/<?php
echo get_option('disqus_forum_url');
?>
/?template=wordpress" style="width: 100%; height: 800px"></iframe>
</div>
<?php
}
?>
</div>
<?php
$dsq_replace = get_option('disqus_replace');
$dsq_forum_url = strtolower(get_option('disqus_forum_url'));
$dsq_api_key = get_option('disqus_api_key');
$dsq_cc_fix = get_option('disqus_cc_fix');
if (dsq_is_installed()) {
$dsq_last_import_id = get_option('disqus_last_import_id');
$dsq_import_status = $dsq_api->get_import_status($dsq_last_import_id);
}
?>
<!-- Advanced options -->
<div id="dsq-advanced" class="dsq-content" style="display:none;">
<h2>Advanced Options</h2>
Version: <?php
echo $dsq_version;
if (function_exists('curl_init')) {
echo ' (Using cURL libraries.)';
} else {
if (ini_get('allow_url_fopen') && function_exists('stream_get_contents')) {
echo ' (Using fopen.)';
} else {
示例3: dsq_manage_dialog
$dsq_user_api_key = $dsq_api->get_user_api_key($_POST['dsq_username'], $_POST['dsq_password']);
if (!$dsq_user_api_key) {
$step = 1;
dsq_manage_dialog($dsq_api->get_last_error(), true);
}
$dsq_sites = $dsq_api->get_forum_list($dsq_user_api_key);
if ($dsq_sites < 0) {
$step = 1;
dsq_manage_dialog($dsq_api->get_last_error(), true);
}
}
?>
<div class="wrap" id="dsq-wrap">
<ul id="dsq-tabs">
<li class="selected" id="dsq-tab-main" rel="dsq-main"><?php
echo dsq_is_installed() ? 'Manage' : 'Install';
?>
</li>
<li id="dsq-tab-advanced" rel="dsq-advanced"><?php
echo dsq_i('Advanced Options');
?>
</li>
</ul>
<div id="dsq-main" class="dsq-content">
<?php
switch ($step) {
case 2:
?>
<div id="dsq-step-2" class="dsq-main">
<h2><?php
示例4: wp_get_theme
$theme = wp_get_theme();
echo esc_html($theme->Name . ' ' . $theme->Version);
}
?>
URLOpen Method: <?php
echo esc_html(dsq_url_method());
?>
Plugin Version: <?php
echo esc_html(DISQUS_VERSION);
?>
Settings:
dsq_is_installed: <?php
echo esc_html(dsq_is_installed() . '\\n');
foreach (dsq_options() as $opt) {
echo esc_html($opt . ': ' . get_option($opt) . '\\n');
}
?>
Plugins:
<?php
foreach (get_plugins() as $key => $plugin) {
$isactive = '';
if (is_plugin_active($key)) {
$isactive = '(active)';
}
echo esc_html($plugin['Name'] . ' ' . $plugin['Version'] . ' ' . $isactive . '\\n');
}
?>
示例5: dsq_plugin_action_links
function dsq_plugin_action_links($links, $file)
{
$plugin_file = basename(__FILE__);
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="edit-comments.php?page=disqus#adv">' . dsq_i('Settings') . '</a>';
}
array_unshift($links, $settings_link);
}
return $links;
}
示例6: wp_get_theme
$theme = wp_get_theme();
echo esc_html($theme->Name . ' ' . $theme->Version);
}
?>
URLOpen Method: <?php
echo esc_html(dsq_url_method());
?>
Plugin Version: <?php
echo esc_html(DISQUS_VERSION);
?>
Settings:
dsq_is_installed: <?php
echo esc_html(dsq_is_installed());
foreach (dsq_options() as $opt) {
echo esc_html($opt . ': ' . get_option($opt) . "\n");
}
?>
Plugins:
<?php
foreach (get_plugins() as $key => $plugin) {
$isactive = "";
if (is_plugin_active($key)) {
$isactive = "(active)";
}
echo esc_html($plugin['Name'] . ' ' . $plugin['Version'] . ' ' . $isactive . "\n");
}
?>
示例7: get_theme
Active Theme: <?php
$theme = get_theme(get_current_theme());
echo $theme['Name'] . ' ' . $theme['Version'];
?>
URLOpen Method: <?php
echo dsq_url_method();
?>
Plugin Version: <?php
echo DISQUS_VERSION;
?>
Settings:
dsq_is_installed: <?php
echo dsq_is_installed();
?>
<?php
foreach (dsq_options() as $opt) {
echo $opt . ': ' . get_option($opt) . "\n";
}
?>
Plugins:
<?php
foreach (get_plugins() as $key => $plugin) {
$isactive = "";
if (is_plugin_active($key)) {
$isactive = "(active)";
示例8: tc_disqus_comments_enabled
function tc_disqus_comments_enabled()
{
return function_exists('dsq_is_installed') && function_exists('dsq_can_replace') && dsq_is_installed() && dsq_can_replace();
}
示例9: dsq_warning
function dsq_warning()
{
if (!get_option('disqus_forum_url') && !isset($_POST['forum_url']) && isset($_POST['page']) && $_GET['page'] != 'disqus') {
dsq_manage_dialog('You must <a href="edit-comments.php?page=disqus">configure the plugin</a> to enable Disqus Comments.', true);
}
if (!dsq_is_installed() && isset($_POST['page']) && $_GET['page'] == 'disqus') {
dsq_manage_dialog('Disqus Comments has not yet been configured. (<a href="edit-comments.php?page=disqus">Click here to configure</a>)');
}
}
示例10: 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;
}
示例11: get_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();
echo esc_html( $theme->Name . ' ' . $theme->Version );
}
?>
URLOpen Method: <?php echo esc_html( dsq_url_method() ); ?>
Plugin Version: <?php echo esc_html( DISQUS_VERSION ); ?>
Settings:
dsq_is_installed: <?php echo esc_html( dsq_is_installed() ); ?>
<?php foreach (dsq_options() as $opt) {
echo esc_html( $opt.': '.get_option($opt)."\n" );
}
?>
Plugins:
<?php
foreach (get_plugins() as $key => $plugin) {
$isactive = "";
if (is_plugin_active($key)) {
$isactive = "(active)";
}
echo esc_html( $plugin['Name'].' '.$plugin['Version'].' '.$isactive."\n" );
}
?>