Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump WP tested-up-to version and stable tag #80

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ or directly in `composer.json`:

```
"require": {
"10up/wp-content-connect": "^1.5.0"
"10up/wp-content-connect": "^1.6.0"
}
```

Expand All @@ -39,11 +39,11 @@ Alternatively, if you prefer to have composer install it as a plugin, you may re
"package": {
"name": "10up/wp-content-connect",
"type": "wordpress-plugin",
"version": "1.5.0",
"version": "1.6.0",
"source": {
"url": "https://github.com/10up/wp-content-connect.git",
"type": "git",
"reference": "1.5.0"
"reference": "1.6.0"
}
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@ function my_define_relationships( $registry ) {
),
);

$relationship = $registry->define_post_to_post( 'car', 'tire', 'car-tires', $args );
$relationship = $registry->define_post_to_post( 'car', 'tire', 'car-tires', $args );
}
add_action( 'tenup-content-connect-init', 'my_define_relationships' );

Expand Down Expand Up @@ -155,8 +155,8 @@ function my_define_relationships( $registry ) {
),
),
)
$relationship = $registry->define_post_to_user( 'post', 'related', $args );

$relationship = $registry->define_post_to_user( 'post', 'related', $args );
}
add_action( 'tenup-content-connect-init', 'my_define_relationships' );
```
Expand Down Expand Up @@ -255,8 +255,8 @@ Returns the relationship object between the two post types with the provided nam

#### Parameters:

`$cpt1` (String) The first post type in the relationship
`$cpt1` (String) The first post type in the relationship

`$cpt2` (String) The second post type in the relationship

`$name` (String) The name of the relationship, as passed to define_post_to_post_relationship
Expand All @@ -275,7 +275,7 @@ Returns the relationship object between the post types and users with the provid

#### Parameters:

`$post_type` (String) The post type in the post to user relationship
`$post_type` (String) The post type in the post to user relationship

`$name` (String) The name of the relationship, as passed to define_post_to_user_relationship

Expand Down Expand Up @@ -305,7 +305,7 @@ $relationship->add_relationship( 1, 2 ); // Adds a relationship between post ID
```

### `PostToPost->delete_relationship( $pid1, $pid2 )`
This methods deletes a relationship between one post and another, in a post to post relationship. When calling this method, the order of IDs passed is not important.
This methods deletes a relationship between one post and another, in a post to post relationship. When calling this method, the order of IDs passed is not important.

#### Parameters:

Expand All @@ -317,7 +317,7 @@ This methods deletes a relationship between one post and another, in a post to p
```php
// $relationship is the return value from ->define_post_to_post()
// Note that the example above added these in the reverse order, but the relationship is still deleted
$relationship->delete_relationship( 2, 1 ); // Deletes the relationship between post ID 1 and post ID 2.
$relationship->delete_relationship( 2, 1 ); // Deletes the relationship between post ID 1 and post ID 2.
```

### `PostToPost->replace_relationships( $post_id, $related_ids )`
Expand Down Expand Up @@ -357,7 +357,7 @@ $relationship->save_sort_data( 5, array( 7, 6, 3, 8, 2 ) );
```

### `PostToUser->add_relationship( $post_id, $user_id )`
This method adds a relationship between a post and a user, in a post to user relationship.
This method adds a relationship between a post and a user, in a post to user relationship.

#### Parameters:

Expand All @@ -372,7 +372,7 @@ This method adds a relationship between a post and a user, in a post to user rel
$relationship->add_relationship( 1, 5 ); // Adds a relationship between post 1 and user 5
```

### `PostToUser->delete_relationship( $post_id, $user_id )`
### `PostToUser->delete_relationship( $post_id, $user_id )`
This method deletes a relationship between a post and a user, in a post to user relationship.

#### Parameters:
Expand Down Expand Up @@ -442,7 +442,7 @@ Post ID has 5 users that need to be stored in the following order: 2, 4, 1, 6, 3
$relationship->save_post_to_user_sort_data( 5, array( 2, 4, 1, 6, 3 ) );
```

### `PostToUser->save_user_to_post_sort_data( $user_id, $ordered_post_ids )`
### `PostToUser->save_user_to_post_sort_data( $user_id, $ordered_post_ids )`
For a relationship with sorting enabled, this saves the order of posts for a particular user

#### Parameters:
Expand Down
21 changes: 11 additions & 10 deletions content-connect.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?php
/**
* Plugin Name: WP Content Connect
* Plugin URI: https://github.com/10up/wp-content-connect
* Description: WordPress library that enables direct relationships for posts to posts and posts to users.
* Version: 1.5.0
* Author: Chris Marslender
* Author URI:
* License: GPLv3
* License URI: https://opensource.org/licenses/GPL-3.0
* Update URI: https://github.com/10up/wp-content-connect
*
* Plugin Name: WP Content Connect
* Plugin URI: https://github.com/10up/wp-content-connect
* Description: WordPress library that enables direct relationships for posts to posts and posts to users.
* Version: 1.6.0
* Requires at least: 6.5
* Requires PHP: 8.0
* Author: Chris Marslender, 10up
* Author URI: https://10up.com
* License: GPL-3.0
* License URI: https://opensource.org/licenses/GPL-3.0
* Update URI: https://github.com/10up/wp-content-connect
*/

require_once __DIR__ . '/autoload.php';
Expand Down
2 changes: 1 addition & 1 deletion includes/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function instance() {

public function __construct() {
$this->url = plugin_dir_url( dirname( __FILE__ ) );
$this->version = '1.0.0';
$this->version = '1.6.0';
}

public function get_registry() {
Expand Down
11 changes: 11 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
=== WP Content Connect ===
Contributors: cmmarslender, 10up
Tags:
Requires at least: 6.5
Tested up to: 6.7
Stable tag: 1.6.0
Requires PHP: 8.0
License: GPL-3.0
License URI: https://spdx.org/licenses/GPL-3.0.html

WordPress library that enables direct relationships for posts to posts and posts to users.