Skip to content

Instantly share code, notes, and snippets.

Avatar

Victor M. Font Jr. vfontjr

View GitHub Profile
View display-star-icons.css
.star-rating-hover::before {
content: '\e9d9';
color: #F0AD4E;
}
.frm-star-group input[type="radio"]:checked + label::before,
.frm-star-group:not(.frm-star-hovered) input[type="radio"]:checked + label::before {
color: #F0AD4E;
}
View enable-tooltip.js
<script>
jQuery(function() {
"use strict";
$( document ).tooltip();
});
</script>
@vfontjr
vfontjr / css_file.css
Last active Nov 13, 2020
Source code for https://formidable=masterminds.com/change-input-background-color-based-on-other-field-value/
View css_file.css
<style type="text/css">
.color_red {
background-color: red !important;
color: #fff !important;
}
.color_yellow {
background-color: yellow !important;
color: #000 !important;
}
View final_working_code.php
<?php
add_filter('frm_where_filter', 'custom_view_where_clause', 10, 2);
function custom_view_where_clause( $where, $args ) {
/* we'll use $view_id and field id to drive the switch statement below
* why a switch statement? switch statements provide better performance than ifs
*/
$view_id = $args['display']->ID;
$field_id = $args['where_opt'];
View final-jquery.js
<script>
jQuery(document).ready(function($) {
"use strict";
$( function() {
// activate the tooltip function
$( document ).tooltip({
position: {
my: "center bottom-20",
at: "center top",
View action-detail-page-return-link-source.html
View cpt_page_template.php
<?php
/**
* Template Name: Lead Like Jesus Devotionals
*
* Selectable from a dropdown menu on the edit page screen.
*/
?>
<?php get_header(); ?>
View add_filter.php
<?php
add_filter( 'frm_include_credit_card', '__return_true' );
View robots_mod.php
<?php
//* Append directives to the virtual robots.txt
//* Siteground adds crawl-delay: 10 to robots.txt. Don't use physical robots.txt on SiteGround
add_filter( 'robots_txt', 'robots_mod', 10, 2 );
function robots_mod( $output, $public ) {
$output .= "Sitemap: https://victorfont.com/sitemap_index.xml";
return $output;
}