returns a boolean as to wether the post has siblings
 Params:
 +check+:: ID, post_slug, or post_title - if this is nil it will use the @content variable
349058
def has_siblings?(check = nil)
      post = obtain_record(check)
      post.blank? ? false : post.has_siblings?
    end
946907
def prepare_param_post(post_or_values, &block)
        post = case post_or_values
          when WWW::Delicious::Post
            post_or_values
          when Hash
            Post.new(post_or_values)
          else
            raise ArgumentError, 'Expected `args` to be `WWW::Delicious::Post` or `Hash`'
          end

        yield(post) if block_given?
        # TODO: validate post with post.validate!
        raise ArgumentError, 'Both `url` and `title` are required' unless post.api_valid?
        post
      end
1258635
public function hasDataInPostsType()
    {
        $postTypes = PostType::all();
        foreach($postTypes as $postType){
            $hasData = DB::table($postType->slug)->where("createdByUserID", $this->userID)->count();
            if($hasData) {
                return true;
            }

            foreach($postType->fields as $field){
                if($field->type->inputType == "db" && $field->dbTable->name == "users") {
                    if($field->translatable) {
                        if($field->isMultiple) {
                            foreach(Language::all() as $language){
                                $hasData = DB::table("post_articles")->whereRaw("JSON_CONTAINS($field->slug->\"$.$language->slug\", '[$this->userID]')")->count();
                                if($hasData) { return true;
                                }
                            }
                        }else{
                            foreach(Language::all() as $language){
                                $hasData = DB::table($postType->slug)->where($field->slug."->".$language->slug, $this->userID)->count();
                                if($hasData) { return true;
                                }
                            }
                        }
                    }else{
                        if($field->isMultiple) {
                            $hasData = DB::table($postType->slug)->whereRaw("JSON_CONTAINS($field->slug, '[$this->userID]')")->count();
                            if($hasData) { return true;
                            }
                        }else{
                            $hasData = DB::table($postType->slug)->where($field->slug, $this->userID)->count();
                            if($hasData) { return true;
                            }
                        }
                    }
                }

            }

        }
        return false;
    }
1287476
function has_sticky( $id, $network_level_or_blog_id = null ) {
            if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
                $notices = $this->_network_notices;
            } else {
                $notices = $this->get_site_notices( $network_level_or_blog_id );
            }

            return $notices->has_sticky( $id );
        }
100800
def has_liquid_construct?(content)
      return false if content.nil? || content.empty?

      content.include?("{%") || content.include?("{{")
    end
1363598
def maintain_slug
        postfix = nil
        total_count = 0

        while self.class.where(parent_id: parent_id, slug: "#{slug}#{postfix}").where("id != ?", id.to_i).exists? do
          total_count += 1
          postfix = "-#{total_count}"
        end

        if postfix
          self.slug = "#{slug}#{postfix}"
        end
      end
509881
def is_sibling_of(self, node):
        
        return self.get_siblings().filter(pk=node.pk).exists()
1168884
public function checkPageSubjectInTitle() {
        if ($this->checkPageSubjectDefined()) {
            if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->owner->MetaTitle)) {
                return true;
            } elseif (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->owner->Title)) {
                return true;
            } else {
                return false;
            }
        }
        return false;
    }
853101
def siblingsId(self):
        
        if self._next_id is False or self._prev_id is False:
            self._prev_id, self._next_id = self.getPrevNextUrn(reference=self.urn.reference)
        return self._prev_id, self._next_id
653027
protected function checkContent()
    {
        if (is_array($this->content) && count($this->content)) {
            foreach ($this->content as $name => $value) {
                switch ($name) {
                    case 'category':
                    case 'mainMessage':
                    case 'buttonMessage':
                    case 'language':
                        $this->addContentOption($name, $value);
                        break;
                    case 'mainParams':
                    case 'buttonParams':
                        $this->addParamsOption($name, $value);
                        break;
                }
            }
        }
    }
829345
public function hasNextPost()
    {
        return ($this->nextPost && $this->nextPost->ID !== $this->get('ID')) ? true : false;
    }
