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
/** | |
* If post ID is in array then disable View Limit functionality | |
*/ | |
add_filter( 'skpvl_is_active', function ( $active ) { | |
global $post; | |
$disabled = [ 25, 33, 107 ]; | |
if ( in_array( $post->ID, $disabled ) ) { |
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 | |
/** | |
* Require user to have access level to view BuddyPress page | |
*/ | |
add_filter( 'rcp_member_can_access', function ( $can_access ) { | |
$access_level = 4; | |
$page_slug = 'activity'; | |
$customer = rcp_get_customer_by_user_id( get_current_user_id() ); |
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
function ppPostAria() { | |
let links = document.querySelectorAll('.pp-post-link'); | |
let titles = document.querySelectorAll('.pp-content-grid-title'); | |
for (let i = 0; i < links.length; i++) { | |
let title = titles[i].innerText; | |
links[i].setAttribute('aria-label', title); | |
} | |
} |
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
/** | |
* If post ID is 25 then disable View Limit functionality | |
*/ | |
add_filter( 'skpvl_is_active', function ( $active ) { | |
global $post; | |
if ( 25 == $post->ID ) { | |
$active = false; | |
} |
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
javascript:(function(){output='<html><head><title>SEO SERP Extraction Tool</title><style type=\'text/css\'>body,table{font-family:Tahoma,Verdana,Segoe,sans-serif;font-size:11px;color:#000}h1,h2,th{color:#405850}th{text-align:left}h2{font-size:11px;margin-bottom:3px}</style></head><body>'; output+='<table><tbody><tr><td><h1>SEO%20SERP%20Extraction%20Tool</h1></td></tr></tbody></table>'; pageAnchors=document.getElementsByTagName('a'); divClasses=document.getElementsByTagName('div'); var%20linkcount=0;var%20linkLocation=''; var%20linkAnchorText=''; output+='<table><th>ID</th><th>Link</th><th>Anchor</th>'; for(i=0;i<pageAnchors.length;i++){ if(pageAnchors[i].parentNode.parentNode.getAttribute('class')!='_Rm'){ var%20anchorText%20=%20pageAnchors[i].textContent; var%20anchorLink%20=%20pageAnchors[i].href; var%20linkAnchor%20=%20anchorLink%20+%20'\t'+anchorText; var%20anchorID%20=%20pageAnchors[i].id; if(anchorLink!=''){ if(anchorLink.match(/^((?!google\.|cache|blogger.com|\.yahoo\.|youtube\.com\/\?gl=|youtube\.com\ |
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
javascript: (function () { | |
var v = window, d = document; | |
v.onresize = function () { | |
var w = v.innerWidth ? v.innerWidth : d.documentElement.clientWidth, | |
h = v.innerHeight ? v.innerHeight : d.documentElement.clientHeight, s = d.getElementById('WSPlgIn'), ss; | |
if (!s) { | |
s = d.createElement('div'); | |
s.id = 'WSPlgIn'; | |
d.body.appendChild(s); | |
s.onclick = function () { |
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
add_filter( 'gform_form_post_get_meta_7', 'add_form_fields' ); | |
function add_form_fields( $form ) { | |
// Don't make the parent form messy | |
if ( ! GFCommon::is_form_editor() ) { | |
// form we are adding fields to | |
$parent_id = $form['id']; | |
// template form ID | |
$childId = 5; |
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
function custom_set_limit( $at_limit, $user_id ) { | |
if ( is_user_logged_in() && ! current_user_can( 'administrator' ) ) { | |
if ( empty( $user_id ) ) { | |
$user_id = get_current_user_id(); | |
} | |
$resume_args = array( | |
'post_type' => 'resume', |
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
/** | |
* Assign users to groups upon registration | |
*/ | |
function group_user_activate( $user_id ) { | |
if ( ! function_exists( 'groups_join_group' ) ) { | |
return; | |
} | |
if ( is_page( 'registration' ) || is_page( 'other-registration' ) ) { |