# share-button/trunk/classes/class-share.php

Social Share Buttons, version trunk. 49 lines.

- Page: https://pluginprobe.com/plugins/share-button/trunk/code/classes/class-share.php
- Raw: https://pluginprobe.com/plugins/share-button/trunk/raw/classes/class-share.php
- Modified: 2017-11-22T15:51:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/share-button/trunk/code/classes/class-share.php#L10-L20`.

```php
<?php
namespace MBSocial;

/* Elements of sharing functionality */ 
class Share 
{

	public function __construct($id = 0) 
	{
		
	
	}
	
	public function save($post) 
	{
		$fields = sanitize_text_field($post['defined_fields']); 
		
		$fields = explode(',', $fields); 
		
		$data = array(); 
		
		foreach($fields as $field_name) 
		{
			
			$field_value = isset($post[$field]) ? sanitize_text_field($post[$field]) : false; 
			$data[$field_name] = $field_value; 
		}
		
		// save here 
	}
	
	public function load() 
	{
		
	}
	
	public function getDataItem($item) 
	{
	
	}
	






}

```
