本文整理汇总了PHP中wp_kses_decode_entities函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_kses_decode_entities函数的具体用法?PHP wp_kses_decode_entities怎么用?PHP wp_kses_decode_entities使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_kses_decode_entities函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: js_vars
static function js_vars()
{
$step_statuses = get_option(self::STEP_STATUS_KEY, array());
$started = get_option(self::STARTED_KEY, false);
$jetpack_config = array();
if (class_exists('Jetpack')) {
$jetpack_config = array('plugin_active' => true, 'configured' => Jetpack::is_active(), 'logo_url' => plugins_url('jetpack/images/jetpack-logo.png'), 'jumpstart_modules' => array_values(self::jumpstart_modules()), 'additional_modules' => array(), 'active_modules' => array_values(Jetpack::init()->get_active_modules()));
} else {
$jetpack_config = array('plugin_active' => false, 'configured' => false, 'logo_url' => '', 'jumpstart_modules' => array(), 'additional_modules' => array(), 'active_modules' => array());
}
// set the jetpack step status to "completed" if jetpack is active
if ($jetpack_config['configured']) {
$step_statuses['jetpack'] = array('completed' => true);
}
if (get_option('show_on_front') == 'page') {
if (get_option('page_for_posts') == 0 || get_option('page_for_posts') == null) {
$layout = 'website';
} else {
$layout = 'site-blog';
}
} else {
$layout = 'blog';
}
$themes = array_slice(array_map(array(__CLASS__, 'normalize_installed_theme'), wp_prepare_themes_for_js()), 0, self::MAX_THEMES);
return array('base_url' => JETPACK_START_BASE_URL, 'nonce' => wp_create_nonce(Jetpack_Start_EndPoints::AJAX_NONCE), 'debug' => WP_DEBUG ? true : false, 'bloginfo' => array('name' => wp_kses_decode_entities(stripslashes(get_bloginfo('name'))), 'description' => wp_kses_decode_entities(stripslashes(get_bloginfo('description')))), 'site_actions' => array('set_title' => 'jps_set_title', 'set_layout' => 'jps_set_layout', 'set_theme' => 'jps_set_theme', 'install_theme' => 'jps_install_theme', 'get_popular_themes' => 'jps_get_popular_themes', 'configure_jetpack' => 'jps_configure_jetpack', 'activate_jetpack_modules' => 'jps_activate_jetpack_modules', 'deactivate_jetpack_modules' => 'jps_deactivate_jetpack_modules', 'list_jetpack_modules' => 'jps_list_jetpack_modules', 'reset_data' => 'jps_reset_data'), 'step_actions' => array('start' => 'jps_started', 'view' => 'jps_step_view', 'skip' => 'jps_step_skip', 'complete' => 'jps_step_complete'), 'jetpack' => $jetpack_config, 'themes' => $themes, 'started' => $started, 'step_status' => $step_statuses, 'steps' => array('layout' => array('current' => $layout), 'advanced_settings' => array('jetpack_modules_url' => admin_url('admin.php?page=jetpack_modules'), 'widgets_url' => admin_url('widgets.php'), 'themes_url' => admin_url('themes.php'), 'plugins_url' => admin_url('plugins.php'), 'customize_url' => wp_customize_url(), 'new_blog_post_url' => admin_url('post-new.php'), 'manage_posts_url' => admin_url('edit.php'), 'new_page_url' => admin_url('post-new.php?post_type=page'), 'manage_pages_url' => admin_url('edit.php?post_type=page'))));
}
开发者ID:apennell,项目名称:static_portfolio,代码行数:26,代码来源:class.jetpack-start-end-points.php
示例2: link_to_code_get_meta
/**
* Generated by the WordPress Meta Box generator
* at http://jeremyhixon.com/wp-tools/meta-box/
*/
function link_to_code_get_meta($value)
{
global $post;
$field = get_post_meta($post->ID, $value, true);
if (!empty($field)) {
return is_array($field) ? stripslashes_deep($field) : stripslashes(wp_kses_decode_entities($field));
} else {
return false;
}
}
开发者ID:CityOfPrescott,项目名称:tabula-rasa_city-of-prescott,代码行数:14,代码来源:code.php
示例3: genesis_get_custom_field
function genesis_get_custom_field($field)
{
global $post;
$custom_field = get_post_meta($post->ID, $field, true);
if ($custom_field) {
// sanitize and return the value of the custom field
return wp_kses_stripslashes(wp_kses_decode_entities($custom_field));
} else {
// return FALSE if custom field is empty
return FALSE;
}
}
开发者ID:Weissenberger13,项目名称:web.portugalrentalcottages,代码行数:12,代码来源:general_functions.php
示例4: etheme_get_custom_field
/**
* undocumented
*/
function etheme_get_custom_field($field)
{
global $post;
if (null === $post) {
return FALSE;
}
$custom_field = get_post_meta($post->ID, $field, true);
if ($custom_field) {
return stripslashes(wp_kses_decode_entities($custom_field));
} else {
return FALSE;
}
}
开发者ID:phanhoanglong2610,项目名称:flowershop,代码行数:16,代码来源:options.php
示例5: simplehooks_get_option
/**
* Pull an Simple Hooks option from the database, return value
*
* @since 0.1
*/
function simplehooks_get_option($hook = null, $field = null, $all = false)
{
static $options = array();
$options = $options ? $options : get_option(SIMPLEHOOKS_SETTINGS_FIELD);
if ($all) {
return $options;
}
if (!array_key_exists($hook, (array) $options)) {
return '';
}
$option = isset($options[$hook][$field]) ? $options[$hook][$field] : '';
return wp_kses_stripslashes(wp_kses_decode_entities($option));
}
开发者ID:nkeat12,项目名称:dv,代码行数:18,代码来源:functions.php
示例6: get
public static function get($value, $id = null)
{
if (empty($id)) {
global $post;
$id = $post->ID;
}
$custom_field = get_post_meta($id, $value, true);
if (!empty($custom_field)) {
return is_array($custom_field) ? stripslashes_deep($custom_field) : stripslashes(wp_kses_decode_entities($custom_field));
} else {
return false;
}
}
开发者ID:escobar022,项目名称:woocommerce-pay-per-post,代码行数:13,代码来源:woocommerce-payperpost.php
示例7: aaron_get_meta
/**
* Thanks to http://jeremyhixon.com/tool/wordpress-meta-box-generator/
*/
function aaron_get_meta($value)
{
if (is_home()) {
$postid = get_option('page_for_posts');
} else {
$postid = get_the_ID();
}
$field = get_post_meta($postid, $value, true);
if (!empty($field)) {
return is_array($field) ? stripslashes_deep($field) : stripslashes(wp_kses_decode_entities($field));
} else {
return false;
}
}
开发者ID:michellekusold,项目名称:taasc,代码行数:17,代码来源:metabox.php
示例8: accesspress_get_custom_field
/**
* Returns custom field post meta data.
*
* Return only the first value of custom field.
* Returns false if field is blank or not set.
*
* @since 0.1.0
*
* @global integer $id Post ID.
* @global stdClass $post Post object.
* @param string $field Custom field key.
* @return string|boolean Return value or false on failure.
*/
function accesspress_get_custom_field($field, $default = '')
{
global $id, $post;
if (null === $id && null === $post) {
return $default;
}
$post_id = null === $id ? $post->ID : $id;
$custom_field = get_post_meta($post_id, $field, true);
if ($custom_field) {
/** Sanitize and return the value of the custom field */
return stripslashes(wp_kses_decode_entities($custom_field));
}
/** Return $default if custom field is empty */
return $default;
}
开发者ID:hscale,项目名称:webento,代码行数:28,代码来源:functions.php
示例9: etheme_get_custom_field
function etheme_get_custom_field($field, $postid = false)
{
global $post;
if (null === $post && !$postid) {
return FALSE;
}
if (!$postid) {
$postid = $post->ID;
}
$page_for_posts = get_option('page_for_posts');
$custom_field = get_post_meta($postid, $field, true);
if ($custom_field) {
return stripslashes(wp_kses_decode_entities($custom_field));
} else {
return FALSE;
}
}
开发者ID:MrMuzik,项目名称:ar4tupgrade,代码行数:17,代码来源:options.php
示例10: calibrefx_get_custom_field
/**
* Get custom post meta option value
* @param string $field post meta key
* @return mixed post meta value
*/
function calibrefx_get_custom_field($field)
{
global $post;
if (null === $post) {
return false;
}
$custom_field = get_post_meta($post->ID, $field, true);
if ($custom_field) {
if (!is_array($custom_field)) {
/** sanitize and return the value of the custom field */
return stripslashes(wp_kses_decode_entities($custom_field));
}
return $custom_field;
} else {
/** return false if custom field is empty */
return false;
}
}
开发者ID:alispx,项目名称:calibrefx,代码行数:23,代码来源:option-helper.php
示例11: accesspress_get_custom_field
/**
* Returns custom field post meta data.
*
* Return only the first value of custom field.
* Returns false if field is blank or not set.
*
* @since 0.1.0
*
* @global integer $id Post ID.
* @global stdClass $post Post object.
* @param string $field Custom field key.
* @param string $default Default text to show if custom field is empty.
* @param integer $post_id The ID of the post to pull custom field data from.
* @return string|boolean Return value or false on failure.
*/
function accesspress_get_custom_field($field, $default = '', $post_id = null)
{
global $post;
$post_id = $post_id ? (int) $post_id : $post->ID;
if (!$post_id) {
return false;
}
/** Short-circuit this function */
$pre = apply_filters('accesspress_pre_get_custom_field_' . $field, null, $post_id);
if (null !== $pre) {
return $pre;
}
/** Default value */
$return = $default;
/** If custom field has value, assign it to $return */
if ($custom_field = get_post_meta($post_id, $field, true)) {
$return = stripslashes(wp_kses_decode_entities($custom_field));
}
/** Return $default if custom field is empty */
return apply_filters('accesspress_get_custom_field', $return, $field, $default, $post_id);
}
开发者ID:juslee,项目名称:e27,代码行数:36,代码来源:functions.php
示例12: js_vars
static function js_vars()
{
$step_statuses = get_option(self::STEP_STATUS_KEY, array());
$started = get_option(self::STARTED_KEY, false);
$contact_page_id = get_option(self::CONTACTPAGE_ID_KEY, false);
if ($contact_page_id) {
$contact_page_info = self::contact_page_to_json($contact_page_id);
} else {
$contact_page_info = null;
}
$jetpack_config = array();
if (class_exists('Jetpack')) {
$jetpack_config = array('plugin_active' => true, 'configured' => Jetpack::is_active(), 'logo_url' => plugins_url('jetpack/images/jetpack-logo.png'), 'jumpstart_modules' => array_values(self::jumpstart_modules()), 'additional_modules' => array(), 'active_modules' => array_values(Jetpack::init()->get_active_modules()));
} else {
$jetpack_config = array('plugin_active' => false, 'configured' => false, 'logo_url' => '', 'jumpstart_modules' => array(), 'additional_modules' => array(), 'active_modules' => array());
}
// set the jetpack step status to "completed" if jetpack is active
if ($jetpack_config['configured']) {
$step_statuses['jetpack'] = array('completed' => true);
}
return array('base_url' => JETPACK_ONBOARDING_BASE_URL, 'site_url' => site_url(), 'nonce' => wp_create_nonce(Jetpack_Onboarding_EndPoints::AJAX_NONCE), 'debug' => WP_DEBUG ? true : false, 'bloginfo' => array('name' => wp_kses_decode_entities(stripslashes(get_bloginfo('name'))), 'description' => wp_kses_decode_entities(stripslashes(get_bloginfo('description')))), 'site_actions' => array('set_title' => 'jpo_set_title', 'set_layout' => 'jpo_set_layout', 'set_theme' => 'jpo_set_theme', 'install_theme' => 'jpo_install_theme', 'get_popular_themes' => 'jpo_get_popular_themes', 'configure_jetpack' => 'jpo_configure_jetpack', 'activate_jetpack_modules' => 'jpo_activate_jetpack_modules', 'deactivate_jetpack_modules' => 'jpo_deactivate_jetpack_modules', 'list_jetpack_modules' => 'jpo_list_jetpack_modules', 'reset_data' => 'jpo_reset_data', 'build_contact_page' => 'jpo_build_contact_page'), 'step_actions' => array('start' => 'jpo_started', 'disable' => 'jpo_disabled', 'view' => 'jpo_step_view', 'skip' => 'jpo_step_skip', 'complete' => 'jpo_step_complete'), 'jetpack' => $jetpack_config, 'started' => $started, 'step_status' => $step_statuses, 'steps' => array('layout' => self::get_layout(), 'contact_page' => $contact_page_info, 'advanced_settings' => array('jetpack_modules_url' => admin_url('admin.php?page=jetpack_modules'), 'jetpack_dash' => admin_url('admin.php?page=jetpack'), 'widgets_url' => admin_url('widgets.php'), 'themes_url' => admin_url('themes.php'), 'plugins_url' => admin_url('plugins.php'), 'customize_url' => wp_customize_url(), 'new_blog_post_url' => admin_url('post-new.php'), 'manage_posts_url' => admin_url('edit.php'), 'new_page_url' => admin_url('post-new.php?post_type=page'), 'manage_pages_url' => admin_url('edit.php?post_type=page'))));
}
开发者ID:laguz,项目名称:tallerdevida,代码行数:22,代码来源:class.jetpack-onboarding-end-points.php
示例13: caption_data
/**
* Retrieve the caption data.
*
* @param int $id The ID of the post or page for which we need the featured image caption.
*
* @return bool|array $caption If successful, the array of caption data. If unsuccessful, return false.
*/
public function caption_data($id)
{
// Get the caption data from the post meta
$caption = get_post_meta($id, '_' . CCFIC_KEY, true);
// If caption data is not present, return null
if (empty($caption)) {
return;
}
// Legacy support: if caption is a string, convert it to an array
if (is_string($caption)) {
$string = $caption;
$caption = array('caption_text' => $string);
}
// Unescape HTML characters
if (!empty($caption['caption_text'])) {
wp_kses_decode_entities($caption['caption_text']);
}
if (!empty($caption['source_text'])) {
wp_kses_decode_entities($caption['source_text']);
}
return $caption;
}
开发者ID:robalford,项目名称:alfordhomesinc,代码行数:29,代码来源:Caption.php
示例14: premise_get_option
/**
* Retrieve and return an option from the database.
*
* @since 2.1.0
*/
function premise_get_option($key, $setting = null)
{
/**
* Get setting. The default is set here, once, so it doesn't have to be
* repeated in the function arguments for accesspress_option() too.
*/
$setting = $setting ? $setting : PREMISE_SETTINGS_FIELD;
/** setup caches */
static $settings_cache = array();
static $options_cache = array();
/** Short circuit */
$pre = apply_filters('premise_pre_get_option_' . $key, false, $setting);
if (false !== $pre) {
return $pre;
}
/** Check options cache */
if (isset($options_cache[$setting][$key])) {
// option has been cached
return $options_cache[$setting][$key];
}
/** check settings cache */
if (isset($settings_cache[$setting])) {
// setting has been cached
$options = apply_filters('premise_options', $settings_cache[$setting], $setting);
} else {
// set value and cache setting
$options = $settings_cache[$setting] = apply_filters('premise_options', get_option($setting), $setting);
}
// check for non-existent option
if (!is_array($options) || !array_key_exists($key, (array) $options)) {
// cache non-existent option
$options_cache[$setting][$key] = '';
return '';
}
// option has been cached, cache option
$options_cache[$setting][$key] = is_array($options[$key]) ? stripslashes_deep($options[$key]) : stripslashes(wp_kses_decode_entities($options[$key]));
return $options_cache[$setting][$key];
}
开发者ID:juslee,项目名称:e27,代码行数:43,代码来源:functions.php
示例15: genesis_extender_get_custom_css
/**
* Get the latest genesis_extender_custom_css array from the database
* and then cache it, if not otherwise specified, so specific
* Custom Options values (or the entire array) can be efficiently accessed.
*
* @since 1.0
* @return either the entire genesis_extender_custom_css array or a specific key/value.
*/
function genesis_extender_get_custom_css($key, $args = false)
{
static $options_cache = array();
static $options_set = false;
if ($args) {
if (empty($options_cache) || !$args['cached']) {
$options_cache = get_option('genesis_extender_custom_css');
}
if ($args['array']) {
return $options_cache;
} else {
return;
}
}
if (isset($options_cache[$key])) {
return is_array($options_cache[$key]) ? stripslashes_deep($options_cache[$key]) : stripslashes(wp_kses_decode_entities($options_cache[$key]));
} elseif ($options_set) {
$options_cache[$key] = '';
return $options_cache[$key];
} else {
$options_cache = get_option('genesis_extender_custom_css');
$options_set = true;
}
if (!isset($options_cache[$key])) {
$options_cache[$key] = '';
} else {
$options_cache[$key] = is_array($options_cache[$key]) ? stripslashes_deep($options_cache[$key]) : stripslashes(wp_kses_decode_entities($options_cache[$key]));
}
return $options_cache[$key];
}
开发者ID:kabrewer07,项目名称:mrw,代码行数:38,代码来源:genesis-extender-options.php
示例16: alo_em_send_newsletter_to
/**
* Send the Newsletter to Recipient
* @param arr a recipient object: email, newsletter, ID (opt), lang (opt), name (opt), unikey (opt), subsriber (opt)
* @param bol if true forse to send, ignore debug setting
* @return bol
*/
function alo_em_send_newsletter_to($recip, $force_send = false)
{
global $wpdb;
$defaults = array('email' => false, 'newsletter' => false, 'ID' => false, 'lang' => alo_em_get_language(), 'name' => false, 'firstname' => false, 'subscriber' => false, 'unikey' => false, 'user_id' => false);
$args = wp_parse_args((array) $recip, $defaults);
$recipient = (object) $args;
if (!is_email($recipient->email)) {
$wpdb->update("{$wpdb->prefix}easymail_recipients", array('result' => -2), array('ID' => $recipient->ID));
return;
}
// Get newsletter details
$newsletter = alo_em_get_newsletter($recipient->newsletter);
$subject = stripslashes(alo_em_translate_text($recipient->lang, $newsletter->post_title, $newsletter->ID, 'post_title'));
$subject = apply_filters('alo_easymail_newsletter_title', $subject, $newsletter, $recipient);
$content = alo_em_translate_text($recipient->lang, $newsletter->post_content, $newsletter->ID, 'post_content');
// general filters and shortcodes applied to 'the_content'?
if (get_option('alo_em_filter_the_content') != "no") {
add_filter('the_content', 'do_shortcode', 11);
$content = apply_filters("the_content", $content);
}
// easymail standard and custom filters
$content = apply_filters('alo_easymail_newsletter_content', $content, $newsletter, $recipient, false);
$mail_sender = get_option('alo_em_sender_email') ? get_option('alo_em_sender_email') : "noreply@" . str_replace("www.", "", $_SERVER['HTTP_HOST']);
$from_name = html_entity_decode(wp_kses_decode_entities(get_option('alo_em_sender_name')));
$headers = "From: " . $from_name . " <" . $mail_sender . ">\n";
$headers .= "Content-Type: text/html; charset=\"" . strtolower(get_option('blog_charset')) . "\"\n";
// Custom newsletter headers
$headers = apply_filters('alo_easymail_newsletter_headers', $headers, $newsletter, $recipient);
// Custom newsletter attachs
$attachs = apply_filters('alo_easymail_newsletter_attachments', array(), $newsletter);
// ---- Send MAIL (or DEBUG) ----
$send_mode = $force_send ? "" : get_option('alo_em_debug_newsletters');
if (!empty($recipient->name)) {
$recipient_address = html_entity_decode(wp_kses_decode_entities($recipient->name)) . ' <' . $recipient->email . '>';
} else {
$recipient_address = $recipient->email;
}
switch ($send_mode) {
case "to_author":
$author = get_userdata($newsletter->post_author);
$debug_subject = "( DEBUG - TO: " . $recipient_address . " ) " . $subject;
$mail_engine = wp_mail($author->user_email, $debug_subject, $content, $headers, $attachs);
break;
case "to_file":
$log = fopen(WP_CONTENT_DIR . "/user_{$newsletter->post_author}_newsletter_{$newsletter->ID}.log", 'a+');
$log_message = "\n------------------------------ " . date_i18n(__('j M Y @ G:i')) . " ------------------------------\n\n";
$log_message .= "HEADERS:\n" . $headers . "\n";
$log_message .= "TO:\t\t\t" . $recipient->email . "\n";
$log_message .= "SUBJECT:\t" . $subject . "\n\n";
$log_message .= "CONTENT:\n" . $content . "\n\n";
if (!empty($attachs)) {
$log_message .= "ATTACHMENTS:\n" . (is_array($attachs) ? print_r($attachs, true) : $attachs) . "\n\n";
}
$mail_engine = fwrite($log, $log_message) ? true : false;
fclose($log);
break;
default:
// no debug: send it!
$mail_engine = wp_mail($recipient_address, $subject, $content, $headers, $attachs);
}
$sent = $mail_engine ? "1" : "-1";
// If recipient is in db (eg. ID exists) update db
if ($recipient->ID) {
$wpdb->update("{$wpdb->prefix}easymail_recipients", array('result' => $sent), array('ID' => $recipient->ID));
}
return $mail_engine ? true : false;
}
开发者ID:dcotet,项目名称:alo-easymail,代码行数:73,代码来源:alo-easymail-mailer.php
示例17: genesis_get_term_filter
/**
* For backward compatibility only.
*
* Filter each term, pulling term meta automatically so it can be accessed directly by the term object.
*
* Applies `genesis_term_meta_defaults`, `genesis_term_meta_{field}` and `genesis_term_meta` filters.
*
* @since 1.2.0
*
* @param object $term Database row object.
* @param string $taxonomy Taxonomy name that $term is part of.
*
* @return object $term Database row object.
*/
function genesis_get_term_filter($term, $taxonomy)
{
//* Do nothing, if $term is not object
if (!is_object($term)) {
return $term;
}
//* Do nothing, if called in the context of creating a term via an ajax call
if (did_action('wp_ajax_add-tag')) {
return $term;
}
//* Pull all meta for this term ID
$term_meta = get_term_meta($term->term_id);
//* Convert array values to string
foreach ((array) $term_meta as $key => $value) {
$term_meta[$key] = $value[0];
}
$term->meta = wp_parse_args($term_meta, genesis_term_meta_defaults());
//* Sanitize term meta
foreach ($term->meta as $field => $value) {
if (is_array($value)) {
$value = stripslashes_deep(array_filter($value, 'wp_kses_decode_entities'));
} else {
$value = stripslashes(wp_kses_decode_entities($value));
}
/**
* Term meta value filter.
*
* Allow term meta value to be filtered before being injected into the $term->meta array.
*
* @since
*
* @param string|array $value The term meta value.
* @param string $term The term that is being filtered.
* @param string $taxonomy The taxonomy to which the term belongs.
*/
$term->meta[$field] = apply_filters("genesis_term_meta_{$field}", $value, $term, $taxonomy);
}
$term->meta = apply_filters('genesis_term_meta', $term->meta, $term, $taxonomy);
return $term;
}
开发者ID:tleonard2,项目名称:durablegbFeb,代码行数:54,代码来源:term-meta.php
示例18: wp_kses_bad_protocol_once2
function wp_kses_bad_protocol_once2($string, $allowed_protocols)
###############################################################################
# This function processes URL protocols, checks to see if they're in the white-
# list or not, and returns different data depending on the answer.
###############################################################################
{
$string2 = wp_kses_decode_entities($string);
$string2 = preg_replace('/\s/', '', $string2);
$string2 = wp_kses_no_null($string2);
$string2 = preg_replace('/\xad+/', '', $string2);
# deals with Opera "feature"
$string2 = strtolower($string2);
$allowed = false;
foreach ($allowed_protocols as $one_protocol)
if (strtolower($one_protocol) == $string2) {
$allowed = true;
break;
}
if ($allowed)
return "$string2:";
else
return '';
} # function wp_kses_bad_protocol_once2
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:25,代码来源:kses.php
示例19: franz_translate_settings
/**
* Replace the strings in the theme's settings with the translated strings
*/
function franz_translate_settings()
{
if (!function_exists('icl_t')) {
return;
}
if (is_admin()) {
return;
}
global $franz_settings;
$franz_settings['copy_text'] = franz_icl_t('Copyright text', $franz_settings['copy_text']);
$franz_settings['navmenu_home_desc'] = franz_icl_t('Home nav menu description', $franz_settings['navmenu_home_desc']);
foreach ($franz_settings['social_profiles'] as $key => $social_profile) {
$franz_settings['social_profiles'][$key]['title'] = franz_icl_t('Social icon - ' . $social_profile['name'], wp_kses_decode_entities($social_profile['title']));
}
}
开发者ID:ravitechrlabs,项目名称:wordpress,代码行数:18,代码来源:wpml-helper.php
示例20: genesis_get_term_filter
/**
* Merge term meta data into options table.
*
* Genesis is forced to create its own term-meta data structure in the options table, since it is not support in core WP.
*
* Applies `genesis_term_meta_defaults`, `genesis_term_meta_{field}` and `genesis_term_meta` filters.
*
* @since 1.2.0
*
* @param object $term Database row object.
* @param string $taxonomy Taxonomy name that $term is part of.
*
* @return object $term Database row object.
*/
function genesis_get_term_filter($term, $taxonomy)
{
//* Do nothing, if $term is not object
if (!is_object($term)) {
return $term;
}
$db = get_option('genesis-term-meta');
$term_meta = isset($db[$term->term_id]) ? $db[$term->term_id] : array();
$term->meta = wp_parse_args($term_meta, apply_filters('genesis_term_meta_defaults', array('headline' => '', 'intro_text' => '', 'display_title' => 0, 'display_description' => 0, 'doctitle' => '', 'description' => '', 'keywords' => '', 'layout' => '', 'noindex' => 0, 'nofollow' => 0, 'noarchive' => 0)));
//* Sanitize term meta
foreach ($term->meta as $field => $value) {
$term->meta[$field] = apply_filters('genesis_term_meta_' . $field, stripslashes(wp_kses_decode_entities($value)), $term, $taxonomy);
}
$term->meta = apply_filters('genesis_term_meta', $term->meta, $term, $taxonomy);
return $term;
}
开发者ID:treydonovan,项目名称:innergame-anna,代码行数:30,代码来源:options.php
注:本文中的wp_kses_decode_entities函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论