sync/class.jetpack-sync-module-posts.php 1 location
|
@@ 78-86 (lines=9) @@
|
| 75 |
|
return array( $args[0], $this->filter_post_content_and_add_links( $args[1] ), $args[2] ); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
function filter_blacklisted_post_types( $args ) { |
| 79 |
|
$post = $args[1]; |
| 80 |
|
|
| 81 |
|
if ( in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ) ) { |
| 82 |
|
return false; |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
return $args; |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
// Expands wp_insert_post to include filtered content |
| 89 |
|
function filter_post_content_and_add_links( $post_object ) { |
sync/class.jetpack-sync-module-meta.php 1 location
|
@@ 147-153 (lines=7) @@
|
| 144 |
|
return true; |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
function is_post_type_allowed( $post_id ) { |
| 148 |
|
$post = get_post( $post_id ); |
| 149 |
|
if ( in_array( $post->post_type, Jetpack_Sync_Settings::get_setting( 'post_types_blacklist' ) ) ) { |
| 150 |
|
return false; |
| 151 |
|
} |
| 152 |
|
return true; |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
function filter_meta_post( $args ) { |
| 156 |
|
if ( ! $this->is_post_type_allowed( $args[1] ) ) { |