本文整理匯總了PHP中rw_settings函數的典型用法代碼示例。如果您正苦於以下問題:PHP rw_settings函數的具體用法?PHP rw_settings怎麽用?PHP rw_settings使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了rw_settings函數的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: rw_get_js_url
rw.src = "<?php
echo rw_get_js_url('external.php');
?>
?wp=<?php
echo WP_RW__VERSION;
?>
";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(rw, s);
})();
}
</script>
</div>
<div class="submit" style="margin-top: 10px; padding: 0;">
<input type="hidden" name="<?php
echo rw_settings()->form_hidden_field_name;
?>
" value="Y">
<input type="hidden" id="rw_options_hidden" name="rw_options" value=""/>
<input type="submit" name="Submit" class="button-primary" value="<?php
echo esc_attr(__rw('save-changes'));
?>
"/>
<?php
if ($rw_fs->is_not_paying()) {
?>
<a href="<?php
echo $rw_fs->get_upgrade_url();
?>
"
示例2: rw_settings
<?php
$settings = rw_settings();
?>
<div class="wrap rw-dir-ltr">
<form id="rw_advanced_settings_form" method="post" action="">
<div id="poststuff">
<div id="rw_wp_set">
<div id="rw_identify_by" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_e('Visitor Identification Method', WP_RW__ID);
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius" style="padding: 5px; width: 610px;">
<div class="rw-ui-img-radio rw-ui-hor<?php
if ('laccount' === $settings->identify_by) {
echo ' rw-selected';
}
?>
">
<input type="radio" name="rw_identify_by" value="laccount" <?php
if ('laccount' === $settings->identify_by) {
echo ' checked="checked"';
}
?>
> <span><?php
_e('Identify visitor by Cookie / Device.', WP_RW__ID);
?>
</span>
示例3: ratingwidget
<?php
$bbpress_support = ratingwidget()->IsBBPressInstalled();
$is_accumulated = $bbpress_support ? rw_settings()->is_user_accumulated : false;
?>
<div id="rw_user_rating_type_settings" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_erw('rating-type');
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius">
<div class="rw-ui-img-radio rw-ui-hor<?php
if ($is_accumulated) {
echo ' rw-selected';
}
?>
"<?php
if (!$bbpress_support) {
echo ' data-alert="' . __rw('reputational-rating_pro-only-alert') . '"';
}
?>
>
<i class="rw-ui-sprite"></i> <input type="radio" name="rw_accumulated_user_rating"
value="true" <?php
if ($is_accumulated) {
echo ' checked="checked"';
}
?>
示例4: ucwords
<?php
$types = ucwords(str_replace("-", " ", rw_settings_rating_type()));
$type = substr($types, 0, strlen($types) - 1);
$availability = rw_settings()->availability;
?>
<div id="rw_availability_settings" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_e('User Availability Settings', WP_RW__ID);
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius">
<div class="rw-ui-img-radio rw-ui-hor<?php
if ($availability == 0) {
echo ' rw-selected';
}
?>
">
<i class="rw-ui-sprite rw-ui-availability-active"></i> <input type="radio" name="rw_availability" value="0" <?php
checked($availability, 0);
?>
> <span>Show active <?php
echo $types;
?>
ratings for all users.</span>
</div>
<div class="rw-ui-img-radio rw-ui-hor<?php
if ($availability == 1) {
echo ' rw-selected';
示例5: ucwords
<?php
$types = ucwords(str_replace('-', ' ', rw_settings_rating_type()));
$type = substr($types, 0, strlen($types) - 1);
function implode_or_empty($array)
{
if (is_string($array)) {
return $array;
}
if (!is_array($array)) {
return '';
}
return implode(',', $array);
}
$visibility = rw_settings()->visibility;
?>
<div id="rw_visibiliy_settings" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_erw('visibility_title');
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius">
<div class="rw-ui-img-radio rw-ui-hor<?php
if ($visibility->selected == 0) {
echo ' rw-selected';
}
?>
">
示例6: wp_enqueue_script
<?php
wp_enqueue_script('ace', WP_RW__PLUGIN_URL . 'resources/js/ace/ace.js');
$custom_settings = rw_settings()->custom_settings;
$custom_settings_enabled = rw_settings()->custom_settings_enabled;
?>
<style>
#rw_power_options label {
font-size: 13px;
font-weight: bold;
display: block;
margin: 5px;
}
</style>
<div id="rw_power_options" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_e('Power User Settings', WP_RW__ID);
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius">
<label><input id="rw_custom_settings_enabled" name="rw_custom_settings_enabled" type="checkbox" value="1"<?php
if ($custom_settings_enabled) {
echo ' checked="checked"';
}
?>
/> Activate / In-Activate</label>
<p>Here you can customize the ratings according to our <a href="<?php
rw_the_site_url('documentation');
?>
示例7: foreach
</option>
<?php
}
?>
</select>
<div style="display: none">
<input type="checkbox" name="rw_categories[]" value="-1" <?php
if ($all) {
echo ' checked="checked"';
}
?>
>
<?php
foreach ($all_categories as $category) {
$selected = $all || in_array($category->cat_ID, rw_settings()->categories);
?>
<input type="checkbox" name="rw_categories[]"
value="<?php
echo $category->cat_ID;
?>
" <?php
if ($selected) {
echo ' checked="checked"';
}
?>
>
<?php
}
?>
</div>
示例8: rw_options
function rw_options()
{
return rw_settings()->options;
}
示例9: _erw
<td><span class="rw-ui-def"><?php
_erw('language');
?>
:</span></td>
<td>
<select id="rw_lng_select" tabindex="1" name="rw_language" style="font-size: 12px;" onchange="RWM.Set.language(this.value);">
<?php
$language_str = isset(rw_settings()->language_str) ? rw_settings()->language_str : 'en';
foreach (rw_settings()->languages as $short => $long) {
echo '<option value="' . $short . '"' . ($short == $language_str ? ' selected="selected"' : '') . '>' . $long . '</option>';
}
?>
</select>
</td>
示例10: rw_settings
<?php
/**
* Comment Ratings Mode view file called by ratingwidget()->SettingsPage() method.
*
* Generates the HTML content for the Comment Ratings Mode section in WP admin dashboard > RatingWidget > Settings
* > Comments tab.
*/
$comment_ratings_mode = rw_settings()->comment_ratings_mode;
?>
<div id="rw_comment_rating_mode_settings" class="has-sidebar has-right-sidebar">
<div class="has-sidebar-content">
<div class="postbox rw-body">
<h3><?php
_erw('comment-ratings-mode');
?>
</h3>
<div class="inside rw-ui-content-container rw-no-radius">
<div class="rw-ui-img-radio rw-ui-hor<?php
if ('false' === $comment_ratings_mode) {
echo ' rw-selected';
}
?>
">
<i class="rw-ui-sprite"></i> <input type="radio" name="rw_comment_review_mode"
value="false" <?php
checked('false', $comment_ratings_mode);
?>
>
<span><?php