Linux 软件免费装

User Object Framework

开发者 jmdodd
更新时间 2012年10月1日 22:42
PHP版本: WordPress 3.4 及以上
WordPress版本: 3.4.2

标签

user relationship framework metadata object

下载

0.1

详情介绍:

This plugin creates a user-object relationship table and a user-object relationship metadata table. Relationships between a user (logged-in or IP) are created and added to the relationship table; metadata (ex. votes, flags, and ratings) is attached to that particular relationship via the metadata table. This is a framework; it is intended for use in voting, flagging, and similar user applications where a user-affiliated metadata is attached to an object. Supported object tables include wp_posts, wp_comments, wp_users, and wp_bp_activity. Functions are provided to add/get/delete relationships; metadata is added via the native WordPress metadata-handling functions.

安装:

  1. Upload the directory user-object-framework and its contents to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.

升级注意事项:

0.1
  • Initial release.

其他记录:

Functions provided by this framework include: Example code: // Create or get the user-object relationship. $relationship = ucc_uof_get_relationship( $user_id, $user_ip, $object_id, $object_ref ); if ( empty( $relationship ) ) $relationship = ucc_uof_add_relationship( $user_id, $user_ip, $object_id, $object_ref ); // Add user_object_meta. if ( $mode == 'delete' ) delete_metadata( 'uof_user_object', $relationship, '_your_meta_key' ); else update_metadata( 'uof_user_object', $relationship, '_your_meta_key', 'your meta key value' );

更新日志:

0.1