| @@ 224-231 (lines=8) @@ | ||
| 221 | $args = $this->query_args(); |
|
| 222 | ||
| 223 | // unhook publicize, it's hooked again later -- without this, skipping services is impossible |
|
| 224 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
|
| 225 | remove_action( 'save_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ), 100, 2 ); |
|
| 226 | add_action( 'rest_api_inserted_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ) ); |
|
| 227 | ||
| 228 | if ( $this->should_load_theme_functions( $post_id ) ) { |
|
| 229 | $this->load_theme_functions(); |
|
| 230 | } |
|
| 231 | } |
|
| 232 | ||
| 233 | ||
| 234 | if ( $new ) { |
|
| @@ 169-176 (lines=8) @@ | ||
| 166 | } |
|
| 167 | ||
| 168 | // unhook publicize, it's hooked again later -- without this, skipping services is impossible |
|
| 169 | if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) { |
|
| 170 | remove_action( 'save_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ), 100, 2 ); |
|
| 171 | add_action( 'rest_api_inserted_post', array( $GLOBALS['publicize_ui']->publicize, 'async_publicize_post' ) ); |
|
| 172 | ||
| 173 | if ( $this->should_load_theme_functions( $post_id ) ) { |
|
| 174 | $this->load_theme_functions(); |
|
| 175 | } |
|
| 176 | } |
|
| 177 | ||
| 178 | if ( $new ) { |
|
| 179 | $input = $this->input( true ); |
|