تغيير عمله (copy)

/** * Change a currency symbol */ add_filter(‘woocommerce_currency_symbol’, ‘change_existing_currency_symbol’, 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case ‘مصري’: $currency_symbol = ‘جنيه’; break; } return $currency_symbol; }Continue reading

Admin Panel Footer – Menu

add_filter( ‘admin_footer_text’, function ( $footer_text ) { // Edit the line below to customize the footer text. $footer_text = ‘Check Scorecard | Get Kallados | Check GT Speed | Check Goog Speed | Update CSP | Login CDN‘; return $footer_text;…Continue reading

Admin Bar – Updates

function add_updates_admin_bar_menu() { global $wp_admin_bar; $wp_admin_bar->add_menu( array( ‘id’ => ‘updates’, ‘title’ => ‘Updates’, ‘href’ => admin_url( ‘update-core.php’ ), ‘parent’ => ‘top-secondary’, ) ); } add_action( ‘wp_before_admin_bar_render’, ‘add_updates_admin_bar_menu’ );Continue reading

WP Forms Modern Reviews

/** * Custom shortcode to display WPForms form entries in table view. * * Basic usage: [wpforms_entries_table id=”FORMID”]. * * Possible shortcode attributes: * id (required) Form ID of which to show entries. * user User ID, or “current” to…Continue reading

Set New User Role

/** * Set the role of users who register through the Charitable * registration form shortcode. * * @param array $values * @return array $values */ function ed_charitable_set_user_registration_role( $values ) { if ( array_key_exists( ‘role’, $values ) ) { return…Continue reading

Custom Registration Fields

/** * Add fields to the registration form. * * @param array $fields * @return array */ add_filter( ‘charitable_user_registration_fields’, function( $fields ) { /* Add a text field. */ $fields[‘text_field’] = [ ‘type’ => ‘text’, ‘label’ => ‘My Text Field’,…Continue reading

Add Campaign Creator Export Fields

/** * Add additional campaign fields related to the campaign creator. * * @param array $columns The list of columns. * @return array */ function ed_charitable_add_creator_campaign_fields() { $creator_fields = array( ‘organization’ => __( ‘Campaign Creator Organization’, ‘your-namespace’ ), ‘address’ =>…Continue reading

Add Hours Currency

/** * Add a custom currency called “Hours”. * * @param string[] $currencies * @return string[] $currencies */ function en_add_hours_currency( $currencies ) { $currencies[ ‘HOURS’ ] = __( ‘Hours’, ‘your-namespace’ ); return $currencies; } add_filter( ‘charitable_currencies’, ‘en_add_hours_currency’ );Continue reading