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 | |
add_filter( | |
'gform_user_registration_user_data_pre_populate', | |
function( $mapped_fields, $form, $feed ) { | |
// Select field - this works | |
$mapped_fields[5] = 'input_value'; | |
// Checkboxes field - does not work |
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 | |
/** | |
* ------------------------------ | |
* | WP2Static WPML Integration | | |
* ------------------------------ | |
* | |
* Important: The option WPML > Languages > "Adjust IDs for multilingual functionality" must be disabled. | |
*/ | |
function wp2static_wpml_get_translated_posts_urls() { |
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 exclude_category($query) { | |
if ( $query->is_feed ) { | |
$query->set('cat', '-999'); // replace 999 with your category ID | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'exclude_category'); |
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
/* | |
Create /css and /js subdirectories in child theme directory. | |
Create /css/site.css for front-end styles. | |
Create /js/site.js for front-end scripts. | |
Create /css/admin.css for back-end styles. | |
Create /js/admin.js for back-end scripts. | |
*/ | |
$version = time(); // changes on every page load; set to something like '2018-01-01' in production |
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
[--] Skipped version check for MySQLTuner script | |
[OK] Currently running supported MySQL version 5.1.61-log | |
[OK] Operating on 64-bit architecture | |
-------- Storage Engine Statistics ----------------------------------------------------------------- | |
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM | |
[--] Data in InnoDB tables: 631M (Tables: 36) | |
[!!] Total fragmented tables: 36 | |
[!!] failed to execute: SHOW TABLE STATUS FROM \`#mysql50#.history\` | |
[!!] FAIL Execute SQL / return code: 256 |
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 | |
use DB; | |
DB::enableQueryLog(); | |
// execute queries here | |
dd(DB::getQueryLog()); |