This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*-------------------------------------------------------------- | |
# Saving Features to Membership Levels from an acf repeater field for RCP Pro | |
--------------------------------------------------------------*/ | |
function some_feature_list( $level ) { | |
/** | |
* @var RCP_Levels $rcp_levels_db | |
*/ | |
global $rcp_levels_db; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'gform_after_create_post', 'gf_add_to_media_library', 10, 3 ); | |
/** | |
* Save file upload fields under custom post field to the library | |
* | |
* @param $post_id The post identifier | |
* @param $entry The entry | |
* @param $form The form | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useLayoutEffect } from 'react'; | |
import throttle from 'lodash.throttle'; | |
function useResizeObserver(ref: React.MutableRefObject<any>) { | |
const [dimensions, setDimensions] = useState({ | |
width: 0, | |
height: 0, | |
dimensionsLoaded: false, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const useStickyScroll = ( | |
{ | |
elementRef, | |
containerRef | |
}: {elementRef: any; containerRef?: any; onScroll?: (y: number) => void}, | |
dependencies: any[] = [] | |
) => { | |
const [isSticky, setIsSticky] = useState(false); | |
// Use useRef for the callback to avoid triggering re-renders | |
const onCallbackRef = useRef<(y: number) => void>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRef, useEffect, useState } from 'react'; | |
import Swiper from 'swiper'; | |
import { SwiperOptions } from 'swiper/types'; | |
import { Pagination, Navigation } from 'swiper/modules'; | |
import { Box, BoxProps, MotionBox } from '@components'; | |
import { Chevronleft, Chevronright } from '@/icons'; | |
import { Variants } from 'framer-motion'; | |
// now importing all thee manually with emotion | |
// import 'swiper/css'; |
OlderNewer