generated from maldersIO/Plugin-Starter
-
Notifications
You must be signed in to change notification settings - Fork 2
/
include-any-page.php
65 lines (49 loc) · 1.79 KB
/
include-any-page.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
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: Include Any Page
* Plugin URI: https://github.com/FreshyMichael/include-any-page
* Description: Include the full output of any exterior page with a simple shortcode that accepts a URL
* Version: 1.0.0
* Author: FreshySites
* Author URI: https://freshysites.com/
* License: GNU v3.0
*/
if ( ! defined( 'ABSPATH' ) ) {
die();
}
/* Include Any Page Start */
//______________________________________________________________________________
add_shortcode('include_any_page', 'file_get_any_page_landing');
function file_get_any_page_landing($atts){
ob_start();
extract(shortcode_atts(array('url' =>'*'), $atts));
return file_get_contents($url);
$ReturnString = ob_get_contents();
ob_end_clean();
return $ReturnString;
}
//______________________________________________________________________________
// All About Updates
// Begin Version Control | Auto Update Checker
require 'plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
// ***IMPORTANT*** Update this path to New Github Repository Master Branch Path
'https://github.com/FreshyMichael/include-any-page',
__FILE__,
// ***IMPORTANT*** Update this to New Repository Master Branch Path
'include-any-page'
);
//Enable Releases
$myUpdateChecker->getVcsApi()->enableReleaseAssets();
//Optional: If you're using a private repository, specify the access token like this:
//
//
//Future Update Note: Comment in these sections and add token and branch information once private git established
//
//
//$myUpdateChecker->setAuthentication('your-token-here');
//Optional: Set the branch that contains the stable release.
//$myUpdateChecker->setBranch('stable-branch-name');
//______________________________________________________________________________
/* Include Any Page End */
?>