<?php
/**
 * Utils for the footer
 *
 * @package Multi
 */

if ( ! defined( 'ABSPATH' ) ) {
	die;
}
/**
 * Checks if the footer row is empty
 *
 * @param integer $row Row number.
 * @param array   $positions Array of positions and recpective UI elements .
 */
function multimagazine_is_footer_row_empty( $row, $positions ) {
	foreach ( $positions as $pos ) {
		if ( false !== strpos( $pos, $row . ',' ) ) {
			return false;
		}
	}
	return true;
}

/**
 * Checks if the footer column is empty
 *
 * @param integer $row Row number.
 * @param integer $col Column number.
 * @param array   $positions Array of positions and recpective UI elements .
 */
function multimagazine_is_footer_col_empty( $row, $col, $positions ) {
	foreach ( $positions as $pos ) {
		if ( false !== strpos( $pos, $row . ',' . $col ) ) {
			return false;
		}
	}
	return true;
}
