WordPress.org

Make WordPress Core

Ticket #44083: 44083.3.diff

File 44083.3.diff, 871 bytes (added by seusmaniqbal, 2 years ago)
  • wp-includes/functions.php

    diff --git a/wp-includes/functions.php b/wp-includes/functions.php
    index 60229ee10b..9ac6e7e7bf 100644
    a b function wp_mkdir_p( $target ) { 
    16891689        } else {
    16901690                $dir_perms = 0777;
    16911691        }
     1692       
     1693        /**
     1694        * Fires before the directory creation.
     1695        *
     1696        * @since 4.9.7 The action was added.
     1697        *
     1698        * @param string $target Full path to attempt to create.
     1699        */
     1700        do_action('before_directory_creation', $target);
    16921701
    16931702        if ( @mkdir( $target, $dir_perms, true ) ) {
    1694 
     1703               
     1704                /**
     1705                * Fires after the directory creation.
     1706                *
     1707                * @since 4.9.7 The action was added.
     1708                *
     1709                * @param string $target Full path to attempt to create.
     1710                */
     1711                do_action('after_directory_creation', $target);
     1712               
    16951713                /*
    16961714                 * If a umask is set that modifies $dir_perms, we'll have to re-set
    16971715                 * the $dir_perms correctly with chmod()