| @@ 391-403 (lines=13) @@ | ||
| 388 | } |
|
| 389 | ||
| 390 | // Set sharing status of the post |
|
| 391 | if ( $new ) { |
|
| 392 | $sharing_enabled = isset( $sharing ) ? (bool) $sharing : true; |
|
| 393 | if ( false === $sharing_enabled ) { |
|
| 394 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 395 | } |
|
| 396 | } |
|
| 397 | else { |
|
| 398 | if ( isset( $sharing ) && true === $sharing ) { |
|
| 399 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 400 | } else if ( isset( $sharing ) && false == $sharing ) { |
|
| 401 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 402 | } |
|
| 403 | } |
|
| 404 | ||
| 405 | if ( isset( $sticky ) ) { |
|
| 406 | if ( true === $sticky ) { |
|
| @@ 458-470 (lines=13) @@ | ||
| 455 | } |
|
| 456 | ||
| 457 | // Set sharing status of the post |
|
| 458 | if ( $new ) { |
|
| 459 | $sharing_enabled = isset( $sharing ) ? (bool) $sharing : true; |
|
| 460 | if ( false === $sharing_enabled ) { |
|
| 461 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 462 | } |
|
| 463 | } |
|
| 464 | else { |
|
| 465 | if ( isset( $sharing ) && true === $sharing ) { |
|
| 466 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 467 | } else if ( isset( $sharing ) && false == $sharing ) { |
|
| 468 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 469 | } |
|
| 470 | } |
|
| 471 | ||
| 472 | if ( isset( $sticky ) ) { |
|
| 473 | if ( true === $sticky ) { |
|
| @@ 459-471 (lines=13) @@ | ||
| 456 | } |
|
| 457 | ||
| 458 | // Set sharing status of the post |
|
| 459 | if ( $new ) { |
|
| 460 | $sharing_enabled = isset( $sharing ) ? (bool) $sharing : true; |
|
| 461 | if ( false === $sharing_enabled ) { |
|
| 462 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 463 | } |
|
| 464 | } |
|
| 465 | else { |
|
| 466 | if ( isset( $sharing ) && true === $sharing ) { |
|
| 467 | delete_post_meta( $post_id, 'sharing_disabled' ); |
|
| 468 | } else if ( isset( $sharing ) && false == $sharing ) { |
|
| 469 | update_post_meta( $post_id, 'sharing_disabled', 1 ); |
|
| 470 | } |
|
| 471 | } |
|
| 472 | ||
| 473 | if ( isset( $sticky ) ) { |
|
| 474 | if ( true === $sticky ) { |
|