Showing 5,566 of 7,504 total issues
Method get_views
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_views() {
global $post_id, $comment_status, $comment_type;
$status_links = array();
$num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments();
Method cat2wp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cat2wp($categories='')
{
// General Housekeeping
global $wpdb;
$count = 0;
Method fetch_remote_file
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fetch_remote_file($post, $url) {
$upload = wp_upload_dir($post['post_date']);
// extract the file name and extension from the url
$file_name = basename($url);
Method get_service
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_service() {
log_app('function','get_service()');
if( !current_user_can( 'edit_posts' ) )
$this->auth_required( __( 'Sorry, you do not have the right to access this blog.' ) );
Method AtomServer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AtomServer() {
$this->script_name = array_pop(explode('/',$_SERVER['SCRIPT_NAME']));
$this->app_base = get_bloginfo('url') . '/' . $this->script_name . '/';
if ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) {
Method register_new_user
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function register_new_user($user_login, $user_email) {
$errors = new WP_Error();
$user_login = sanitize_user( $user_login );
$user_email = apply_filters( 'user_registration_email', $user_email );
Method twentyfourteen_body_classes
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function twentyfourteen_body_classes( $classes ) {
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
Method wp_getUsersBlogs
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_getUsersBlogs( $args ) {
// If this isn't on WPMU then just use blogger_getUsersBlogs
if( !function_exists( 'is_site_admin' ) ) {
array_unshift( $args, 1 );
return $this->blogger_getUsersBlogs( $args );
Method twentyfourteen_widgets_init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function twentyfourteen_widgets_init() {
require get_template_directory() . '/inc/widgets.php';
register_widget( 'Twenty_Fourteen_Ephemera_Widget' );
register_sidebar( array(
Method signup_blog
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function signup_blog($user_name = '', $user_email = '', $blogname = '', $blog_title = '', $errors = '') {
if ( !is_wp_error($errors) )
$errors = new WP_Error();
$signup_blog_defaults = array(
Method wp_editPage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_editPage($args) {
// Items not escaped here will be escaped in editPost.
$blog_id = (int) $args[0];
$page_id = (int) $this->escape($args[1]);
$username = $this->escape($args[2]);
Method wp_count_comments
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_count_comments( $post_id = 0 ) {
global $wpdb;
$post_id = (int) $post_id;
Method wp_allow_comment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_allow_comment($commentdata) {
global $wpdb;
extract($commentdata, EXTR_SKIP);
// Simple duplicate check
Method _get_term_children
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function &_get_term_children($term_id, $terms, $taxonomy) {
$empty_array = array();
if ( empty($terms) )
return $empty_array;
Method wp_getComments
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function wp_getComments($args) {
$this->escape($args);
$blog_id = (int) $args[0];
$username = $args[1];
Method get_term_by
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_term_by($field, $value, $taxonomy, $output = OBJECT, $filter = 'raw') {
global $wpdb;
if ( ! is_taxonomy($taxonomy) )
return false;
Method _pad_term_counts
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _pad_term_counts(&$terms, $taxonomy) {
global $wpdb;
// This function only works for hierarchical taxonomies like post categories.
if ( !is_taxonomy_hierarchical( $taxonomy ) )
Method clean_term_cache
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function clean_term_cache($ids, $taxonomy = '') {
global $wpdb;
static $cleaned = array();
if ( !is_array($ids) )
Method parse_iri
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function parse_iri($iri)
{
$iri = trim($iri, "\x20\x09\x0A\x0C\x0D");
if (preg_match('/^((?P<scheme>[^:\/?#]+):)?(\/\/(?P<authority>[^\/?#]*))?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?$/', $iri, $match))
{
Method change_encoding_mbstring
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function change_encoding_mbstring($data, $input, $output)
{
if ($input === 'windows-949')
{
$input = 'EUC-KR';