equal
deleted
inserted
replaced
68 * |
68 * |
69 * @since 4.5.0 |
69 * @since 4.5.0 |
70 * |
70 * |
71 * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. |
71 * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. |
72 * @param array $object_ids Array of object IDs. |
72 * @param array $object_ids Array of object IDs. |
73 * @return bool|WP_Error True on success, WP_Error on failure. |
73 * @return void|WP_Error WP_Error on failure. |
74 */ |
74 */ |
75 public function queue_objects( $object_type, $object_ids ) { |
75 public function queue_objects( $object_type, $object_ids ) { |
76 if ( ! isset( $this->settings[ $object_type ] ) ) { |
76 if ( ! isset( $this->settings[ $object_type ] ) ) { |
77 return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); |
77 return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); |
78 } |
78 } |
108 * Resets lazy-load queue for a given object type. |
108 * Resets lazy-load queue for a given object type. |
109 * |
109 * |
110 * @since 4.5.0 |
110 * @since 4.5.0 |
111 * |
111 * |
112 * @param string $object_type Object type. Accepts 'comment' or 'term'. |
112 * @param string $object_type Object type. Accepts 'comment' or 'term'. |
113 * @return bool|WP_Error True on success, WP_Error on failure. |
113 * @return void|WP_Error WP_Error on failure. |
114 */ |
114 */ |
115 public function reset_queue( $object_type ) { |
115 public function reset_queue( $object_type ) { |
116 if ( ! isset( $this->settings[ $object_type ] ) ) { |
116 if ( ! isset( $this->settings[ $object_type ] ) ) { |
117 return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); |
117 return new WP_Error( 'invalid_object_type', __( 'Invalid object type.' ) ); |
118 } |
118 } |