function register_settings() { register_setting($this->settings_field, $this->settings_field); add_option($this->settings_field, __return_empty_array(), '', 'yes'); }
?> <code>Not detected</code> <?php } ?> <span class="w3tc-self-test-hint">(required for disk enhanced Page Cache and Browser Cache)</span> </li> <?php } ?> <?php } ?> </ul> <?php $additional_checks = apply_filters('w3tc_compatibility_test', __return_empty_array()); if ($additional_checks) { ?> <h4><?php _e('Additional modules', 'w3-total-cache'); ?> </h4> <ul> <?php foreach ($additional_checks as $check) { echo '<li>', $check, '</li>'; } ?> </ul> <?php }
function get_post_meta_all($post_ID, $refresh = false) { if ($post_ID == '' || $post_ID == 0) { __return_empty_array(); } static $_cache = array(); //will keep the data just in case this method gets called again for this id if (array_key_exists($post_ID, $_cache) && !$refresh) { return $_cache[$post_ID]; } global $wpdb; $data = array(); $wpdb->query($wpdb->prepare("\n SELECT meta_id, post_id, meta_key, meta_value\n FROM {$wpdb->postmeta}\n WHERE `post_id` = %d ORDER BY meta_id\n ", $post_ID)); foreach ($wpdb->last_result as $k => $v) { $data[$v->meta_key] = maybe_unserialize($v->meta_value); //} } $_cache[$post_ID] = $data; return $data; }
/** * Get registered extensions * @param $config * @return array */ function w3_get_extensions($config) { return apply_filters("w3tc_extensions", __return_empty_array(), $config); }
/** * Prevent WP from creating intermediate image sizes * * Function name parallels wpcom's implementation to accommodate existing code */ function wpcom_intermediate_sizes($sizes) { return __return_empty_array(); }