'; } $content .= sprintf( __( ' Go Premium
To Unlock These Features
Learn More', 'bizpanda' ), $url ); if ( $wrap ) { $content .= ''; } return $content; } /** * Prints simple visibility options * * @since 1.1.7 */ function opanda_print_simple_visibility_options( $postId ) { $hideForMember = get_post_meta($postId, 'opanda_hide_for_member', true); $relock = get_post_meta($postId, 'opanda_relock', true); $relockInterval = get_post_meta($postId, 'opanda_relock_interval', true); $relockIntervalUnits = get_post_meta($postId, 'opanda_relock_interval_units', true); $mobile = get_post_meta($postId, 'opanda_mobile', true); $always = get_post_meta($postId, 'opanda_always', true); $empty = !$hideForMember && !$relock && $mobile && !$always; ?>
- '; foreach($filters as $filter) { echo '
  • '; $scopes = $filter['conditions']; if ( empty($scopes) ) { ?> — ' . __('Show Locker IF', 'bizpanda') . '
  • '; } else { echo '
    ' .__('Hide Locker IF', 'bizpanda'). '
    '; } echo ''; echo ''; } } echo ''; } ?> ' . $param . ' '; $operatorName = opanda_get_visibility_expression_operator( $operation, $type ); echo $operatorName . ' '; if ( is_array( $value ) ) { if ( 'date' === $type ) { if ( isset( $value['start'] ) ) { if ( 'relative' === $value['start']['type'] ) { echo sprintf( __('older than %s %s but younger than %s %s', 'bizpanda'), $value['start']['unitsCount'], $value['start']['units'], $value['end']['unitsCount'], $value['end']['units'] ); } else { echo sprintf( __('%s and %s', 'bizpanda'), date( 'd.m.Y', $value['start'] / 1000 ), date( 'd.m.Y', $value['end'] / 1000 ) ); } } else { if ( 'relative' === $value['type'] ) { echo sprintf( __('%s %s', 'bizpanda'), $value['unitsCount'], $value['units'] ); } else { echo sprintf( __('%s', 'bizpanda'), date( 'd.m.Y', $value / 1000 ) ); } } } else { echo sprintf( __('%s and %s', 'bizpanda'), $value['start'], $value['end'] ); } } else { if ( 'date' === $type ) { echo sprintf( __('%s', 'bizpanda'), date( 'd.m.Y', $value / 1000 ) ); } else { echo '' . $value . '' ; } } } function opanda_get_visibility_expression_operator( $operation, $type ) { switch( $operation ) { case 'equals': return __('equals', 'bizpanda'); case 'notequal': return __('does not equal', 'bizpanda'); case 'greater': return __('greater than', 'bizpanda'); case 'less': return __('less than', 'bizpanda'); case 'older': return __('older than', 'bizpanda'); case 'younger': return __('younger than', 'bizpanda'); case 'contains': return __('contains', 'bizpanda'); case 'notcontain': return __('does not contain', 'bizpanda'); case 'between': if ( $type === 'date') { return ''; } else { return __('between', 'bizpanda'); } default: return $operation; } } function opanda_get_domain($url) { $pieces = parse_url($url); $domain = isset($pieces['host']) ? $pieces['host'] : $pieces['path']; $domain = preg_replace('/^www\./i', '', $domain); return $domain; }