Astra_Addon_Update::v_1_0_0_rc_9()

Update options of older version than 1.0.0-rc.9.


Description


Return

(void)


Source

File: classes/class-astra-addon-update.php

		public static function v_1_0_0_rc_9() {
			$query_args = array(
				'post_type'      => 'astra-advanced-hook',
				'posts_per_page' => -1,
				'fields'         => 'ids',
			);

			$adv_hooks = new WP_Query( $query_args );
			$layouts   = $adv_hooks->posts;

			if ( is_array( $layouts ) && ! empty( $layouts ) ) {
				foreach ( $layouts as $key => $layout_id ) {

					$hook_layout = get_post_meta( $layout_id, 'ast-advanced-hook-layout', true );
					$hook_action = get_post_meta( $layout_id, 'ast-advanced-hook-action', true );

					if ( '' != $hook_action && '' == $hook_layout ) {

						update_post_meta( $layout_id, 'ast-advanced-hook-layout', 'hooks' );
					}
				}
			}

			wp_reset_postdata();
		}

Changelog

Changelog
Version Description
1.0.0-rc.9 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.