function set_default_meta($post_ID){
$current_field_value = get_post_meta($post_ID,'source',true);
$default_meta1 = '<a href="" target_="blank" rel="nofollow"></a>'; //значения полей
$default_meta2 = '';
$default_meta3 = '<img src="" title="Avatar" alt="Avatar"/>';
$default_meta4 = '';
$default_meta5 = '';
if ($current_field_value == '' && !wp_is_post_revision($post_ID)){
add_post_meta($post_ID,'source',$default_meta1,true); //добавление самих полей
add_post_meta($post_ID,'author',$default_meta2,true);
add_post_meta($post_ID,'ava',$default_meta3,true);
add_post_meta($post_ID,'hobby1',$default_meta4,true);
add_post_meta($post_ID,'hobby2',$default_meta5,true);
}
return $post_ID;
}
add_action('wp_insert_post','set_default_meta');
var url = "http://www.yoursite-to-be-counted.com";
var data = {
"method":"pos.plusones.get",
"id": url,
"params":{
"nolog":true,
"id": url,
"source":"widget",
"userId":"@viewer",
"groupId":"@self"
},
"jsonrpc":"2.0",
"key":"p",
"apiVersion":"v1"
};
$.ajax({
type: "POST",
url: "https://clients6.google.com/rpc",
processData: true,
contentType: 'application/json',
data: JSON.stringify(data),
success: function(r){
setCount($(".google-plus-count"), r.result.metadata.globalCounts.count);
}
});
var setCount = function($item, count) {
if (count) {
$item.text(count);
}
};
var url = "http://www.yoursite-to-be-counted.com";
var data = {
"method":"pos.plusones.get",
"id": url,
"params":{
"nolog":true,
"id": url,
"source":"widget",
"userId":"@viewer",
"groupId":"@self"
},
"jsonrpc":"2.0",
"key":"p",
"apiVersion":"v1"
};
$.ajax({
type: "POST",
url: "https://clients6.google.com/rpc",
processData: true,
contentType: 'application/json',
data: JSON.stringify(data),
success: function(r){
setCount($(".google-plus-count"), r.result.metadata.globalCounts.count);
}
});
var setCount = function($item, count) {
if (count) {
$item.text(count);
}
};
location ~ \.php$ {
поменял на location / {
location / {
try_files $uri $uri/ /index.php;
}
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
}
<script>
(function() {
var cx = 'ID';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
window.onload = function(){
document.getElementById('gsc-i-id1').placeholder = '';
};
</script>
add_action('register_post', 'binda_register_fail_redirect', 99, 3);
function binda_register_fail_redirect( $sanitized_user_login, $user_email, $errors ){
//this line is copied from register_new_user function of wp-login.php
$errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
//this if check is copied from register_new_user function of wp-login.php
if ( $errors->get_error_code() ){
//setup your custom URL for redirection
$redirect_url = get_bloginfo('url') . '/registrace';
//add error codes to custom redirection URL one by one
foreach ( $errors->errors as $e => $m ){
$redirect_url = add_query_arg( $e, '1', $redirect_url );
}
//add finally, redirect to your custom page with all errors in attributes
wp_redirect( $redirect_url );
exit;
}
}
var a,b,c,d,e,f,x:real;
begin
writeln('Введите a,x');
readln(a,x);
if a*x=-3 then write('c не определено, деление на 0')
else
begin
b:=x/sqr(3+a*x)+3*x;
d:=x*sin(x)/3-1;
if cos(x)<0 then
write('c не определено, отрицательное число в вещественной степени')
else if cos(x)=0 then write('c не определено, деление на 0')
else
begin
e:=exp(ln(cos(x))*x);
f:=d*d*d/e;
c:=b*f+a+2;
write('c=',c:0:3);
end;
end;
end.