forked from wolfdevsllc/og-image-overlay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathog-image-overlay.php
58 lines (48 loc) · 1.54 KB
/
og-image-overlay.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
Plugin Name: Open Graph Image Overlay
Plugin URI: https://itsmereal.com/plugins/open-graph-image-overlay
Description: Add automated image overlay on top of Open Graph images. This plugin extends the Open Graph features from Yoast SEO or Rank Math plugin.
Version: 1.2
Author: Al-Mamun Talukder
Author URI: https://itsmereal.com
Requires at least: 4.3
Tested up to: 5.4.1
License: GPLv2 or later
Text Domain: ogio
*/
defined( 'ABSPATH' ) || exit;
/**
* Include Template Parts
*/
require_once __DIR__ . '/admin/functions.php';
require_once __DIR__ . '/admin/customizer.php';
require_once __DIR__ . '/template/config.php';
/**
* Plugin Update Checker
* @source https://github.com/YahnisElsts/plugin-update-checker
*/
require_once __DIR__ . '/includes/update-checker/plugin-update-checker.php';
$imrsmodsUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
'https://github.com/itsmereal/og-image-overlay',
__FILE__,
'og-image-overlay'
);
/**
* Add settings link to plugin actions
*/
function ogio_add_plugin_link ( $links ) {
$link = add_query_arg(
array(
'url' => urlencode( site_url( '/?ogio_settings=true' ) ),
'return' => urlencode( admin_url() ),
'ogio_settings' => 'true',
),
'customize.php?autofocus[section]=ogio_settings'
);
$settings_link = array(
'<a href="' . admin_url( $link ) . '">Settings</a>',
);
return array_merge( $links, $settings_link );
}
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'ogio_add_plugin_link' );