{"id":2461,"date":"2010-11-30T12:49:40","date_gmt":"2010-11-30T09:49:40","guid":{"rendered":"http:\/\/vitaliykiyko.com\/?p=2461"},"modified":"2010-12-18T23:06:58","modified_gmt":"2010-12-18T20:06:58","slug":"update-wordpress-post-date-in-one-click","status":"publish","type":"post","link":"https:\/\/vitaliykiyko.com\/en\/2461\/update-wordpress-post-date-in-one-click\/","title":{"rendered":"\u041e\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f \u0434\u0430\u0442\u0438 \u0434\u043e\u043f\u0438\u0441\u0443 \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0456\u043a"},"content":{"rendered":"<p><em>\u0417\u0430 \u043f\u0456\u0434\u0442\u0440\u0438\u043c\u043a\u0438:<\/em><br \/>\n<em>\u0412\u0441\u0435 <a href=\"http:\/\/www.autodni.com\/\">\u0430\u0432\u0442\u043e\u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u043a\u0438\u0435\u0432<\/a>\u0430 \u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0430\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u0432\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0442\u044e\u043d\u0438\u043d\u0433, \u0430\u0432\u0442\u043e\u0431\u0438\u0437\u043d\u0435\u0441.<\/em><\/p>\n<div class=\"crestock-img\" style=\"margin: 1em; display: block;\">\n<div>\n<dl style=\"width: 410px;\" class=\"wp-caption aligncenter\">\n<dt class=\"wp-caption-dt\"><img loading=\"lazy\" decoding=\"async\" id=\"746924\" src=\"http:\/\/www.psiho.te.ua\/wp-content\/uploads\/crestockimages\/746924-ms.jpg\" alt=\"Old soviet pocket watch covered with rust and ...\" title=\"Old soviet pocket watch covered with rust and ...\" height=\"294\" width=\"400\"><\/dt>\n<dd class=\"wp-caption-dd crestock-img-attribution\" style=\"font-size: 0.8em;\"><a href=\"http:\/\/www.crestock.com\/image\/746924-Time-brings-rust-and-dust.aspx\">Time brings rust and dust<\/a> <\/dd>\n<\/dl>\n<\/div>\n<\/div>\n<p style=\"font-size: 9px; text-align: justify;\">\n<p>\u0423\u044f\u0432\u0456\u043c\u043e, \u0449\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u043f\u0435\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043f\u0438\u0441\u0443 \u0443 \u0431\u043b\u043e\u0437\u0456 \u043d\u0430 WordPress, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432\u0448\u0438 \u0441\u044c\u043e\u0433\u043e\u0434\u043d\u0456\u0448\u043d\u0454 \u0447\u0438\u0441\u043b\u043e. \u041c\u043e\u0436\u043b\u0438\u0432\u043e \u0442\u043e\u043c\u0443, \u0449\u043e \u0437\u0430\u043f\u0438\u0441 \u0441\u0442\u0430\u0432 \u043d\u0435\u0439\u043c\u043e\u0432\u0456\u0440\u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0438\u043c, \u0430 \u043c\u043e\u0436\u043b\u0438\u0432\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0449\u043e\u0431 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0438\u0439 \u0434\u043e\u043f\u0438\u0441 \u0437\u043d\u043e\u0432 \u043f\u0435\u0440\u0448\u0438\u043c \u043d\u0430 \u0431\u043b\u043e\u0437\u0456. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0456, \u043c\u043e\u0442\u0438\u0432\u0430\u0446\u0456\u044f \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0440\u0456\u0437\u043d\u043e\u044e, \u0430 \u0434\u043b\u044f \u043d\u0430\u0441 \u0433\u043e\u043b\u043e\u0432\u043d\u0435 \u0434\u0456\u044f \ud83d\ude42 <\/p>\n<p>\u0423 \u0442\u0430\u043a\u043e\u043c\u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0442\u0440\u0435\u0431\u0430 \u0437\u0430\u0439\u0442\u0438 \u0432 \u0430\u0434\u043c\u0456\u043d\u043a\u0443, \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u0434\u043e\u043f\u0438\u0441\u0443 \u0456 \u0441\u043f\u0440\u0430\u0432\u0430 \u0443 \u0441\u0442\u0440\u0456\u0447\u0446\u0456 &#8220;\u041e\u043f\u0443\u0431\u043b\u0456\u043a\u043e\u0432\u0430\u043d\u043e&#8221; \u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u0438 \u043d\u043e\u0432\u0443 \u0434\u0430\u0442\u0443 \u0442\u0430 \u0447\u0430\u0441 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457. \u041f\u043e\u0442\u0456\u043c \u043a\u043b\u0430\u0446\u043d\u0443\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 &#8220;\u041e\u043d\u043e\u0432\u0438\u0442\u0438&#8221;. \u0412\u0441\u0435 \u0432\u0456\u0440\u043d\u043e? \u041d\u0443 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u043e, \u0432\u0438 \u0432\u0436\u0435 \u0439 \u0441\u0430\u043c\u0456 \u0446\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u0454\u0442\u0435! \ud83d\ude42 \u041d\u0435 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u044f \u043f\u0438\u0448\u0443 \u0446\u0435\u0439 \u043f\u043e\u0441\u0442, \u0449\u043e\u0431 \u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u0434\u0430\u0432\u043d\u043e \u0432\u0456\u0434\u043e\u043c\u0456 \u0440\u0435\u0447\u0456. \u0410, \u043d\u0430\u0432\u043f\u0430\u043a\u0438, \u0449\u043e\u0431 \u043f\u043e\u0434\u0456\u043b\u0438\u0442\u0438\u0441\u044c \u043d\u043e\u0432\u0438\u043c \u0456 \u0446\u0456\u043a\u0430\u0432\u0438\u043c. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043f\u043e\u0434\u0456\u043b\u044e\u0441\u044c \u043a\u043d\u043e\u043f\u043a\u043e\u044e, \u0449\u043e \u0437\u0440\u043e\u0431\u0438\u0442\u044c \u0432\u0441\u044e \u0432\u0438\u0449\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0443 \u0434\u043e\u0432\u0433\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0456\u044e \u043f\u0440\u044f\u043c\u043e \u0443 \u0444\u0440\u043e\u043d\u0442-\u0435\u043d\u0434\u0456 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u0434\u043e\u043f\u0438\u0441\u0443 \u0456 \u0432\u0441\u044c\u043e\u0433\u043e \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0456\u043a!<br \/>\n<!--more--><br \/>\n\u041e\u0441\u044c \u043a\u043e\u0434, \u0449\u043e \u0434\u043e\u0434\u0430\u0441\u0442\u044c \u0446\u044e &#8220;\u0447\u0430\u0440\u0456\u0432\u043d\u0443&#8221; \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442:<\/p>\n<pre lang=\"php\">ID;\r\n\r\n    if (isset($_POST[$postid])){\r\n\r\n    $data = array (\r\n        'ID' =&gt; $postid,\r\n        'post_date'\t=&gt; $current,\r\n    );\r\n\r\n    wp_update_post($data);\r\n\r\n    echo '<span style=\"color: red;\">Time updated!<\/span>';\r\n\r\n    }\r\n?&gt;\r\n<form name=\"timeedit\" method=\"post\" enctype=\"multipart\/form-data\" action=\"\">\r\n<input name=\"&lt;?php echo $postid ?&gt;\" class=\"button\" id=\"send-&lt;?php echo $postid ?&gt;\" value=\"Update Time\" type=\"submit\">\r\n<\/form>\r\n\r\n<\/pre>\n<p><strong>\u0423\u0412\u0410\u0413\u0410! \u0426\u0435\u0439 \u043a\u043e\u0434 \u043f\u043e\u0432\u0438\u043d\u0435\u043d \u0431\u0443\u0442\u0438 \u0443 <em>\u0446\u0438\u043a\u043b\u0456<\/em> (loop)!<\/strong> \u0419\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u0438 \u0443 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u0430\u0431\u043e \u0430\u0440\u0445\u0456\u0432\u0430 \u043f\u043e\u0441\u0442\u0456\u0432. \u041d\u0430\u0439\u043a\u0440\u0430\u0449\u0435, \u043e\u0434\u0440\u0430\u0437\u0443 \u043f\u0456\u0441\u043b\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430.<\/p>\n<p>\u0424\u0456\u043b\u044c\u0442\u0440 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432, \u0434\u043b\u044f \u044f\u043a\u0438\u0445 \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u0430\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430, \u0432\u0456\u0434\u0431\u0443\u0432\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u043e <em>\u043c\u043e\u0436\u043b\u0438\u0432\u043e\u0441\u0442\u0456<\/em> (<a href=\"http:\/\/codex.wordpress.org\/Roles_and_Capabilities\">capability<\/a>). \u042f \u043e\u0431\u0440\u0430\u0432 <em>\u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044c<\/em> \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430 \u043f\u043e\u0441\u0442\u0438\u0442\u0438 html \u0442\u0435\u0433\u0438 \u0447\u0438 \u043d\u0430\u0432\u0456\u0442\u044c js-\u0441\u043a\u0440\u0438\u043f\u0442\u0438 (\u043c\u0430\u044e\u0442\u044c \u0410\u0434\u043c\u0456\u043d \u0456 \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440). \u0414\u043b\u044f \u0433\u043e\u0441\u0442\u0435\u0439 \u0456 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432 \u0437 \u0456\u043d\u0448\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0436\u043e\u0434\u043d\u043e\u0457 \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435.<\/p>\n<p>\u0413\u0430\u0440\u0430\u0437\u0434. \u0410 \u0447\u0438 \u043c\u043e\u0436\u043b\u0438\u0432\u0438\u0439 \u043f\u043e\u0434\u0456\u0431\u043d\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b \u0443 \u0430\u0434\u043c\u0456\u043d\u0446\u0456 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u0432\u0441\u0456\u0445 \u043f\u043e\u0441\u0442\u0456\u0432? \u0417\u0432\u0456\u0441\u043d\u043e! \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0443 \u0444\u0430\u0439\u043b <code>functions.php<\/code> \u0432\u0430\u0448\u043e\u0457 \u0442\u0435\u043c\u0438 \u0441\u043b\u0456\u0434 \u0434\u043e\u0434\u0430\u0442\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre lang=\"php\">ID;\r\n\r\nif (isset($_POST[$postid])){\r\n\r\n$data = array (\r\n    'ID' =&gt; $postid,\r\n    'post_date'\t=&gt; $current,\r\n);\r\nwp_update_post($data);\r\n\r\necho '<span style=\"color: red;\">Time updated!<\/span>';\r\n}\r\n\r\necho '<form name=\"timeedit\" method=\"post\" enctype=\"multipart\/form-data\" action=\"\">';\r\necho '<input name=\"'.$postid.'\" class=\"button\" id=\"send-'.$postid.'\" value=\"Update Time\" type=\"submit\">';\r\necho '<\/form>';\r\n\r\n}\r\n}\r\n?&gt;\r\n<\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440, \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u043f\u043e\u0441\u0442\u0456\u0432 \u0443 \u0430\u0434\u043c\u0456\u043d\u0446\u0456 \u0434\u043b\u044f \u0442\u0438\u0445 \u0436\u0435 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0456\u0432 (\u0410\u0434\u043c\u0456\u043d \u0456 \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440) \u0437&#8217;\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u0430 \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u0437 \u043a\u043d\u043e\u043f\u043a\u043e\u044e &#8220;Edit Time&#8221; \u043d\u0430\u0432\u043f\u0440\u043e\u0442\u0438 \u043a\u043e\u0436\u043d\u043e\u0433\u043e \u0434\u043e\u043f\u0438\u0441\u0443. \u0420\u043e\u0431\u0438\u0442\u044c \u0432\u043e\u043d\u0430 \u0442\u0435 \u0436 \u0441\u0430\u043c\u0435 &#8211; \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0456\u043a \u043e\u043d\u043e\u0432\u043b\u044e\u0454 \u0434\u0430\u0442\u0443 \u0456 \u0447\u0430\u0441 \u0434\u043e\u043f\u0438\u0441\u0443 \u043d\u0430 \u043f\u043e\u0442\u043e\u0447\u043d\u0456.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430 \u043f\u0456\u0434\u0442\u0440\u0438\u043c\u043a\u0438: \u0412\u0441\u0435 \u0430\u0432\u0442\u043e\u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u043a\u0438\u0435\u0432\u0430 \u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0430\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u0432\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0442\u044e\u043d\u0438\u043d\u0433, \u0430\u0432\u0442\u043e\u0431\u0438\u0437\u043d\u0435\u0441. Time brings rust and dust \u0423\u044f\u0432\u0456\u043c\u043e, \u0449\u043e \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0434\u0430\u0442\u0443 \u043f\u0435\u0432\u043d\u043e\u0433\u043e \u0434\u043e\u043f\u0438\u0441\u0443 \u0443 \u0431\u043b\u043e\u0437\u0456 \u043d\u0430 WordPress, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432\u0448\u0438 \u0441\u044c\u043e\u0433\u043e\u0434\u043d\u0456\u0448\u043d\u0454 \u0447\u0438\u0441\u043b\u043e. \u041c\u043e\u0436\u043b\u0438\u0432\u043e \u0442\u043e\u043c\u0443, \u0449\u043e \u0437\u0430\u043f\u0438\u0441 \u0441\u0442\u0430\u0432 \u043d\u0435\u0439\u043c\u043e\u0432\u0456\u0440\u043d\u043e&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[47,136],"_links":{"self":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts\/2461"}],"collection":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/comments?post=2461"}],"version-history":[{"count":0,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts\/2461\/revisions"}],"wp:attachment":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/media?parent=2461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/categories?post=2461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/tags?post=2461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}