3v4l.org

run code in 300+ PHP versions simultaneously
<?php //* Start the engine include_once( get_template_directory() . '/lib/init.php' ); //* Set Localization (do not remove) load_child_theme_textdomain( 'going-green', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'going-green' ) ); //* Child theme (do not remove) define( 'CHILD_THEME_NAME', __( 'Going Green Pro Theme', 'going-green' ) ); define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/goinggreen/' ); define( 'CHILD_THEME_VERSION', '3.0.0' ); //* Add HTML5 markup structure add_theme_support( 'html5' ); //* Add viewport meta tag for mobile browsers add_theme_support( 'genesis-responsive-viewport' ); //* Enqueue Google fonts add_action( 'wp_enqueue_scripts', 'going_green_google_fonts' ); function going_green_google_fonts() { wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Lato:300,700|Lora:700', array(), CHILD_THEME_VERSION ); } //* Add new image sizes add_image_size( 'featured-image', 900, 440, true ); //* Add support for custom background add_theme_support( 'custom-background' ); //* Add support for custom header add_theme_support( 'custom-header', array( 'width' => 340, 'height' => 70, 'header_image' => '', 'header-selector' => '.site-header .title-area', 'header-text' => false ) ); //* Add support for additional color style options add_theme_support( 'genesis-style-selector', array( 'going-green-pro-forest' => __( 'Going Green Pro Forest', 'going-green' ), 'going-green-pro-mint' => __( 'Going Green Pro Mint', 'going-green' ), 'going-green-pro-olive' => __( 'Going Green Pro Olive', 'going-green' ), ) ); //* Add support for structural wraps add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) ); //* Add support for 3-column footer widgets add_theme_support( 'genesis-footer-widgets', 3 ); //* Unregister layout settings genesis_unregister_layout( 'content-sidebar-sidebar' ); genesis_unregister_layout( 'sidebar-content-sidebar' ); genesis_unregister_layout( 'sidebar-sidebar-content' ); //* Unregister secondary sidebar unregister_sidebar( 'sidebar-alt' ); //* Reposition the navigation remove_action( 'genesis_after_header', 'genesis_do_nav' ); remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before_header', 'genesis_do_nav' ); add_action( 'genesis_before_header', 'genesis_do_subnav' ); //* Remove default post image remove_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); //* Add featured image above the entry content add_action( 'genesis_entry_header', 'going_green_featured_photo', 5 ); function going_green_featured_photo() { if ( is_page() || ! genesis_get_option( 'content_archive_thumbnail' ) ) return; if ( $image = genesis_get_image( array( 'format' => 'url', 'size' => genesis_get_option( 'image_size' ) ) ) ) { printf( '<div class="featured-image"><img src="%s" alt="%s" /></div>', $image, the_title_attribute( 'echo=0' ) ); } } //* Customize the post meta function add_filter( 'genesis_post_meta', 'post_meta_filter' ); function post_meta_filter($post_meta) { if (!is_page()) { $post_meta = '[post_categories before=""] [post_tags before="' . __( 'Tagged: ', 'going-green' ) . '"]'; return $post_meta; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nU3KH
function name:  (null)
number of ops:  125
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'get_template_directory'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '%2Flib%2Finit.php'
          3        INCLUDE_OR_EVAL                                          ~1, INCLUDE_ONCE
    6     4        INIT_FCALL_BY_NAME                                       'load_child_theme_textdomain'
          5        SEND_VAL_EX                                              'going-green'
          6        INIT_FCALL_BY_NAME                                       'apply_filters'
          7        SEND_VAL_EX                                              'child_theme_textdomain'
          8        INIT_FCALL_BY_NAME                                       'get_stylesheet_directory'
          9        DO_FCALL                                      0  $3      
         10        CONCAT                                           ~4      $3, '%2Flanguages'
         11        SEND_VAL_EX                                              ~4
         12        SEND_VAL_EX                                              'going-green'
         13        DO_FCALL                                      0  $5      
         14        SEND_VAR_NO_REF_EX                                       $5
         15        DO_FCALL                                      0          
    9    16        INIT_FCALL                                               'define'
         17        SEND_VAL                                                 'CHILD_THEME_NAME'
         18        INIT_FCALL_BY_NAME                                       '__'
         19        SEND_VAL_EX                                              'Going+Green+Pro+Theme'
         20        SEND_VAL_EX                                              'going-green'
         21        DO_FCALL                                      0  $7      
         22        SEND_VAR                                                 $7
         23        DO_ICALL                                                 
   10    24        INIT_FCALL                                               'define'
         25        SEND_VAL                                                 'CHILD_THEME_URL'
         26        SEND_VAL                                                 'http%3A%2F%2Fmy.studiopress.com%2Fthemes%2Fgoinggreen%2F'
         27        DO_ICALL                                                 
   11    28        INIT_FCALL                                               'define'
         29        SEND_VAL                                                 'CHILD_THEME_VERSION'
         30        SEND_VAL                                                 '3.0.0'
         31        DO_ICALL                                                 
   14    32        INIT_FCALL_BY_NAME                                       'add_theme_support'
         33        SEND_VAL_EX                                              'html5'
         34        DO_FCALL                                      0          
   17    35        INIT_FCALL_BY_NAME                                       'add_theme_support'
         36        SEND_VAL_EX                                              'genesis-responsive-viewport'
         37        DO_FCALL                                      0          
   20    38        INIT_FCALL_BY_NAME                                       'add_action'
         39        SEND_VAL_EX                                              'wp_enqueue_scripts'
         40        SEND_VAL_EX                                              'going_green_google_fonts'
         41        DO_FCALL                                      0          
   26    42        INIT_FCALL_BY_NAME                                       'add_image_size'
         43        SEND_VAL_EX                                              'featured-image'
         44        SEND_VAL_EX                                              900
         45        SEND_VAL_EX                                              440
         46        SEND_VAL_EX                                              <true>
         47        DO_FCALL                                      0          
   29    48        INIT_FCALL_BY_NAME                                       'add_theme_support'
         49        SEND_VAL_EX                                              'custom-background'
         50        DO_FCALL                                      0          
   32    51        INIT_FCALL_BY_NAME                                       'add_theme_support'
         52        SEND_VAL_EX                                              'custom-header'
   33    53        SEND_VAL_EX                                              <array>
         54        DO_FCALL                                      0          
   41    55        INIT_FCALL_BY_NAME                                       'add_theme_support'
         56        SEND_VAL_EX                                              'genesis-style-selector'
   42    57        INIT_FCALL_BY_NAME                                       '__'
         58        SEND_VAL_EX                                              'Going+Green+Pro+Forest'
         59        SEND_VAL_EX                                              'going-green'
         60        DO_FCALL                                      0  $17     
         61        INIT_ARRAY                                       ~18     $17, 'going-green-pro-forest'
   43    62        INIT_FCALL_BY_NAME                                       '__'
         63        SEND_VAL_EX                                              'Going+Green+Pro+Mint'
         64        SEND_VAL_EX                                              'going-green'
         65        DO_FCALL                                      0  $19     
         66        ADD_ARRAY_ELEMENT                                ~18     $19, 'going-green-pro-mint'
   44    67        INIT_FCALL_BY_NAME                                       '__'
         68        SEND_VAL_EX                                              'Going+Green+Pro+Olive'
         69        SEND_VAL_EX                                              'going-green'
         70        DO_FCALL                                      0  $20     
         71        ADD_ARRAY_ELEMENT                                ~18     $20, 'going-green-pro-olive'
         72        SEND_VAL_EX                                              ~18
         73        DO_FCALL                                      0          
   48    74        INIT_FCALL_BY_NAME                                       'add_theme_support'
         75        SEND_VAL_EX                                              'genesis-structural-wraps'
   49    76        SEND_VAL_EX                                              <array>
         77        DO_FCALL                                      0          
   58    78        INIT_FCALL_BY_NAME                                       'add_theme_support'
         79        SEND_VAL_EX                                              'genesis-footer-widgets'
         80        SEND_VAL_EX                                              3
         81        DO_FCALL                                      0          
   61    82        INIT_FCALL_BY_NAME                                       'genesis_unregister_layout'
         83        SEND_VAL_EX                                              'content-sidebar-sidebar'
         84        DO_FCALL                                      0          
   62    85        INIT_FCALL_BY_NAME                                       'genesis_unregister_layout'
         86        SEND_VAL_EX                                              'sidebar-content-sidebar'
         87        DO_FCALL                                      0          
   63    88        INIT_FCALL_BY_NAME                                       'genesis_unregister_layout'
         89        SEND_VAL_EX                                              'sidebar-sidebar-content'
         90        DO_FCALL                                      0          
   66    91        INIT_FCALL_BY_NAME                                       'unregister_sidebar'
         92        SEND_VAL_EX                                              'sidebar-alt'
         93        DO_FCALL                                      0          
   69    94        INIT_FCALL_BY_NAME                                       'remove_action'
         95        SEND_VAL_EX                                              'genesis_after_header'
         96        SEND_VAL_EX                                              'genesis_do_nav'
         97        DO_FCALL                                      0          
   70    98        INIT_FCALL_BY_NAME                                       'remove_action'
         99        SEND_VAL_EX                                              'genesis_after_header'
        100        SEND_VAL_EX                                              'genesis_do_subnav'
        101        DO_FCALL                                      0          
   71   102        INIT_FCALL_BY_NAME                                       'add_action'
        103        SEND_VAL_EX                                              'genesis_before_header'
        104        SEND_VAL_EX                                              'genesis_do_nav'
        105        DO_FCALL                                      0          
   72   106        INIT_FCALL_BY_NAME                                       'add_action'
        107        SEND_VAL_EX                                              'genesis_before_header'
        108        SEND_VAL_EX                                              'genesis_do_subnav'
        109        DO_FCALL                                      0          
   75   110        INIT_FCALL_BY_NAME                                       'remove_action'
        111        SEND_VAL_EX                                              'genesis_entry_content'
        112        SEND_VAL_EX                                              'genesis_do_post_image'
        113        SEND_VAL_EX                                              8
        114        DO_FCALL                                      0          
   78   115        INIT_FCALL_BY_NAME                                       'add_action'
        116        SEND_VAL_EX                                              'genesis_entry_header'
        117        SEND_VAL_EX                                              'going_green_featured_photo'
        118        SEND_VAL_EX                                              5
        119        DO_FCALL                                      0          
   89   120        INIT_FCALL_BY_NAME                                       'add_filter'
        121        SEND_VAL_EX                                              'genesis_post_meta'
        122        SEND_VAL_EX                                              'post_meta_filter'
        123        DO_FCALL                                      0          
   95   124      > RETURN                                                   1

