Skip to content

Instantly share code, notes, and snippets.

View pavelrich's full-sized avatar
🌍
Working

Pavel Richter pavelrich

🌍
Working
View GitHub Profile
@pavelrich
pavelrich / _mixins.less
Created November 16, 2023 00:04
Generate Random Number Property with Less CSS Mixin
//
// Mixins
//
.m-number--random(@min, @max) {
--number--random: `Math.floor(Math.random() * (@{max} - @{min} + 1) + @{min})`; // Required enabled execution inline javascript using "--js" option [lessc --js]
}
@pavelrich
pavelrich / functions.php
Created July 27, 2023 21:39
FORQY — Disable PhotoSwipe
<?php
/**
* Remove PhotoSwipe
*/
add_filter( 'forqy_image_photoswipe', '__return_false' );
add_filter( 'forqy_image_photoswipe_content', '__return_false' );
if ( !function_exists( 'THEME_scripts_photoswipe_remove' ) ) {
@pavelrich
pavelrich / functions.php
Last active March 30, 2023 15:26
FORQY — Disable Google Fonts and Use Local Fonts (Linguini, Salmon, Ginger, Muse)
<?php
/**
* Disable Google Fonts
*/
add_filter( 'forqy_fonts', '__return_empty_array', 10 );
/**
* Define Fonts
* Replace "THEME" with the name of your child theme
@pavelrich
pavelrich / functions.php
Created March 28, 2023 00:32
WordPress — Hide Parent Theme in the WordPress Admin
<?php
if ( ! function_exists( 'PREFIX_themes_hide' ) ) {
/**
* Hide the Theme in the WordPress Admin
*
* @param $themes
*
* @return mixed
@pavelrich
pavelrich / functions.php
Created March 2, 2023 09:43
FORQY — Custom Settings of the jQuery UI Datepicker — Disable today
<?php
if ( ! function_exists( 'prefix_scripts_datepicker' ) ) {
/**
* Custom Settings of the JQuery UI Datepicker
* @url https://api.jqueryui.com/datepicker/
*/
function prefix_scripts_datepicker() {
@pavelrich
pavelrich / functions.php
Created June 21, 2022 23:56
FORQY — Disable Lazy Loading of Content Images
<?php
if ( ! function_exists( 'forqy_image_lazy_disable' ) ) {
/**
* Disable Lazy Loading of Content Images
*
* @return void
*/
function forqy_image_lazy_disable() {
@pavelrich
pavelrich / functions.php
Created January 31, 2022 22:49
WordPress — Polylang — Multilingual Logo
<?php
/**
* Polylang Multilingual Logo
*
* @param $value
*
* @return int|mixed
*/
function THEME_logo_multilingual( $value ) {
@pavelrich
pavelrich / functions.php
Created January 31, 2022 08:57
WordPress — Add Image with Link to the Navigation
<?php
/**
* Add Custom Link to the Navigation
*
* @param $items
* @param $args
*
* @return mixed|string
*/
@pavelrich
pavelrich / functions.php
Last active March 30, 2023 14:55
FORQY — Custom Settings of the jQuery UI Datepicker
<?php
if ( ! function_exists( 'THEME_scripts_datepicker' ) ) {
/**
* Custom Settings of the jQuery UI Datepicker
* @url https://api.jqueryui.com/datepicker/
*/
function THEME_scripts_datepicker() {
@pavelrich
pavelrich / functions.php
Last active October 22, 2021 00:01
FORQY — Custom Settings of the jQuery UI Datepicker — Disable selection of the Sundays
<?php
if ( ! function_exists( 'prefix_scripts_datepicker' ) ) {
/**
* Custom Settings of the JQuery UI Datepicker
* @url https://api.jqueryui.com/datepicker/
*/
function prefix_scripts_datepicker() {