48 lines
1.7 KiB
PHP
48 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* Cognito Forms oEmbed
|
|
*
|
|
* @package CognitoFormsOEmbed
|
|
* @author Cognito Apps
|
|
* @copyright 2021 Cognito LLC
|
|
* @license GPL-3.0-or-later
|
|
*
|
|
* @wordpress-plugin
|
|
* Plugin Name: Cognito Forms oEmbed
|
|
* Plugin URI: http://wordpress.org/plugins/cognito-forms-oembed/
|
|
* Description: Cognito Forms is a free online form builder that integrates seamlessly with WordPress. Create contact forms, registrations forms, surveys, and more!
|
|
* Version: 1.0.0
|
|
* Requires at least: 5.2
|
|
* Requires PHP: 7.2
|
|
* Author: Cognito Apps
|
|
* Author URI: https://www.cognitoforms.com
|
|
* Text Domain: cognito-forms-oembed
|
|
* License: GPL v3 or later
|
|
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
|
*/
|
|
|
|
/**
|
|
* Cognito Forms oEmbed WordPress Plugin.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
if ( !class_exists('CognitoFormsOEmbed') ) {
|
|
class CognitoFormsOEmbed {
|
|
public function __construct() {
|
|
wp_oembed_add_provider( '#https?://(www\.)?cognitoforms\.com/.*#i', 'https://www.cognitoforms.com/f/oembed/', true );
|
|
}
|
|
}
|
|
new CognitoFormsOEmbed;
|
|
} |