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( 'admin_init', 'nic_fi_names_install_db'); | |
function nic_fi_names_install_db() { | |
global $wpdb; | |
$table_name = $wpdb->prefix.'nic_fi_names'; | |
if($wpdb->get_var("SHOW TABLES LIKE '$table_name'") != $table_name) { |
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('gform_pre_render_FORMID', 'populate_posts_FORMID'); | |
function populate_posts_FORMID($form) { | |
?> | |
<script> | |
var flag = true; | |
var checkExist = setInterval(function () { | |
if (jQuery('form#gform_FORMID').hasClass('cart')) { | |
jQuery('.engraving_loader').remove(); |
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 | |
$min_meta = $max_meta = []; | |
if(isset($_GET['min_date']) || $_GET['max_date']) { | |
if(isset($_GET['min_date'])) { | |
$min_meta = array( | |
'key' => 'min_date', | |
'value' => $_GET['min_date'], | |
'compare' => '=' |
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 | |
$cmd = "zip -9prv content_backup.zip ."; | |
$pipe = popen($cmd, 'r'); | |
if (empty($pipe)) { | |
throw new Exception("Unable to open pipe for command '$cmd'"); | |
} | |
stream_set_blocking($pipe, false); | |
echo "\n"; |
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 | |
/** | |
* This file will activate the Airplane Mode plugin if not already activated. This is helpful when you do not have internet connection and you're unable to reach the WP Admin Plugins page to activate the plugin. | |
*/ | |
// get WP bootstrap | |
define('WP_USE_THEMES', false); | |
require(__DIR__ . '/wp/wp-blog-header.php'); | |
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 | |
$codes = [ | |
'ab' => 'Abkhazian', | |
'aa' => 'Afar', | |
'af' => 'Afrikaans', | |
'ak' => 'Akan', | |
'sq' => 'Albanian', | |
'am' => 'Amharic', | |
'ar' => 'Arabic', |
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 | |
function charity_post_type_register() { | |
$labels = array( | |
'name' => __( 'Charities', 'text-domain' ), | |
'singular_name' => __( 'Charity', 'text-domain' ), | |
'add_new' => _x( 'Add New Charity', 'text-domain', 'text-domain' ), | |
'add_new_item' => __( 'Add New Charity', 'text-domain' ), | |
'edit_item' => __( 'Edit Charity', 'text-domain' ), |
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 | |
function filter_get_avatar_url( $url, $user_id ) { | |
// make filter magic happen here... | |
$get_img = get_user_meta( $user_id, 'meta_key', true ); | |
if($get_img){ | |
return $get_img; | |
} |
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 | |
// No, Thanks. Direct file access forbidden. | |
! defined( 'ABSPATH' ) AND exit; | |
// INIT | |
add_action( 'after_setup_theme', array( 'unavailable_post_status', 'init' ) ); | |
class unavailable_post_status extends wp_custom_post_status | |
{ | |
/** |
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 | |
/** | |
* WordPress custom install script. | |
* | |
* Drop-ins are advanced plugins in the wp-content directory that replace WordPress functionality when present. | |
* | |
* Language: nl | |
* | |
* if ( file_exists( WP_CONTENT_DIR . '/install.php' ) ) { | |
* require ( WP_CONTENT_DIR . '/install.php' ); |