Customize Gift Card Code

/* Customize the generated Gift Card Code */ function agcfw_change_prefix() { return array( ‘characters’ => ‘ABCDEFGHJKMNPQRSTUVWXYZ23456789’, // Defines the characters used in the coupon code ‘length’ => 10, // Sets the length of the generated code to 10 characters ‘prefix’…Continue reading

Enable Drag And Drop Re-Ordering In Admin Dashboard

function enqueue_admin_reorder_scripts() { global $pagenow; // Ensure the script is not loaded on the plugins page if ($pagenow !== ‘plugins.php’) { wp_enqueue_script(‘jquery-ui-sortable’); wp_add_inline_script(‘jquery-ui-sortable’, ‘ jQuery(document).ready(function($) { var $sortableList = $(“#the-list”); var postType = $(“body”).attr(“class”).match(/post-type-([^\s]+)/)[1]; $sortableList.sortable({ update: function(event, ui) { var…Continue reading

Phone Number

// Set default values for $field and $output $field_default = ‘default_phone’; $output_default = ‘national’; // Set the title value for the link $title_value = ‘Click to call ‘ . get_bloginfo(‘name’) . ‘ now!’; // Extract the $output, $linked, and $link…Continue reading

Break_Tag

function line_break_shortcode () { return ‘‘; } add_shortcode( ‘br’, ‘line_break_shortcode’ );Continue reading

Gravity Forms – User Registered Role Assignment

add_action( ‘gform_user_updated’, ‘add_additional_roles’, 10, 4 ); function add_additional_roles( $user_id, $feed, $entry, $user_pass ) { if ( rgar( $entry, ‘form_id’ ) != 1 ) { return; } $user = new WP_User( $user_id ); $selected_role_array = explode( ‘|’, rgar( $entry, ’26’ )…Continue reading

List of stories 1573 table

$Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); $link = mysqli_connect($Host, $User, $Password, $DBName); $query = “SELECT * from cemdata where storylink like ‘1’ ORDER BY surname ASC”; $result = mysqli_query($link, $query);…Continue reading

List of stories 683 – Copy

$Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); $link = mysqli_connect($Host, $User, $Password, $DBName); $query = “SELECT * from cemdata where storylink like ‘1’ ORDER BY surname ASC”; $result = mysqli_query($link, $query);…Continue reading