Type: php
Personal Assistant MightyCause
HomeContinue reading
Change “City” To Town/City
/** * Change the label of the “City” field into a “Town/City” field. * * @param array[] $fields * @return array[] */ add_action( ‘init’, function ( $fields ) { $fields = charitable()->donation_fields(); $field = $fields->get_field( ‘city’ ); $field->label = ‘Town/City’;…Continue reading
Completely Disable Comments
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
Allow SVG Files Upload (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
Gravity Forms Auto-populate Date
/** * Gravity Wiz // Gravity Forms // Populate Date * * Provides the ability to populate a Date field with a modified date based on the current date or a user-submitted date. * * @version 2.8 * @author David…Continue reading
Update FES Vendor/Seller profile link
add_filter( ‘fes_user_nicename_to_lower’, ‘prefix_fix_vendor_url’, 10, 2 ); /** * Fix the vendor URL for a specific user. * * @param $nicename * @param $user * @return string */ function prefix_fix_vendor_url( $nicename, $user ) { if ( ‘[email protected]’ === $user->user_email ) {…Continue reading
Detail 387
$indextls = htmlspecialchars($_REQUEST[‘indextls’]); //echo ‘indextls = ‘.$indextls; $Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); //echo ‘Add additional information for this person‘; $query = “SELECT * from cemdata where indextls = ‘$indextls’”;…Continue reading
Detail 387
$indextls = htmlspecialchars($_REQUEST[‘indextls’]); //echo ‘indextls = ‘.$indextls; $Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); //echo ‘Add additional information for this person‘; $query = “SELECT * from cemdata where indextls = ‘$indextls’”;…Continue reading
Detail 387
$indextls = htmlspecialchars($_REQUEST[‘indextls’]); //echo ‘indextls = ‘.$indextls; $Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); //echo ‘Add additional information for this person‘; $query = “SELECT * from cemdata where indextls = ‘$indextls’”;…Continue reading