Function going_green_google_fonts:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nU3KH
function name:  going_green_google_fonts
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL_BY_NAME                                       'wp_enqueue_style'
          1        SEND_VAL_EX                                              'google-font'
          2        SEND_VAL_EX                                              '%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DLato%3A300%2C700%7CLora%3A700'
          3        SEND_VAL_EX                                              <array>
          4        FETCH_CONSTANT                                   ~0      'CHILD_THEME_VERSION'
          5        SEND_VAL_EX                                              ~0
          6        DO_FCALL                                      0          
   23     7      > RETURN                                                   null

End of function going_green_google_fonts

Function going_green_featured_photo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 8
filename:       /in/nU3KH
function name:  going_green_featured_photo
number of ops:  29
compiled vars:  !0 = $image
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   80     0  E >   INIT_FCALL_BY_NAME                                       'is_page'
          1        DO_FCALL                                      0  $1      
          2      > JMPNZ_EX                                         ~2      $1, ->8
          3    >   INIT_FCALL_BY_NAME                                       'genesis_get_option'
          4        SEND_VAL_EX                                              'content_archive_thumbnail'
          5        DO_FCALL                                      0  $3      
          6        BOOL_NOT                                         ~4      $3
          7        BOOL                                             ~2      ~4
          8    > > JMPZ                                                     ~2, ->10
   81     9    > > RETURN                                                   null
   83    10    >   INIT_FCALL_BY_NAME                                       'genesis_get_image'
         11        INIT_ARRAY                                       ~5      'url', 'format'
         12        INIT_FCALL_BY_NAME                                       'genesis_get_option'
         13        SEND_VAL_EX                                              'image_size'
         14        DO_FCALL                                      0  $6      
         15        ADD_ARRAY_ELEMENT                                ~5      $6, 'size'
         16        SEND_VAL_EX                                              ~5
         17        DO_FCALL                                      0  $7      
         18        ASSIGN                                           ~8      !0, $7
         19      > JMPZ                                                     ~8, ->28
   84    20    >   INIT_FCALL                                               'printf'
         21        SEND_VAL                                                 '%3Cdiv+class%3D%22featured-image%22%3E%3Cimg+src%3D%22%25s%22+alt%3D%22%25s%22+%2F%3E%3C%2Fdiv%3E'
         22        SEND_VAR                                                 !0
         23        INIT_FCALL_BY_NAME                                       'the_title_attribute'
         24        SEND_VAL_EX                                              'echo%3D0'
         25        DO_FCALL                                      0  $9      
         26        SEND_VAR                                                 $9
         27        DO_ICALL                                                 
   86    28    > > RETURN                                                   null

End of function going_green_featured_photo

Function post_meta_filter:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nU3KH
function name:  post_meta_filter
number of ops:  14
compiled vars:  !0 = $post_meta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   90     0  E >   RECV                                             !0      
   91     1        INIT_FCALL_BY_NAME                                       'is_page'
          2        DO_FCALL                                      0  $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->13
   92     5    >   INIT_FCALL_BY_NAME                                       '__'
          6        SEND_VAL_EX                                              'Tagged%3A+'
          7        SEND_VAL_EX                                              'going-green'
          8        DO_FCALL                                      0  $3      
          9        CONCAT                                           ~4      '%5Bpost_categories+before%3D%22%22%5D+%5Bpost_tags+before%3D%22', $3
         10        CONCAT                                           ~5      ~4, '%22%5D'
         11        ASSIGN                                                   !0, ~5
   93    12      > RETURN                                                   !0
   95    13    > > RETURN                                                   null

End of function post_meta_filter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.7 ms | 1412 KiB | 17 Q