src/magictag.php
private function get_post_value( $field, $in_params, $post ){

		if( !is_object( $post ) ){
			return $in_params;
		}

		if ( 'permalink' == $field || 'post_permalink' == $field ) {
			return esc_url( get_permalink( $post->ID ) );

		}
		
		//handle auto-generated and <!--more--> tag excerpts @since 1.1.0
		if ( 'post_excerpt' == $field && '' == $post->post_excerpt ) {
			if ( 0 < strpos( $post->post_content, '<!--more-->' ) ){
				$excerpt = substr( $post->post_content, 0, strpos( $post->post_content, '<!--more-->') );
			} else {
				/**
				 * This filer is duplicated from WordPress core to respect core setting for excerpt length.
				 *
				 * It is documented in wp-includes/formatting.php
				 */
				$excerpt_length = apply_filters( 'excerpt_length', 55 );
				$excerpt        = wp_trim_words( $post->post_content, $excerpt_length, '' );
			}

			return $excerpt;

		}

		//possibly do a post_thumbnail magic tag @since 1.1.0
		$maybe_thumbnail = $this->maybe_do_post_thumbnail( $field, $post );
		if ( filter_var( $maybe_thumbnail, FILTER_VALIDATE_URL ) ) {
			return $maybe_thumbnail;

		}

		if( isset( $post->{$field} ) ){
			return implode( ', ', (array) $post->{$field} );
		}


		return $in_params;

	}
private function get_post_value( $field, $in_params, $post ){

		if( !is_object( $post ) ){
			return $in_params;
		}

		if ( 'permalink' == $field || 'post_permalink' == $field ) {
			return esc_url( get_permalink( $post->ID ) );

		}
		
		//handle auto-generated and <!--more--> tag excerpts @since 1.1.0
		if ( 'post_excerpt' == $field && '' == $post->post_excerpt ) {
			if ( 0 < strpos( $post->post_content, '<!--more-->' ) ){
				$excerpt = substr( $post->post_content, 0, strpos( $post->post_content, '<!--more-->') );
			} else {
				/**
				 * This filer is duplicated from WordPress core to respect core setting for excerpt length.
				 *
				 * It is documented in wp-includes/formatting.php
				 */
				$excerpt_length = apply_filters( 'excerpt_length', 55 );
				$excerpt        = wp_trim_words( $post->post_content, $excerpt_length, '' );
			}

			return $excerpt;

		}

		//possibly do a post_thumbnail magic tag @since 1.1.0
		$maybe_thumbnail = $this->maybe_do_post_thumbnail( $field, $post );
		if ( filter_var( $maybe_thumbnail, FILTER_VALIDATE_URL ) ) {
			return $maybe_thumbnail;

		}

		if( isset( $post->{$field} ) ){
			return implode( ', ', (array) $post->{$field} );
		}


		return $in_params;

	}
private function get_post_value ( $ field , $ in_params , $ post ) { if ( ! is_object ( $ post ) ) { return $ in_params ; } if ( 'permalink' == $ field || 'post_permalink' == $ field ) { return esc_url ( get_permalink ( $ post -> ID ) ) ; } //handle auto-generated and <!--more--> tag excerpts @since 1.1.0 if ( 'post_excerpt' == $ field && '' == $ post -> post_excerpt ) { if ( 0 < strpos ( $ post -> post_content , '<!--more-->' ) ) { $ excerpt = substr ( $ post -> post_content , 0 , strpos ( $ post -> post_content , '<!--more-->' ) ) ; } else { /**
				 * This filer is duplicated from WordPress core to respect core setting for excerpt length.
				 *
				 * It is documented in wp-includes/formatting.php
				 */ $ excerpt_length = apply_filters ( 'excerpt_length' , 55 ) ; $ excerpt = wp_trim_words ( $ post -> post_content , $ excerpt_length , '' ) ; } return $ excerpt ; } //possibly do a post_thumbnail magic tag @since 1.1.0 $ maybe_thumbnail = $ this -> maybe_do_post_thumbnail ( $ field , $ post ) ; if ( filter_var ( $ maybe_thumbnail , FILTER_VALIDATE_URL ) ) { return $ maybe_thumbnail ; } if ( isset ( $ post -> { $ field } ) ) { return implode ( ', ' , ( array ) $ post -> { $ field } ) ; } return $ in_params ; }
Gets a posts meta value

@since 0.0.1

@return    string 	post field value
Gets a posts meta value