

{"id":2653,"date":"2020-05-20T11:02:37","date_gmt":"2020-05-20T09:02:37","guid":{"rendered":"https:\/\/codeermeneer.nl\/?p=2653"},"modified":"2020-05-20T11:02:37","modified_gmt":"2020-05-20T09:02:37","slug":"add-more-intervals-to-the-options","status":"publish","type":"post","link":"https:\/\/wijzijnqreative.nl\/web\/documentation\/add-more-intervals-to-the-options\/","title":{"rendered":"Add more intervals to the options in Companion Auto Update"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">Companion Auto Update allows you to change how often certain features will run (Updaters, Notifications etc.) and by default it comes with the options for Hourly, Twice a day, Daily, Weekly and Monthly.<\/p>\n\n\n\n<p>But, we are all about giving you full control so if you want to add custom intervals to the plugin you can do this by adding the following code into your themes functions.php file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><span class=\"has-inline-color has-pale-cyan-blue-color\">function <\/span><span class=\"has-inline-color has-vivid-green-cyan-color\">codeermeneer_add_more_intervals<\/span>( <span class=\"has-inline-color has-luminous-vivid-orange-color\">$schedules<\/span> ) {\n\n     <code>$schedules[<span class=\"has-inline-color has-luminous-vivid-amber-color\">'six_hours'<\/span>] = <span class=\"has-inline-color has-pale-cyan-blue-color\">array<\/span>( <\/code>\n        <code><span class=\"has-inline-color has-luminous-vivid-amber-color\">'interval'<\/span> =&gt; 21600, <span class=\"has-inline-color has-cyan-bluish-gray-color\">\/\/ 6 hours in seconds <\/span><\/code>\n        <code><span class=\"has-inline-color has-luminous-vivid-amber-color\">'display'<\/span> =&gt; 'Every 6 hours', <\/code>\n     <code>); <\/code>\n\n     <code><span class=\"has-inline-color has-vivid-red-color\">return <\/span>$schedules;<\/code>\n\n}\n<span class=\"has-inline-color has-pale-cyan-blue-color\">add_filter<\/span>( <span class=\"has-inline-color has-luminous-vivid-amber-color\">'cron_schedules', 'codeermeneer_add_more_intervals'<\/span> );<\/pre>\n\n\n\n<p>The number after <em>interval<\/em> is the time you want in seconds. So 21600 in 6 hours in seconds. <em>display <\/em> is the name it&#8217;ll have in the dashboard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Companion Auto Update allows you to change how often certain features will run (Updaters, Notifications etc.) and by default it comes with the options for Hourly, Twice a day, Daily, Weekly and Monthly. But, we are all about giving you full control so if you want to add custom intervals to the plugin you can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":857,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,30],"tags":[],"class_list":["post-2653","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-auto-updater","category-documentation"],"_links":{"self":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/comments?post=2653"}],"version-history":[{"count":0,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/posts\/2653\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media\/857"}],"wp:attachment":[{"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/media?parent=2653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/categories?post=2653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wijzijnqreative.nl\/web\/wp-json\/wp\/v2\/tags?post=2653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}