This file contains hidden or 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 | |
/** | |
* Geo Query | |
* | |
* This class provides methods to perform geographical queries in WordPress, | |
* allowing users to filter posts based on geographical parameters like distance. | |
* | |
* @package WPSnippets | |
* @author Owaisansari53 <[email protected]> | |
*/ |
This file contains hidden or 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 {FC, ReactNode, useCallback, useEffect, useRef} from "react"; | |
interface InfiniteScrollProps { | |
load: () => void; | |
hasMore: boolean; | |
loader: ReactNode; | |
children?: ReactNode; | |
endMessage?: ReactNode; | |
} |
This file contains hidden or 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
// Converting Twitter Bootstrap RFS mechanism into typescript to make it available for CSS in JS i.e. (styled components). | |
// Twitter Bootstrap RFS: https://github.com/twbs/rfs | |
// Javascript Approach: https://gist.github.com/supposedly/9b9f5de66c2bcbbf5d7469dcec50bfd7 | |
// Usage | |
// import rfs from 'rfs'; | |
// rfs( '20px', 'font-size' ); | |
// rfs( '1.5rem', 'font-size' ); | |
// rfs( '1rem', 'margin-bottom' ); |
This file contains hidden or 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 | |
/** | |
* A custom WordPress comment walker class to implement the Bootstrap 3 Media object in wordpress comment list. | |
* | |
* @package wp-bootstrap-5-comment-walker | |
* @version 1.0.0 | |
* @author Ayoub Khan <[email protected]> | |
* @license MIT |
This file contains hidden or 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
/* | |
SCSS RFS mixin - converted unofficially to JS | |
Please note that the author(s) and maintainer(s) of RFS aren't responsible for this port. Direct issues to @supposedly | |
******** | |
Automated responsive values for font sizes, paddings, margins and much more | |
Licensed under MIT (https://github.com/twbs/rfs/blob/master/LICENSE): |
This file contains hidden or 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 if(!defined('ABSPATH')) { die(); } // Include in all php files, to prevent direct execution | |
/** | |
* Plugin Name: WP Geo Query | |
* Plugin URI: https://gschoppe.com/wordpress/geo-searches/ | |
* Description: Adds location search support to WP_Query, making it easy to create completely custom "Find Location" pages. | |
* Author: Greg Schoppe | |
* Author URI: https://gschoppe.com | |
* Version: 1.0.0 | |
**/ |
This file contains hidden or 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 | |
/** | |
* Close the connection to the browser but continue processing the operation | |
* @param $body | |
*/ | |
public function closeConnection($body, $responseCode){ | |
// Cause we are clever and don't want the rest of the script to be bound by a timeout. | |
// Set to zero so no time limit is imposed from here on out. | |
set_time_limit(0); |