widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); add_filter( 'show_recent_comments_widget_style', '__return_false' ); } add_action( 'widgets_init', 'pwwp_remove_recent_comments_style' ); // Add custom script to options page in theme. // Hides/Shows various sections based on other options that are set. add_action( 'optionsframework_custom_scripts', 'optionsframework_custom_scripts' ); function optionsframework_custom_scripts() { ?> classes)); if ($hasChildren) { if(!is_array($classes)){ $classes = array(); } $classes[] = 'dropdown'; } $classes[] = 'nav-item'; return $classes; } function add_class_to_items_link( $atts, $item, $args ) { $atts['class'] .= $atts['class'] . ' nav-link'; // check if the item has children $hasChildren = (in_array('menu-item-has-children', $item->classes)); if ($hasChildren) { // add the desired attributes: $atts['class'] .= $atts['class'] . ' dropdown-toggle'; $atts['data-toggle'] = 'dropdown'; $atts['aria-haspopup'] = 'true'; $atts['aria-expanded'] = 'false'; } return $atts; } // this is a wrapper function for get_option - added for backwards compatibility // as the original of_get_option was removed along with it's theme options // framework function of_get_option($key = false, $default = false){ return get_option( $key ); } //Filter to add some bootstrap specific classes to gravity forms // add_filter( 'gform_field_container', 'add_bootstrap_container_class', 10, 6 ); function add_bootstrap_container_class( $field_container, $field, $form, $css_class, $style, $field_content ) { $id = $field->id; $field_id = is_admin() || empty( $form ) ? "field_{$id}" : 'field_' . $form['id'] . "_$id"; return '
  • {FIELD_CONTENT}
  • '; }