Skip to content

Instantly share code, notes, and snippets.

View arvindsvt's full-sized avatar

Arvind Shrivastwa arvindsvt

  • Ahmedabad
View GitHub Profile
@arvindsvt
arvindsvt / EasyRouter.php
Last active October 30, 2019 15:09
EasyRouter - A simple PHP powered, REST capable Router and Facade for easier route calls, and an example static and Class implementation
https://github.com/azeemhassni/simplest-php-router
https://github.com/arvindsvt/PHP-Custom-MVC
<?php namespace EasyRouter {
/**
* A simple, Object Oriented, yet effective REST capable PHP micro router. Can
* easily be used as a `stand-alone` Router or implemented with composers PSR4
* or your own PSR4 autoloader. See link reference below for a simple, and yet
* effective PSR4 Autoloader I had made.
*
@arvindsvt
arvindsvt / functions.php
Created December 7, 2019 12:33
This is an updated version of social media buttons. This code snippet will help you to add social media buttons to your website without even using any plugin. Furthermore it's javascript free. Enjoy fast speed and the same usability. For more details visit the official post: https://wpvkp.com/add-social-media-sharing-buttons-to-wordpress-without…
// Function to handle the thumbnail request
function get_the_post_thumbnail_src($img)
{
return (preg_match('~\bsrc="([^"]++)"~', $img, $matches)) ? $matches[1] : '';
}
function wpvkp_social_buttons($content) {
global $post;
if(is_singular() || is_home()){
// Get current page URL
@arvindsvt
arvindsvt / functions.php
Created December 7, 2019 12:33
This is an updated version of social media buttons. This code snippet will help you to add social media buttons to your website without even using any plugin. Furthermore it's javascript free. Enjoy fast speed and the same usability. For more details visit the official post: https://wpvkp.com/add-social-media-sharing-buttons-to-wordpress-without…
// Function to handle the thumbnail request
function get_the_post_thumbnail_src($img)
{
return (preg_match('~\bsrc="([^"]++)"~', $img, $matches)) ? $matches[1] : '';
}
function wpvkp_social_buttons($content) {
global $post;
if(is_singular() || is_home()){
// Get current page URL
https://www.youtube.com/watch?v=Q5QkgK3xcDo
<?php
/**
* @package WPCamp 2019
* @version 1.0
*/
/*
Plugin Name: rewrite api custom permalink - BUILD
Description: Creates custom post type and custom permalink
Author: Sergio