I want to load dynamic HTML content via AJAX, then compile it, because it contains angular directives.
<!DOCTYPE html>
<html ng-app="app">
<head>
/////////////////////////////////////////////////////////// | |
// Plain SASS Trigonometry Algorithm in Taylor Expansion // | |
// // | |
// Based on // | |
// http://japborst.net/posts/sass-sines-and-cosines // | |
/////////////////////////////////////////////////////////// | |
$pi: 3.14159265359; | |
$_precision: 10; |
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |
<?php | |
/** | |
* To get this to work, you need to tinker with the acf/settings/ filter and reset the default language | |
* so that the get_field() function returns the correct results even when not on the default language. | |
* | |
* You can add the filter before you call the get_field() function and then call it again with the current | |
* language to reset it again, so it will affect other pages. | |
* | |
* answer courtesy of James of ACF Support | |
*/ |
[ | |
{ | |
"id": 1, | |
"name": "Adana", | |
"latitude": "37.0000", | |
"longitude": "35.3213", | |
"population": 2183167, | |
"region": "Akdeniz" | |
}, | |
{ |
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: padding-box, border-box; | |
} |
Validator::extend('slug', function($attribute, $value, $parameters, $validator) { | |
return preg_match('/^[a-z0-9]+(?:-[a-z0-9]+)*$/', $value); | |
}); |
/** | |
* Prevent update notification for plugin | |
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
* Place in theme functions.php or at bottom of wp-config.php | |
*/ | |
function disable_plugin_updates( $value ) { | |
if ( isset($value) && is_object($value) ) { | |
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) { | |
unset( $value->response['plugin-folder/plugin.php'] ); | |
} |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.css"/> | |
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick-theme.css"/> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.6.0/slick.min.js"></script> | |
<style> | |
#s { | |
border: solid 1px red; | |
width: 640px; |
/** | |
* Filter the cart template path to use our cart.php template instead of the theme's | |
*/ | |
function csp_locate_template( $template, $template_name, $template_path ) { | |
$basename = basename( $template ); | |
if( $basename == 'cart.php' ) { | |
$template = trailingslashit( plugin_dir_path( __FILE__ ) ) . 'templates/cart.php'; | |
} | |
return $template; | |
} |