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
You can use REST API, i.e mybeatifulwebsite.com | |
- mybeatifulwebsite.com/wp-json/wp/v2/users will give all users in JSON format (no emails included) | |
- mybeatifulwebsite.com/wp-json/wp/v2/categories will list all categories list in JSON format | |
- mybeatifulwebsite.com/wp-json/wp/v2/tags will list all tags list in JSON format | |
- wp-json/wp/v2/posts will lists latest posts, very similar to /rss or /feed but in JSON | |
- wp-json/wp/v2/media will list all media files (images, ecc.) in JSON format | |
Source: https://developer.wordpress.org/rest-api/ |
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
/* | |
Plugin Name: | |
Plugin URI: http://capolooper.it | |
Description: | |
Version: 1.0 | |
Author: Salvalupo Capotore | |
Author URI: http://capolooper.it | |
License: GPLv2 | |
*/ |
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 | |
// hide all errors / warning in WP, useful for production websites | |
// file: wp-config.php | |
ini_set('display_errors','Off'); | |
ini_set('error_reporting', E_ALL ); | |
define('WP_DEBUG', false); | |
define('WP_DEBUG_LOG', false); | |
define('WP_DEBUG_DISPLAY', false); | |
@ini_set('display_errors', 0); |
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
- Handle: cookie-law-info, cookie-law-info-gdpr - CSS/JS for Cookie Privacy plugin | |
- Handle: jetpack-photon: Jetpack CDN | |
- to be continued |
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 | |
function smart_seo_redirect(){ | |
if ( isset($_SERVER['HTTP_REFERER']) ){ | |
$referrer = $_SERVER['HTTP_REFERER']; | |
$parse = parse_url($referrer); | |
$referrer = $parse['host']; | |
$matches = []; | |
$matches[]= preg_match('/cool_referral_name/', $referrer, $matches); |
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 | |
function add_rich_snippets_content( $content ) { | |
global $post; | |
$post_ID = $post->ID; | |
$page_title = get_the_title ( $post_ID ); | |
$page_object = get_post( $post_ID ); | |
$page_excerpt = wp_strip_all_tags ( $page_object->post_content ); | |
$page_excerpt = preg_split ("/\s/", $page_excerpt); |
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
- fai.informazione.it (basta registrarsi gratuitamente) | |
- recesiti.wordpress.com (info s.capolupo@gmail.com) | |
- leultime.info (info s.capolupo@gmail.com) | |
- medium.com (basta registrarsi) | |
- linkedin.com (c'è un blog pubblico che si può attivare) | |
- comunicati.net (basta registrarsi) | |
- contenutigratis.altervista.org (basta registrarsi, soggetto a moderazione) | |
- comunicati-stampa.net (basta registrarsi, soggetto a moderazione) |
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
* Enumerate Users | |
wp-json/wp/v2/users | |
- Example | |
curl https://example.com/wp-json/wp/v2/users |
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
jQuery(document).ready(function( $ ){ | |
//track single link | |
var original_link1 = jQuery("a#single").attr('href'); | |
jQuery(elem).attr('href', original_link + '?utm_source=A&utm_medium=B&utm_campaign=C'); | |
//track multi-links | |
var link_group_identifier = 'a.group'; | |
jQuery( link_group_identifier ).each(function(i, elem) { | |
var original_link = jQuery(elem).attr('href'); |