{"id":29662929,"url":"https://github.com/gbti-network/wordpress-perplexity-plugin","last_synced_at":"2026-04-07T07:03:12.105Z","repository":{"id":302001012,"uuid":"1010789719","full_name":"gbti-network/wordpress-perplexity-plugin","owner":"gbti-network","description":"This lightweight WordPress plugin adds a Perplexity lookup to highlighted text inside your site's blog posts.","archived":false,"fork":false,"pushed_at":"2025-07-01T02:13:56.000Z","size":21550,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-29T23:56:59.940Z","etag":null,"topics":["perplexity","perplexity-ai","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://gbti.network/products/wordpress-perplexity-plugin/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbti-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T20:02:37.000Z","updated_at":"2025-08-04T07:36:43.000Z","dependencies_parsed_at":"2025-06-30T03:38:03.195Z","dependency_job_id":null,"html_url":"https://github.com/gbti-network/wordpress-perplexity-plugin","commit_stats":null,"previous_names":["gbti-network/wordpress-perplexity-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gbti-network/wordpress-perplexity-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbti-network%2Fwordpress-perplexity-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbti-network%2Fwordpress-perplexity-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbti-network%2Fwordpress-perplexity-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbti-network%2Fwordpress-perplexity-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbti-network","download_url":"https://codeload.github.com/gbti-network/wordpress-perplexity-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbti-network%2Fwordpress-perplexity-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31503394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["perplexity","perplexity-ai","wordpress","wordpress-plugin"],"created_at":"2025-07-22T11:05:51.312Z","updated_at":"2026-04-07T07:03:12.100Z","avatar_url":"https://github.com/gbti-network.png","language":"JavaScript","funding_links":["https://github.com/sponsors/gbti-network"],"categories":[],"sub_categories":[],"readme":"# Perplexity WordPress Plugin\n\nA WordPress plugin that adds a floating \"Analyze with Perplexity\" button when text is selected on your WordPress site. This plugin enhances the reading experience by providing instant AI-powered analysis of selected content.\n\n## Features\n\n- **Smart Text Selection**: Automatically detects when text is selected on your WordPress posts\n- **Perplexity AI Integration**: Opens selected text in Perplexity AI for instant analysis\n- **Modern Architecture**: Built with ES6 modules and modern JavaScript\n- **Universal Deployment**: Works in standard plugins folder, must-use plugins, child themes, or parent themes\n- **Configurable Positioning**: Customizable icon placement with smart viewport boundary detection\n- **Mobile Support**: Touch-friendly interface with responsive positioning\n- **Debug Mode**: Console logging for development and troubleshooting\n\n## Installation\n\n### Standard Plugin Installation\n1. Download the plugin files\n2. Upload to `/wp-content/plugins/perplexity-learn-more/`\n3. Activate through the WordPress admin panel\n\n### Alternative Installations\nThe plugin automatically detects its environment and works in:\n- **Must-Use Plugins**: `/wp-content/mu-plugins/perplexity-learn-more/`\n- **Child Theme**: `/wp-content/themes/your-child-theme/perplexity-learn-more/`\n- **Parent Theme**: `/wp-content/themes/your-theme/perplexity-learn-more/`\n\n## Configuration\n\n### PHP Configuration Variables\nEdit the static variables in the `PerplexityTextAnalyzer` class:\n\n```php\nclass PerplexityTextAnalyzer {\n    // Plugin version\n    const VERSION = '1.0.2';\n    \n    // Positioning (pixels)\n    public static $position_offset_x = 8;  // Right offset from selection\n    public static $position_offset_y = 0;  // Vertical offset (negative = up, positive = down)\n    \n    // Icon appearance\n    public static $icon_width = 26;\n    public static $icon_height = 26;\n    public static $icon_border_radius = 4;\n    \n    // Behavior\n    public static $min_text_length = 3;    // Minimum characters to trigger\n    public static $debug = true;           // Enable/disable console logging\n}\n```\n\n## Architecture\n\n### Modern JavaScript Structure\n- **Modular Design**: Separate modules for UI, events, actions, positioning, and configuration\n- **ES6 Modules**: Clean imports with dynamic version-based cache busting\n- **Event-Driven**: Uses modern `selectionchange` API instead of legacy mouse events\n- **Promise-Based**: Asynchronous module loading with error handling\n\n### File Structure\n```\nperplexity-learn-more/\n├── css/\n│   └── perplexity-learn-more.css\n├── js/\n│   ├── modules/\n│   │   ├── actions.js      # Perplexity API integration\n│   │   ├── config.js       # Configuration management\n│   │   ├── events.js       # Event handling\n│   │   ├── index.js        # Module coordinator\n│   │   ├── positioning.js  # Smart positioning logic\n│   │   └── ui.js          # DOM manipulation\n│   └── perplexity-learn-more-modular.js\n├── img/\n│   └── perplexity-ai-icon.webp\n├── perplexity-learn-more.php\n└── README.md\n```\n\n## Development\n\n### Debug Mode\nEnable debug mode to see detailed console logging:\n```php\npublic static $debug = true;\n```\n\nDebug output includes:\n- Module loading status\n- Text selection events\n- Positioning calculations\n- Configuration values\n\n### Version Management\nThe plugin uses a centralized version system:\n1. Update `const VERSION` in the PHP class\n2. All assets (CSS, JS, modules) automatically use the new version\n3. Ensures proper cache busting across all environments\n\n### Browser Compatibility\n- Modern browsers supporting ES6 modules\n- Mobile Safari and Chrome for touch events\n- Fallback handling for older browsers\n\n## Technical Features\n\n### Universal Asset Loading\nAutomatically detects environment and constructs correct URLs:\n- Handles Windows/Unix path differences\n- Works with WordPress multisite\n- Supports custom directory structures\n\n### Smart Positioning\n- Positions icon at top-right of selected text\n- Handles multi-line selections\n- Viewport boundary detection prevents off-screen placement\n- Responsive positioning for different screen sizes\n\n### Performance Optimized\n- Lazy module loading\n- Event delegation\n- Minimal DOM manipulation\n- Efficient positioning calculations\n\n## Browser Support\n\n- Chrome 63+\n- Firefox 60+\n- Safari 11+\n- Edge 79+\n\n## More Information\n\nFor detailed documentation, tutorials, and support, visit the [official product page](https://gbti.network/products/wordpress-perplexity-plugin/).\n\n## Contributing\n\nContributions are managed on our [GitHub repository](https://github.com/gbti-network/wordpress-perplexity-plugin).\n\n1. Fork the GitHub repository\n2. Create a feature branch\n3. Make your changes\n4. Test across different WordPress environments\n5. Submit a pull request to the GitHub repository\n\n## License\n\nThis plugin is licensed under the GPL v2 or later.\n\n# GBTI Network \n\nThe **GBTI Network** is a professional co-op network where members have opportunities to share profits, publish products, and contribute articles—all powered by community and GitHub sponsorships.\n\nSponsor our work by becoming a [GBTI Network Member](https://gbti.network/membership) (_powered by GitHub Sponsorship_).\n\n\n## Membership Benefits\n\nBecoming a [GBTI Member](https://github.com/sponsors/gbti-network) unlocks premium tools and perks:\n- **Access to Growing List of Premium WordPress Plugins**\n- **Private GitHub Repositories** with advanced tools and resources.\n- **Membership Directory Listings** (optional)\n- **Engaging Communities** on Private Discord, Reddit, Private Minecraft Server and more.\n  \n\n## Stay Connected\n\nFollow us on your favorite platforms for updates, news, and community discussions:\n- **[Twitter/X](https://twitter.com/gbti_network)**\n- **[GitHub](https://github.com/gbti-network)**\n- **[YouTube](https://www.youtube.com/channel/UCh4FjB6r4oWQW-QFiwqv-UA)**\n- **[Dev.to](https://dev.to/gbti)**\n- **[Daily.dev](https://dly.to/zfCriM6JfRF)**\n- **[Hashnode](https://gbti.hashnode.dev/)**\n- **[Discord Community](https://gbti.network)**\n- **[Reddit Community](https://www.reddit.com/r/GBTI_network)**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbti-network%2Fwordpress-perplexity-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbti-network%2Fwordpress-perplexity-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbti-network%2Fwordpress-perplexity-plugin/lists"}