This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* theme_page_templates Filter callback | |
* | |
* Merges plugins' template with theme's, making them available for the user | |
* | |
* @param array $theme_templates | |
* @return array $theme_templates | |
*/ | |
function register_plugin_templates ( $theme_templates ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Gets Template Name from the file | |
$filedata = get_file_data($full_path, array( | |
'Template Name' => 'Template Name', | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Plugin_Templates_Loader { | |
/** | |
* Templates folder inside the plugin | |
*/ | |
private $templates_dir; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ACF_Image_Upload { | |
public $post_id; | |
function update_acf ( ) { | |
$attach_id = $this->get_image_attach_id('my-image.jpg'); | |
// Saving image |
NewerOlder