Advertisement
artemsemkin

Asli HTML -> WP #1

Jul 6th, 2023 (edited)
753
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2.  
  3. // functions.php of your theme
  4.  
  5. $theme         = wp_get_theme();
  6. $theme_version = $theme->get( 'Version' );
  7.  
  8. // Try to get the parent theme object
  9. $theme_parent = $theme->parent();
  10.  
  11. // Set current theme version as parent not child
  12. if ( $theme_parent ) {
  13.   $theme_version = $theme_parent->Version;
  14. }
  15.  
  16. define( 'ARTS_THEME_VERSION', $theme_version );
  17. define( 'ARTS_THEME_URL', get_template_directory_uri() );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement