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_filter( 'filr_header_columns', function( $columns ) { | |
$columns['custom'] = array( | |
'title' => esc_html__( 'Custom', 'filr' ), | |
'hide' => 'off', | |
); | |
return $columns; | |
}); |
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_activation_hook( __FILE__, 'ssp_setup_static_export_cron' ); | |
/** | |
* Setup a cron job to run daily. | |
* | |
* @return void | |
*/ | |
function ssp_setup_static_export_cron() { |
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( 'passster_validation_success_list', function( $password, $password_list_id, $post_id ) { | |
// prepare and send the e-mail. | |
$to = '[email protected]'; | |
$subject = 'Password ' . $password . 'was used'; | |
$headers = array( 'Content-Type: text/html; charset=UTF-8' ); | |
$body = 'Password ' . $password . ' form passwords list ' . get_the_title( $password_list_id ) . ' was used to unlock content on ' . get_permalink( $post_id ); | |
// Now we can send the e-mail. |
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( 'passster_compare_expiration_date', function( $password, $difference, $password_list_id ) { | |
if ( $difference == 1 ) { | |
// prepare and send the e-mail. | |
$to = '[email protected]'; | |
$subject = 'Password ' . $password . 'was used'; | |
$headers = array( 'Content-Type: text/html; charset=UTF-8' ); | |
$body = 'Password ' . $password . ' form passwords list ' . $password_list_id . ' will expire tomorrow'; |
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_filter('filr_disallowed_file_extensions', function( $extensions ) { | |
// Extensions contains an array by default which looks like this: array( 'htaccess', 'php', 'php3', 'php4', 'php5', 'phtml' ). | |
// Lets exclude HTML files here. | |
$extensions[] = 'html'; | |
return $extensions; | |
}); |
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_filter( 'ssp_webhook_args', function( $args ) { | |
// Get access token. | |
$options = get_option( 'simply-static' ); | |
$access_token = $options['github-personal-access-token']; | |
// Setup body. | |
$body = array( | |
'event_type' => 'repository_dispatch', |
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_filter( 'ssp_webhook_args', function( $args ) { | |
// Get access token. | |
$options = get_option( 'simply-static' ); | |
$acccess_token = $options['github-personal-access-token']; | |
// Modify arguments for POST request. | |
$args = array( | |
'headers' => array( |
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( 'filr_allow_file_access', function( $file_id ) { | |
$access = $_COOKIE['passster']; | |
if ( ! isset( $access ) || empty( $access ) ) { | |
exit; | |
} | |
}); |
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 | |
namespace sshm; | |
/** | |
* Class to handle Lemon_Squeezy. | |
*/ | |
class Lemon_Squeezy { | |
/** | |
* Contains instance or null |
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( 'passster_validation_success', function( $password ) { | |
// Here you can save user meta or add the data to a new table. | |
}); |