# post-duplicator/2.26/includes/helpers.php

Post Duplicator, version 2.26. 28 lines.

- Page: https://pluginprobe.com/plugins/post-duplicator/2.26/code/includes/helpers.php
- Raw: https://pluginprobe.com/plugins/post-duplicator/2.26/raw/includes/helpers.php
- Modified: 2015-12-15T16:18:00+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/post-duplicator/2.26/code/includes/helpers.php#L10-L20`.

```php
<?php
	
/* --------------------------------------------------------- */
/* !Return an array of post types - 2.12 */
/* --------------------------------------------------------- */

if( !function_exists('mtphr_post_duplicator_post_types') ) {
function mtphr_post_duplicator_post_types() {
	
	$post_types = array('same' => __('Same as original', 'post-duplicator'));
	$pts = get_post_types(array(), 'objects');
	
	// Remove framework post types
	unset( $pts['attachment'] );
	unset( $pts['revision'] );
	unset( $pts['nav_menu_item'] );
	unset( $pts['wooframework'] );

	if( is_array($pts) && count($pts) > 0 ) {
		foreach( $pts as $i=>$pt ) {
			$post_types[$i] = $pt->labels->singular_name;
		}
	}
	
	return $post_types;	
}
}

```
