Skip to content

Instantly share code, notes, and snippets.

View hs777it's full-sized avatar
🏠
Working from home

Hussain Saad hs777it

🏠
Working from home
View GitHub Profile
@hs777it
hs777it / api.php
Created May 16, 2023 21:28 — forked from dexit/api.php
Disable WordPress REST API endpoints
// Remove init rest routes
remove_action( 'rest_api_init', 'create_initial_rest_routes', 0 );
// Remove oembed rest routes
function remove_json_api () {
// Remove the REST API lines from the HTML Header
remove_action( 'wp_head', 'rest_output_link_wp_head', 10 );
remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );
@hs777it
hs777it / socialSharePopups.js
Created November 29, 2021 19:39 — forked from josephabrahams/socialSharePopups.js
Facebook & Twitter Share Popup Windows
(function($) {
$('.js-share-twitter-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Twitter", "height=285,width=550,resizable=1");
});
$('.js-share-facebook-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Facebook", "height=269,width=550,resizable=1");