[wp-trac] [WordPress Trac] #41152: New Function to Require a	file
    WordPress Trac 
    noreply at wordpress.org
       
    Sat Jun 24 18:23:03 UTC 2017
    
    
  
#41152: New Function to Require a file
-----------------------------+------------------------------
 Reporter:  rinkuyadav999    |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Themes           |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  close            |     Focuses:
-----------------------------+------------------------------
Comment (by rinkuyadav999):
 @joyously
 wp_require_parent_theme_file function and it's code does not matter.
 Question: I need a function to do:
 {{{#!php
 <?php
 // Now i need to do
 require get_template_directory() . '/inc/init.php';
 //Expecting
 some_func( '/inc/init.php' );
 //some_func will do reset of work.
 }}}
 This works, require in a function.
 {{{#!php
 <?php
 function some()
 {
         require( 'inc/customizer.php' );
 }
 some();
 }}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41152#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list