本文整理汇总了PHP中FLBuilderModel::get_global_templates_editing_capability方法的典型用法代码示例。如果您正苦于以下问题:PHP FLBuilderModel::get_global_templates_editing_capability方法的具体用法?PHP FLBuilderModel::get_global_templates_editing_capability怎么用?PHP FLBuilderModel::get_global_templates_editing_capability使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FLBuilderModel
的用法示例。
在下文中一共展示了FLBuilderModel::get_global_templates_editing_capability方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render_content_classes
/**
* Renders the CSS classes for the main content div tag.
*
* @since 1.6.4
* @return string
*/
public static function render_content_classes()
{
// Build the content class.
$classes = 'fl-builder-content fl-builder-content-' . FLBuilderModel::get_post_id();
// Add template classes to the content class.
if (FLBuilderModel::is_post_user_template()) {
$classes .= ' fl-builder-template';
$classes .= ' fl-builder-' . FLBuilderModel::get_user_template_type() . '-template';
}
// Add the global templates locked class.
if (!current_user_can(FLBuilderModel::get_global_templates_editing_capability())) {
$classes .= ' fl-builder-global-templates-locked';
}
// Add browser specific classes.
if (isset($_SERVER['HTTP_USER_AGENT'])) {
if (stristr($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0') && stristr($_SERVER['HTTP_USER_AGENT'], 'rv:11.0')) {
$classes .= ' fl-builder-ie-11';
}
}
return $classes;
}
示例2: _e
?>
" class="regular-text" />
<?php
if (file_exists(FL_BUILDER_DIR . 'includes/node-template-settings.php')) {
?>
<h4><?php
_e('Global Templates Editing Capability', 'fl-builder');
?>
</h4>
<p><?php
printf(__('Set the <a%s>capability</a> required for users to global templates.', 'fl-builder'), ' href="http://codex.wordpress.org/Roles_and_Capabilities#Capability_vs._Role_Table" target="_blank"');
?>
</p>
<input type="text" name="fl-global-templates-editing-capability" value="<?php
echo esc_html(FLBuilderModel::get_global_templates_editing_capability());
?>
" class="regular-text" />
<?php
}
?>
</div>
<p class="submit">
<input type="submit" name="update" class="button-primary" value="<?php
esc_attr_e('Save Editing Settings', 'fl-builder');
?>
" />
<?php
wp_nonce_field('editing', 'fl-editing-nonce');
?>
示例3:
} else {
echo 'false';
}
?>
,
upgradeUrl: '<?php
if (FL_BUILDER_LITE === true) {
$campaign = 'upgrade-button';
} else {
$campaign = 'buy-button';
}
echo FLBuilderModel::get_upgrade_url(array('utm_source' => 'external', 'utm_medium' => 'builder', 'utm_campaign' => $campaign));
?>
',
userCanEditGlobalTemplates: <?php
if (current_user_can(FLBuilderModel::get_global_templates_editing_capability())) {
echo 'true';
} else {
echo 'false';
}
?>
,
userTemplateType: '<?php
echo FLBuilderModel::get_user_template_type();
?>
'
};
var FLBuilderStrings = {
actionsLightboxTitle: '<?php
esc_attr_e('What would you like to do?', 'fl-builder');