This file contains 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 | |
/* | |
Plugin Name: Disable REST API for anonymous users | |
*/ | |
/** | |
* Remove all endpoints except SAML / oEmbed for unauthenticated users | |
*/ | |
add_filter( 'rest_authentication_errors', function($result) { | |
if ( ! empty( $result ) ) { |
This file contains 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
// Shortcode | |
// source : https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524362 | |
if(!function_exists('carousel_content')){ | |
function carousel_content( $atts, $content = null ) { | |
return '<div class="owl-carousel content-carousel content-slider">'.do_shortcode($content).'</div>'; | |
} | |
add_shortcode('carousel_content', 'carousel_content'); | |
} |
This file contains 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 | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
class WordPress_Plugin_Template_Settings { | |
private $dir; | |
private $file; | |
private $assets_dir; | |
private $assets_url; | |
private $settings_base; |