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
add_filter( 'submit_job_form_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'job_manager_job_dashboard_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'submit_resume_form_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'resume_manager_candidate_dashboard_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'job_manager_alerts_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'job_manager_bookmark_form_login_url', 'jobhunt_submit_job_form_login_url' ); | |
add_filter( 'job_manager_past_applications_login_url', 'jobhunt_submit_job_form_login_url' ); |
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: Sets, Tracks and Displays the Count of Post Views (Post View Counter) | |
*********************************************************************************/ | |
//Set the Post Custom Field in the WP dashboard as Name/Value pair | |
function dp_PostViews($post_ID) { | |
//Set the name of the Posts Custom Field. | |
$count_key = 'post_views_count'; |
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 | |
// Register Region CPT | |
add_action( 'init', 'register_cpt_region' ); | |
function register_cpt_region() { | |
$labels = array( | |
'name' => _x( 'Regions', 'region' ), |
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
<html> | |
<head> | |
<title>Petitions Revisited</title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
</head> | |
<body> | |
<h1>Petitions Revisited</h1> |
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 | |
if ( ! defined( 'VIP_CUSTOM_MOBILE_TEMPLATE' ) ) | |
// if using a child theme, this should be the parent (else you'll facepalm later) | |
define( 'VIP_CUSTOM_MOBILE_TEMPLATE', 'vip/theme' ); | |
if ( ! defined( 'VIP_CUSTOM_MOBILE_STYLESHEET' ) ) | |
define( 'VIP_CUSTOM_MOBILE_STYLESHEET', 'vip/theme-child-mobile' ); | |
add_action( 'jetpack_modules_loaded', function() { |
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 | |
/** | |
* Plugin Name: WP-EMail | |
* Plugin URI: http://lesterchan.net/portfolio/programming/php/ | |
* Description: Allows people to recommand/send your WordPress blog's post/page to a friend. | |
* Version: 2.52 | |
* Author: Lester 'GaMerZ' Chan | |
* Author URI: http://lesterchan.net | |
*/ | |
/* |
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
function get_user_ids_by_role($role){ | |
$users=array(); | |
$founded_users = get_users( array( 'role' => $role ) ); | |
if(!empty($founded_users)){ | |
foreach((array)$founded_users as $user) | |
$users[]=$user->ID; | |
} | |
return $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
$ip = $_SERVER["REMOTE_ADDR"];//cant use helper, not loaded yet | |
$location = file_get_contents('http://api.ipinfodb.com/v3/ip-city/?key=<api_key>&format=json&ip='.$ip.''); | |
$location = json_decode($location); | |
$country = $location->countryCode; | |
if(strcmp($country,'CA') == 0) { | |
$mageRunType = 'store'; | |
$mageRunCode = 'en_ca'; |
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 | |
class Classy_User extends WP_User { | |
protected $_post_type = 'user', | |
$_favourites = null; | |
protected static $instance = null; | |
protected static $form_fields = array( |
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
function getState_add(countryId) | |
{ | |
ajax= nuevoAjax(); | |
var url="getstate_add.php"; | |
url=url+"?id="+countryId; | |
//alert(url); | |
ajax.open ("GET",url, true); | |
ajax.onreadystatechange= function() | |
{ | |
if (ajax.readyState == 4) |
NewerOlder