# Mid PhotoCard - WordPress Plugin

Create beautiful photocards with customizable elements for your WordPress site.

## Features

- 📸 **Background Image Upload** - Use any image as the background for your photocard
- 🏷️ **5 Customizable Elements**:
  1. **Site Logo** - Positioned at top right corner
  2. **Title** - Main headline in center (with custom font size)
  3. **Date & Category** - Displayed together in a styled box
  4. **Site Name** - Shown at the bottom in a branded box

- ✏️ **Manual Editing** - Override any field with custom values
- 🎨 **Auto-Population** - Automatically pulls data from WordPress (site name, logo, current date)
- 💾 **Download & Share** - Generated photocards can be downloaded or shared via URL

## Installation

1. Upload the `mid-photocard` folder to `/wp-content/plugins/` directory
2. Download font files (see `assets/fonts/README.md`) and place them in `assets/fonts/` directory
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Go to **PhotoCard** menu in the admin dashboard

## Requirements

- WordPress 5.0 or higher
- PHP 7.0 or higher
- GD Library enabled in PHP

## Usage

### Creating a PhotoCard

1. Navigate to **PhotoCard > Create New** in the WordPress admin
2. Upload or select a background image
3. Fill in the details:
   - **Site Logo** - Upload your logo (defaults to site icon)
   - **Category** - Enter category name
   - **Date** - Enter or edit the date (defaults to today)
   - **Title** - Enter your main headline
   - **Site Name** - Enter site name (defaults to site name)
4. Adjust title font size if needed
5. Click **Preview** to see a preview or **Generate PhotoCard** to create the final image
6. Download the generated image or copy its URL

### Settings

Go to **PhotoCard > Settings** to configure:
- Default site name
- Default site logo
- Default background image
- Canvas dimensions (width and height)

## Photocard Layout

```
┌─────────────────────────────────────┐
│                        [1. Logo]     │
│                                      │
│    [Background Image]                │
│                                      │
│    ┌──────────────────────┐         │
│    │ [3. Cat] | [3. Date] │         │
│    └──────────────────────┘         │
│    ┌───────────────────────────┐    │
│    │  [4. Main Title Text]     │    │
│    └───────────────────────────┘    │
│         ┌──────────────┐            │
│         │ [5. SiteName]│            │
│         └──────────────┘            │
└─────────────────────────────────────┘
```

## Customization

### Fonts

Place your custom fonts in `assets/fonts/` directory. The plugin uses:
- `NotoSans-Regular.ttf` - For regular text
- `NotoSans-Bold.ttf` - For title text

### Colors

Default colors (can be modified in `class-mid-photocard-generator.php`):
- Border color: `#EF2875` (Pink/Red)
- Title color: `#FFED00` (Yellow)
- Text color: `#FFFFFF` (White)

### Canvas Size

Default: 1200x600px (optimized for social media)
Can be changed in Settings page

## Support

For issues, questions, or contributions, please visit the plugin repository.

## License

GPL v2 or later

## Version

1.0.0

## Author

InsideVer
