prepend_attachment

Definition:
function prepend_attachment($content) {}

Wrap attachment in <p> element before content.

Parameters

  • string $content

Defined filters

  • prepend_attachment
    apply_filters('prepend_attachment', $p)

Source code

function prepend_attachment($content) {

	global $post;



	if ( empty($post->post_type) || $post->post_type != 'attachment' )

		return $content;



	$p = '<p class="attachment">';

	// show the medium sized image representation of the attachment if available, and link to the raw file

	$p .= wp_get_attachment_link(0, 'medium', false);

	$p .= '</p>';

	$p = apply_filters('prepend_attachment', $p);



	return "$p\n$content";

}

2599

post_type_supports

Definition:
function post_type_supports( $post_type, $feature ) {}

Checks a post type’s support for a given feature

Parameters

  • string $post_type: The post type being checked
  • string $feature: the feature being checked

Source code

function post_type_supports( $post_type, $feature ) {

	global $_wp_post_type_features;



	if ( !isset( $_wp_post_type_features[$post_type][$feature] ) )

		return false;



	// If no args passed then no extra checks need be performed

	if ( func_num_args() <= 2 )

		return true;



	// @todo Allow pluggable arg checking

	//$args = array_slice( func_get_args(), 2 );



	return true;

}

2597

post_type_exists

Definition:
function post_type_exists( $post_type ) {}

Checks if a post type is registered.

Parameters

  • string $post_type: Post type name

Return values

returns:Whether post type is registered.

Source code

function post_type_exists( $post_type ) {

	return (bool) get_post_type_object( $post_type );

}

2595

post_trackback_meta_box

Definition:
function post_trackback_meta_box($post) {}

Display trackback links form fields.

Parameters

  • object $post

Source code

function post_trackback_meta_box($post) {

	$form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" tabindex="7" value="'. esc_attr( str_replace("\n", ' ', $post->to_ping) ) .'" />';

	if ('' != $post->pinged) {

		$pings = '<p>'. __('Already pinged:') . '</p><ul>';

		$already_pinged = explode("\n", trim($post->pinged));

		foreach ($already_pinged as $pinged_url) {

			$pings .= "\n\t<li>" . esc_html($pinged_url) . "</li>";

		}

		$pings .= '</ul>';

	}



?>

<p><label for="trackback_url"><?php _e('Send trackbacks to:'); ?></label> <?php echo $form_trackback; ?><br /> (<?php _e('Separate multiple URLs with spaces'); ?>)</p>

<p><?php _e('Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress sites they’ll be notified automatically using <a href="http://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments" target="_blank">pingbacks</a>, no other action necessary.'); ?></p>

<?php

if ( ! empty($pings) )

	echo $pings;

}

2593

post_thumbnail_meta_box

Definition:
function post_thumbnail_meta_box() {}

Display post thumbnail meta box.

Source code

function post_thumbnail_meta_box() {

	global $post;

	$thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true );

	echo _wp_post_thumbnail_html( $thumbnail_id );

}

2591