load(); } add_action('init', 'mkdf_listing_resume_load_shortcodes', 7); // permission 7 is set to be before vc_before_init hook that has permission 9 and after mkdf_listing_resume_include_shortcodes_file hook } if ( ! function_exists( 'mkdf_listing_resume_get_yes_no_select_array' ) ) { /** * Returns array of yes no * @return array */ function mkdf_listing_resume_get_yes_no_select_array( $enable_default = true, $set_yes_to_be_first = false ) { $select_options = array(); if ( $enable_default ) { $select_options[''] = esc_html__( 'Default', 'mkdf-listing' ); } if ( $set_yes_to_be_first ) { $select_options['yes'] = esc_html__( 'Yes', 'mkdf-listing' ); $select_options['no'] = esc_html__( 'No', 'mkdf-listing' ); } else { $select_options['no'] = esc_html__( 'No', 'mkdf-listing' ); $select_options['yes'] = esc_html__( 'Yes', 'mkdf-listing' ); } return $select_options; } } if ( ! function_exists( 'mkdf_listing_resume_get_title_tag' ) ) { /** * Returns array of title tags * * @param bool $first_empty * @param array $additional_elements * * @return array */ function mkdf_listing_resume_get_title_tag( $first_empty = false, $additional_elements = array() ) { $title_tag = array(); if ( $first_empty ) { $title_tag[''] = esc_html__( 'Default', 'mkdf-listing' ); } $title_tag['h1'] = 'h1'; $title_tag['h2'] = 'h2'; $title_tag['h3'] = 'h3'; $title_tag['h4'] = 'h4'; $title_tag['h5'] = 'h5'; $title_tag['h6'] = 'h6'; if ( ! empty( $additional_elements ) ) { $title_tag = array_merge( $title_tag, $additional_elements ); } return $title_tag; } } if ( ! function_exists( 'mkdf_membership_resume_add_social_share_option' ) ) { function mkdf_membership_resume_add_social_share_option( $container ) { staffscout_mikado_add_admin_field( array( 'type' => 'yesno', 'name' => 'enable_social_share_on_resume', 'default_value' => 'no', 'label' => esc_html__( 'Resume', 'mkdf-listing' ), 'description' => esc_html__( 'Show Social Share for Resume Items', 'mkdf-listing' ), 'parent' => $container ) ); } add_action( 'staffscout_mikado_post_types_social_share', 'mkdf_membership_resume_add_social_share_option', 10, 1 ); }