| @@ 1203-1220 (lines=18) @@ | ||
| 1200 | * @param String $post_type custom post type identifier |
|
| 1201 | * @return bool |
|
| 1202 | */ |
|
| 1203 | function is_single_post_enabled( $post_type = 'post' ) { |
|
| 1204 | $options = $this->get_options(); |
|
| 1205 | return (bool) apply_filters( |
|
| 1206 | /** |
|
| 1207 | * Filters whether Likes should be enabled on single posts. |
|
| 1208 | * |
|
| 1209 | * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled. |
|
| 1210 | * |
|
| 1211 | * @module likes |
|
| 1212 | * |
|
| 1213 | * @since 2.2.0 |
|
| 1214 | * |
|
| 1215 | * @param bool $enabled Are Post Likes enabled on single posts? |
|
| 1216 | */ |
|
| 1217 | "wpl_is_single_{$post_type}_disabled", |
|
| 1218 | (bool) in_array( $post_type, $options['show'] ) |
|
| 1219 | ); |
|
| 1220 | } |
|
| 1221 | ||
| 1222 | /** |
|
| 1223 | * Are Post Likes enabled on single pages? |
|
| @@ 1227-1239 (lines=13) @@ | ||
| 1224 | * |
|
| 1225 | * @return bool |
|
| 1226 | */ |
|
| 1227 | function is_single_page_enabled() { |
|
| 1228 | $options = $this->get_options(); |
|
| 1229 | /** |
|
| 1230 | * Filters whether Likes should be enabled on single pages. |
|
| 1231 | * |
|
| 1232 | * @module likes |
|
| 1233 | * |
|
| 1234 | * @since 2.2.0 |
|
| 1235 | * |
|
| 1236 | * @param bool $enabled Are Post Likes enabled on single pages? |
|
| 1237 | */ |
|
| 1238 | return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) ); |
|
| 1239 | } |
|
| 1240 | ||
| 1241 | /** |
|
| 1242 | * Are Media Likes enabled on single pages? |
|