Skip to content

Commit

Permalink
Fix direct file access
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatrangnet authored and rilwis committed Oct 23, 2024
1 parent 6d0d966 commit 0dbd719
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/01-basic-usage.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'mb_relationships_init',
function () {
Expand Down
4 changes: 4 additions & 0 deletions tests/02-categories-to-posts.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'mb_relationships_init',
function () {
Expand Down
4 changes: 4 additions & 0 deletions tests/03-users-to-posts.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'mb_relationships_init',
function () {
Expand Down
4 changes: 4 additions & 0 deletions tests/04-each-connected.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'mb_relationships_init',
function () {
Expand Down
3 changes: 3 additions & 0 deletions tests/05-sibling-api.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'mb_relationships_init',
Expand Down
4 changes: 4 additions & 0 deletions tests/06-exclude-from-search.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action(
'init',
function() {
Expand Down
4 changes: 4 additions & 0 deletions tests/07-query-by-multiple-relationships.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

/**
* This test creates 2 relationships: from posts to pages and from posts to posts.
* Then it queries for connected items from the current post and belong to either the relationship.
Expand Down
4 changes: 4 additions & 0 deletions tests/08-reciprocal.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
return;
}

add_action( 'mb_relationships_init', function () {
MB_Relationships_API::register( [
'id' => 'posts_to_posts',
Expand Down

0 comments on commit 0dbd719

Please sign in to comment.