ve_all_actions( $this->hook ); // Remove disabled components $components = $this->_maybe_remove_disabled_items( $components ); // Perform the reordering! if ( 0 < count( $components ) ) { $count = 5; foreach ( $components as $k => $v ) { if (strpos( $v, '@' ) !== FALSE) { $obj_v = explode( '@' , $v ); if ( class_exists( $obj_v[0] ) && method_exists( $obj_v[0], $obj_v[1] ) ) { add_action( $this->hook, array( $obj_v[0], $obj_v[1] ), $count ); } // End If Statement } else { if ( function_exists( $v ) ) { add_action( $this->hook, esc_attr( $v ), $count ); } } // End If Statement $count + 5; } } } } // End maybe_apply_restructuring_filter() /** * Maybe remove disabled items from the main ordered array. * @access private * @since 1.0.0 * @param array $components Array with components order. * @return array Re-ordered components with disabled components removed. */ private function _maybe_remove_disabled_items( $components ) { if ( 0 < count( $components ) ) { foreach ( $components as $k => $v ) { if ( false !== strpos( $v, '[disabled]' ) ) { unset( $components[ $k ] ); } } } return $components; } // End _maybe_remove_disabled_items() } // End Class ?>{"id":10,"date":"2016-09-25T00:50:29","date_gmt":"2016-09-25T00:50:29","guid":{"rendered":"http:\/\/odinlife.com\/?page_id=10"},"modified":"2016-09-25T00:50:29","modified_gmt":"2016-09-25T00:50:29","slug":"home","status":"publish","type":"page","link":"https:\/\/odinlife.com\/","title":{"rendered":"Home"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-parts\/template-homepage.php","meta":{"footnotes":""},"class_list":["post-10","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/pages\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":1,"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/pages\/10\/revisions"}],"predecessor-version":[{"id":11,"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/pages\/10\/revisions\/11"}],"wp:attachment":[{"href":"https:\/\/odinlife.com\/wp-json\/wp\/v2\/media?parent=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}