/** * Function that returns a SVG file path. * * @author Allen Moore, 10up * @return string the constructed svg path. */ public function get_svg_path() { $theme_path = trailingslashit(get_template_directory()); $svg_path_option = get_svg_path_option(); $svg_path = trailingslashit($theme_path . $svg_path_option); return $svg_path; }
/** * Callback function for the settings field. * * @author Allen Moore, 10up * @return void */ public function setting_callback() { $svg_path_option = get_svg_path_option(); ?> <input name="svghelpers_path" id="svghelpers_path" type="text" value="<?php echo esc_attr($svg_path_option); ?> " class="regular-text" /> <p class="description"><?php esc_html_e('The path to the active theme\'s SVG files. The default location is: ', 'tenup'); ?> <code><?php esc_html_e('assets/svg/dist/', 'tenup'); ?> </code></p> <?php }