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 | |
/** | |
* Shortcode to display a profile field. | |
*/ | |
namespace CSDev\PMProCustom; | |
new ProfileField(); |
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 | |
/** | |
* Plugin Name: Dash Clock | |
* Description: Displays the current time in the WordPress dashboard top bar, including the timezone offset. | |
* Version: 1.2 | |
* Author: charly@csdev | |
*/ | |
/** | |
* Add the time display to the admin bar |
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 | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'FS_METHOD', 'direct' ); | |
// Adjust as per your server/php memory | |
define( 'WP_MEMORY_LIMIT', '1024M' ); | |
// Don't log deprecated errors etc | |
function csdev_error_handler($errno, $errstr, $errfile, $errline) |
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 | |
/** | |
* Add in functions.php or in a specialized plugin | |
* Change 'location' to the desired CPT which should already exist | |
* (example created via ACF) | |
* Mostly extracted from https://wordpress.stackexchange.com/questions/203951/remove-slug-from-custom-post-type-post-urls | |
* By Matt Keys, arafatgazi and others | |
*/ | |
// remove post type from permalinks | |
function remove_post_type( $post_link, $post, $leavename ) { |
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 | |
/** | |
* Register all actions and filters for the main class | |
*/ | |
namespace CSDev\PluginName; | |
class Loader { |
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 | |
add_action('frm_after_create_entry', 'sendToPardotFormHandler', 30, 2); | |
function sendToPardotFormHandler($entry_id, $form_id){ | |
if($form_id == 3){ //replace 3 with the id of the form | |
$args = array(); | |
if(isset($_POST['item_meta'][XX])) //change XX to the field ID | |
$args['firstName'] = $_POST['item_meta'][XX]; //change 'firstName' to the named parameter to send | |
if(isset($_POST['item_meta'][XX])) //change XX to the field ID | |
$args['lastName'] = $_POST['item_meta'][XX]; //change 'lastName' to whatever you need | |
if(isset($_POST['item_meta'][XX])) //change XX to the field 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
// make sure this script is called in the footer of your document | |
function inView(image){ | |
var $image = jQuery(image), | |
view_top = jQuery(window).scrollTop() - 300, | |
view_bottom = view_top + jQuery(window).height() + 600, | |
height = $image.height(), | |
_top = $image.offset().top, | |
_bottom = _top + height; | |
return height > 0 && _top <= view_bottom && _bottom >= view_top; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<?= partial('parts/head', ['title' => '404 Not Found']) ?> | |
</head> | |
<body> | |
<?= partial('parts/navbar') ?> |
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 | |
/* | |
Plugin Name: MemberPress Website Fields | |
Version: 1.0.0 | |
Author: Caseproof, LLC | |
Author URI: http://caseproof.com | |
Description: Allow users to enter their website URL for each subscription they purchase | |
*/ | |
//Signup form functions |
NewerOlder