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
?>


