Title: autotutorial's Replies - page 10 | WordPress.org

---

# autotutorial

  [  ](https://wordpress.org/support/users/autotutorial/)

 *   [Profile](https://wordpress.org/support/users/autotutorial/)
 *   [Topics Started](https://wordpress.org/support/users/autotutorial/topics/)
 *   [Replies Created](https://wordpress.org/support/users/autotutorial/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/autotutorial/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/autotutorial/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/autotutorial/engagements/)
 *   [Favorites](https://wordpress.org/support/users/autotutorial/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 136 through 150 (of 706 total)

[←](https://wordpress.org/support/users/autotutorial/replies/page/9/?output_format=md)
[1](https://wordpress.org/support/users/autotutorial/replies/?output_format=md) 
[2](https://wordpress.org/support/users/autotutorial/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/autotutorial/replies/page/3/?output_format=md)…
[9](https://wordpress.org/support/users/autotutorial/replies/page/9/?output_format=md)
10 [11](https://wordpress.org/support/users/autotutorial/replies/page/11/?output_format=md)…
[46](https://wordpress.org/support/users/autotutorial/replies/page/46/?output_format=md)
[47](https://wordpress.org/support/users/autotutorial/replies/page/47/?output_format=md)
[48](https://wordpress.org/support/users/autotutorial/replies/page/48/?output_format=md)
[→](https://wordpress.org/support/users/autotutorial/replies/page/11/?output_format=md)

 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Broke sites (idiot at work) please help!](https://wordpress.org/support/topic/broke-sites-idiot-at-work-please-help/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/broke-sites-idiot-at-work-please-help/#post-12245105)
 * by default it is 1 for the primary site. What does it say to you if you look 
   at a network installation Network->settings?
    From WordPress 4.5 the default 
   mapping has started working (it means not using plugin for mapping or obviously
   does not see domains added via plugin, if you want to use the default mapping)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Database calls increased 4X due to “PWA Plugin call”](https://wordpress.org/support/topic/database-calls-increased-4x-due-to-pwa-plugin-call/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/database-calls-increased-4x-due-to-pwa-plugin-call/#post-12244829)
 * static files can be cached, in all the url you see js which is a static file 
   that can be stored in the browser, while admin-ajax.php is called by the javascript
   file with query string.
    Don’t dig deep, that’s all normal. I explained to you
   why the status code 200.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Upgrading to PHP 7.2 breaking this function. How can I fix?](https://wordpress.org/support/topic/upgrading-to-php-7-2-breaking-this-function-how-can-i-fix/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/upgrading-to-php-7-2-breaking-this-function-how-can-i-fix/#post-12243282)
 * Yes split is Removed from PHP 7.0, use preg_split for complex regex or explode
   for you have pices `mychar`.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Upgrading to PHP 7.2 breaking this function. How can I fix?](https://wordpress.org/support/topic/upgrading-to-php-7-2-breaking-this-function-how-can-i-fix/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/upgrading-to-php-7-2-breaking-this-function-how-can-i-fix/#post-12243247)
 * `list($empty, $parent, $child, $grandChild) = explode('/', $_SERVER['REQUEST_URI'],
   4);`
    Explode for max 4 element.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12243160)
 * I’m glad you solved, I update the topic that from WordPress 5.3 current_time 
   always returns the correct time, before WordPress 5.3 **maybe** the correct time.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12243007)
 * Guido yes, DateImmutable returns a non-modifiable object useful in situations
   where it could be modified and this is the strength of current_datetime.
    It 
   is difficult to teach how to code if you have not studied programming, you must
   read a good php book.
 *     ```
       $array = current_datetime();
       $localtime = $array->getTimestamp()+$array->getOffset();
       ```
   
 * $array is the variable with the value of the object, to read the methods or properties
   we use `->`, if the variable é $array each property or method refers to the object
   inside $array
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12242883)
 * I [@guido07111975](https://wordpress.org/support/users/guido07111975/) is that
   DateTime object.
    But there is no need to convert to timestamps if you need the
   time used in your general settings. can you show me the case of using the timestamp?
   if you use the old php function you have to calculate the offset of your php 
   while if you use the DateTime object it will be converted automatically if you
   insert it in DateTimeZone.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12240519)
 * The names are self-explanatory, if you insert the **DateTime** object into a 
   variable you can access it through variable-name->method/property.
    getTimestamp
   retrieves the $array timestamp while getOffset retrieves the $array offset. [https://www.php.net/manual/en/datetime.construct.php](https://www.php.net/manual/en/datetime.construct.php)
   [https://www.php.net/manual/en/datetime.gettimestamp.php](https://www.php.net/manual/en/datetime.gettimestamp.php)
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12240495)
 *     ```
       $array = current_datetime();
       //$localtime = $array->getTimestamp()+$array->getOffset();
   
       // Convert english date
       $datetime2 = $array->format('Y-m-d H:i:s');
       echo $datetime2."\n";
       $datetime3 = new DateTime( $datetime2 );
       $datetime3->setTimezone( new DateTimeZone('America/Atka') );
       echo $datetime3->format('Y-m-d H:i:s')."\n";
       ```
   
 * [Reference](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12240179)
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12240415)
 *     ```
       $array = current_datetime();
       $localtime = $array->getTimestamp()+$array->getOffset();
       var_dump( time(), $localtime );
       ```
   
 * I explained to you you will need to use the DateTime object instead of the old
   php functions.
    [@diondesigns](https://wordpress.org/support/users/diondesigns/)
 * > **Note:**
   > As of PHP 5.1, when called with no arguments, mktime() throws an E_STRICT notice:
   > use the time() function instead.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Replacement for current_time( ‘timestamp’ )](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/replacement-for-current_time-timestamp/#post-12240179)
 * From WordPress 5.3 changes have been made to the datetime component, updated 
   code for the DateTime object.
    I currently proposed a change. [https://core.trac.wordpress.org/ticket/48976](https://core.trac.wordpress.org/ticket/48976)`
   date_default_timezone_set()` it has no effect on the DateTime object if a valid
   DateTimeZone is specified , it is for use of date or strtotime function, instead
   of working with date / strtotime functions, create your code with DateTime and
   DateTimeZone, if you use the syntax setTimeZone for DateTimeZone it is available
   from php 5.2.1 otherwise DateTime exists from php 5.1 but is enabled by php 5.2
   by default.
 *     ```
       $type = 'U';
       $gmt = 0;
       current_time($type,$type);
       ```
   
 * It should add the offset set in the general WordPress settings but does so only
   with my change.
    `$gmt = 1;` for UTC.
 *   Forum: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
   
   In reply to: [Fatal error after upgrading to PHP 7.3](https://wordpress.org/support/topic/fatal-error-after-upgrading-to-php-7-3/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-after-upgrading-to-php-7-3/#post-12235551)
 * [https://wordpress.org/support/topic/wsod-when-upgrading-to-php-7x-using-mysqli/#post-12212129](https://wordpress.org/support/topic/wsod-when-upgrading-to-php-7x-using-mysqli/#post-12212129)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [What Happens to Internal Links After Permalink Change?](https://wordpress.org/support/topic/what-happens-to-internal-links-after-permalink-change/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/what-happens-to-internal-links-after-permalink-change/#post-12235332)
 * [https://wordpress.org/support/topic/regex-expression-for-permalink-change/](https://wordpress.org/support/topic/regex-expression-for-permalink-change/)
   
   [https://wordpress.org/plugins/redirection/](https://wordpress.org/plugins/redirection/)
   ask the plugin support. Source: `^/\d{4}/\d{2}/\d{2}/(.*)` Target: `/$1/` 4 for
   year, 2 month, 2 day, all chars (maybe postname or other).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [What Happens to Internal Links After Permalink Change?](https://wordpress.org/support/topic/what-happens-to-internal-links-after-permalink-change/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/what-happens-to-internal-links-after-permalink-change/#post-12234737)
 * the content is inside the database, when you click on save the permalink paths
   are updated in your database, for this reason I suggest you make a redirect 301
   to the new url.
    Use the redirection plugin with a regex to resolve all the urls.
   If you can show your permalink structure, we can help you find the right regex.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [having issues with WordPress in Chrome](https://wordpress.org/support/topic/having-issues-with-wordpress-in-chrome/)
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/having-issues-with-wordpress-in-chrome/#post-12234678)
 * Did you say eliminating the cache? Here are two methods I recommend. [https://wordpress.org/support/topic/corrupted-plugins/#post-12227823](https://wordpress.org/support/topic/corrupted-plugins/#post-12227823)
 * In short, install the plugin and create a page rule, where you set the url without
   protocol on the wp-admin path and make sure you deselect the cache, you can enable
   security instead of leaving it turned off.

Viewing 15 replies - 136 through 150 (of 706 total)

[←](https://wordpress.org/support/users/autotutorial/replies/page/9/?output_format=md)
[1](https://wordpress.org/support/users/autotutorial/replies/?output_format=md) 
[2](https://wordpress.org/support/users/autotutorial/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/autotutorial/replies/page/3/?output_format=md)…
[9](https://wordpress.org/support/users/autotutorial/replies/page/9/?output_format=md)
10 [11](https://wordpress.org/support/users/autotutorial/replies/page/11/?output_format=md)…
[46](https://wordpress.org/support/users/autotutorial/replies/page/46/?output_format=md)
[47](https://wordpress.org/support/users/autotutorial/replies/page/47/?output_format=md)
[48](https://wordpress.org/support/users/autotutorial/replies/page/48/?output_format=md)
[→](https://wordpress.org/support/users/autotutorial/replies/page/11/?output_format=md)