Skip to content

Instantly share code, notes, and snippets.

@fritids
fritids / functions.php
Created February 16, 2021 16:29 — forked from yousufansa/functions.php
Jobhunt - Change the WP Job Manager Core Add-ons Page Sign in URL
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' );
@fritids
fritids / function.php
Created August 8, 2020 06:36 — forked from jmabbas/function.php
Front - job location header
if ( ! function_exists( 'front_job_header_search_form' ) ) {
function front_job_header_search_form( $args = array() ) {
$defaults = apply_filters( 'front_job_header_search_form_default_args', array(
'keywords_title_text' => esc_html__( 'what', 'front' ),
'keywords_subtitle_text' => esc_html__( 'job title, keywords, or company', 'front' ),
'keywords_placeholder_text' => esc_html__( 'Keyword or title', 'front' ),
'location_title_text' => esc_html__( 'where', 'front' ),
'location_subtitle_text' => esc_html__( 'city, state, or zip code', 'front' ),
'location_placeholder_text' => esc_html__( 'City, state, or zip', 'front' ),
@fritids
fritids / gist:9048c5172a7ba24dbbcceb247fe6dd12
Created August 7, 2020 01:41 — forked from mikejolley/gist:fc51be129296f3b311b3
WP Job Manager - Remove "preview" step
<?php
/**
* Remove the preview step. Code goes in theme functions.php or custom plugin.
* @param array $steps
* @return array
*/
function custom_submit_job_steps( $steps ) {
unset( $steps['preview'] );
return $steps;
@fritids
fritids / gist:373acc52f1014fda04b1
Created November 11, 2015 00:36 — forked from mrlannigan/gist:947141
WPquestions.com #2143 rev1
<?php // answer to wpquestions.com #2143 by Julian Lannigan (julianlannigan.com)
function override_logout_form() {
wp_logout();
$logoutDestination = '/';
$redirect_to = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : $logoutDestination;
wp_safe_redirect($redirect_to);
exit();
}
add_action('login_form_logout', 'override_logout_form');
<?php
/**
* Script which generates valid JSON for the website in order to display all current members
*
* @author Miguel Gonzalez <miguel-gonzalez@gmx.de>
* @since 1.0
* @version 1.0
*/
// Connect to phpBB
<?php
function login_test($username, $password)
{
if ($username == $password) {
mysql_connect('localhost', 'root');
mysql_select_db('phpbb');
$exists = mysql_num_rows(mysql_query('SELECT * FROM '.USERS_TABLE.' WHERE username = \''.$username.'\'')) == 1;
<?php
/**
* Debug phpBB installation path detections
*/
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = (strpos(__FILE__, 'adm/') !== false) ? './../' : './';
include($phpbb_root_path . 'common.' . $phpEx);
@fritids
fritids / hook_trusted-users.php
Created September 28, 2015 00:05 — forked from cs278/hook_trusted-users.php
phpBB Hook - Disables post queue for trusted users.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
@fritids
fritids / auth_clancms.php
Created September 28, 2015 00:05 — forked from funtimeerror/auth_clancms.php
The Clan CMS Project - PHPBB3 Forum Bridge
<?php
// clanCMS to phpBB3 bridge by FuntimeError of dfbrigade.org
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
// exit;
}
@fritids
fritids / auth_dbext.php
Created September 28, 2015 00:01 — forked from nzeyimana/auth_dbext.php
External MySQL auth plug-in for phpBB3
<?php
/**
* External MySQL auth plug-in for phpBB3
*
* Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him.
*
* @package login
* @version $Id: auth_dbext.php 8602 2009-04-09 16:38:27Z nzeyimana $
* @copyright NONE: use as you see fit but no guarantees
* @license NONE: use as you see fit but no guarantees