| Server IP : 159.223.1.207 / Your IP : 216.73.216.243 Web Server : Apache/2.4.58 (Ubuntu) System : Linux Lamp-OutStaff 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.4.15 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/wp-content/themes/codeassembly/includes/ |
Upload File : |
<?php
add_filter('wpcf7_autop_or_not', 'hp_wpcf7_autop_return_false');
function hp_wpcf7_autop_return_false() {
return false;
}
class codeassembly_menu_nav extends Walker_Nav_Menu {
function start_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "\n$indent\n";
}
function end_lvl( &$output, $depth = 0, $args = array() ) {
$indent = str_repeat("\t", $depth);
$output .= "$indent\n";
}
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$item_link_classes = implode(' ', $classes);
$classes[] = 'menu-item-' . $item->ID;
$output .= $indent . '';
$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
$item_output = $args->before;
if(!empty($args->li_class)){
$item_output .= '<li class="'.$args->li_class.'"><a class="'.$args->link_class .' ' . $item_link_classes .'" '. $attributes .'>';
}else{
$item_output .= '<a class="'.$args->link_class . $item_link_classes .'" '. $attributes .'>';
}
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
$item_output .= '</a>';
$item_output .= $args->after;
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
function end_el( &$output, $item, $depth = 0, $args = array() ) {
$output .= "\n";
}
}
/*if( function_exists('acf_add_options_page') ) {
$option_page = acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
));
}
acf_add_options_sub_page(
array(
'page_title' => 'Events page settings',
'menu_title' => 'Events page',
'menu_slug' => 'events-page',
'parent_slug' => 'edit.php?post_type=event',
'capability' => 'edit_posts',
'post_id' => 'events-page',
)
);
acf_add_options_sub_page(
array(
'page_title' => 'Careers page settings',
'menu_title' => 'Careers page',
'menu_slug' => 'careers-page',
'parent_slug' => 'edit.php?post_type=vacancy',
'capability' => 'edit_posts',
'post_id' => 'careers-page',
)
);
acf_add_options_sub_page(
array(
'page_title' => 'Portfolio page settings',
'menu_title' => 'Portfolio page',
'menu_slug' => 'portfolio-page',
'parent_slug' => 'edit.php?post_type=project',
'capability' => 'edit_posts',
'post_id' => 'portfolio-page',
)
);
acf_add_options_sub_page(
array(
'page_title' => 'Blog page settings',
'menu_title' => 'Blog page',
'menu_slug' => 'blog-page',
'parent_slug' => 'edit.php?post_type=article',
'capability' => 'edit_posts',
'post_id' => 'blog-page',
)
);*/
add_action('wpcf7_init', 'hp_post_title');
function hp_post_title() {
wpcf7_add_form_tag( 'posttitle', 'hp_post_title_func', array('name-attr' => true));
}
function hp_post_title_func($tag) {
$output = '';
if(is_singular('vacancy')) {
$output = '<input type="hidden" name="posttitle" value="'. get_the_title() .'">';
}elseif(is_post_type_archive('vacancy')) {
$output = '<input type="hidden" class="vacancy-name" name="posttitle" value="">';
}
return $output;
}