1219567
def raw_post
      unless has_header? "RAW_POST_DATA"
        raw_post_body = body
        set_header("RAW_POST_DATA", raw_post_body.read(content_length))
        raw_post_body.rewind if raw_post_body.respond_to?(:rewind)
      end
      get_header "RAW_POST_DATA"
    end
1211806
private function has_custom_css() {
		$query = new \WP_Query(
			array(
				'post_type'              => 'custom_css',
				'post_status'            => 'publish',
				'numberposts'            => 1,
				'update_post_meta_cache' => false,
				'update_post_term_cache' => false,
			)
		);

		if ( $query->have_posts() ) {
			$query->the_post();
			$content = get_the_content();

			// if the content contains a colon, a CSS rule has been added.
			return strpos( $content, ':' ) === false ? false : true;
		}

		return false;
	}
654621
function rule_match_page_type( $match, $rule, $options )
	{
		// validation
		if( !$options['post_id'] )
		{
			return false;
		}

		$post = get_post( $options['post_id'] );
		        
        if( $rule['value'] == 'front_page')
        {
        	
	        $front_page = (int) get_option('page_on_front');
	        
	        
	        if($rule['operator'] == "==")
	        {
	        	$match = ( $front_page == $post->ID );
	        }
	        elseif($rule['operator'] == "!=")
	        {
	        	$match = ( $front_page != $post->ID );
	        }
	        
        }
        elseif( $rule['value'] == 'posts_page')
        {
        
	        $posts_page = (int) get_option('page_for_posts');
	        
	        
	        if($rule['operator'] == "==")
	        {
	        	$match = ( $posts_page == $post->ID );
	        }
	        elseif($rule['operator'] == "!=")
	        {
	        	$match = ( $posts_page != $post->ID );
	        }
	        
        }
        elseif( $rule['value'] == 'top_level')
        {
        	$post_parent = $post->post_parent;
        	if( $options['page_parent'] )
        	{
	        	$post_parent = $options['page_parent'];
        	}
        	
        	
	        if($rule['operator'] == "==")
	        {
	        	$match = ( $post_parent == 0 );
	        }
	        elseif($rule['operator'] == "!=")
	        {
	        	$match = ( $post_parent != 0 );
	        }
	        
        }
        elseif( $rule['value'] == 'parent')
        {
        
        	$children = get_pages(array(
        		'post_type' => $post->post_type,
        		'child_of' =>  $post->ID,
        	));
        	
	        
	        if($rule['operator'] == "==")
	        {
	        	$match = ( count($children) > 0 );
	        }
	        elseif($rule['operator'] == "!=")
	        {
	        	$match = ( count($children) == 0 );
	        }
	        
        }
        elseif( $rule['value'] == 'child')
        {
        
        	$post_parent = $post->post_parent;
        	if( $options['page_parent'] )
        	{
	        	$post_parent = $options['page_parent'];
        	}
	        
	        
	        if($rule['operator'] == "==")
	        {
	        	$match = ( $post_parent != 0 );
	        }
	        elseif($rule['operator'] == "!=")
	        {
	        	$match = ( $post_parent == 0 );
	        }
	        
        }
        
        return $match;

	}
323136
private function checkRequestParams() {
    $show_popup = TRUE;
    if (!empty($_REQUEST['location'])) {
      $show_popup = FALSE;
    }
    if (!empty($node = \Drupal::routeMatch()->getParameter('node')) && in_array($node->bundle(), ['branch', 'camp'])) {
      $show_popup = FALSE;
    }
    return $show_popup;
  }
1243644
public function hasContent() {

    if (count($this->getCategories()) == 0) {
      return FALSE;
    }

    if (count($this->getAllChildren()) == 0) {
      return FALSE;
    }

    return TRUE;
  }
121229
public boolean hasSubModule() {
        if (!hasSubModInit) {
            hasSubModInit = true;
            if (perfData != null) {
                Iterator allData = perfData.values().iterator();
                while (allData.hasNext()) {
                    PmiDataInfo dataInfo = (PmiDataInfo) allData.next();
                    if (dataInfo.getSubmoduleName() != null) {
                        hasSubMod = true;
                        break;
                    }
                }
            }
        }
        return hasSubMod;
    }