// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading
/** * @link https://library.wpcode.com/snippet/e5wng05d/ * * @param StripeEvent $event Stripe Event. * @param StripeSubscription|StripePaymentIntent $object Stripe Subscription or PaymentIntent */ function simpay_add_metadata_to_customer( $event, $object ) { $customer_id = $object->customer->id; $customer = SimplePayCorePaymentsStripe_API::request( ‘Customer’, ‘update’, $customer_id, array( ‘metadata’ => $object->metadata->toArray(), )…Continue reading
add_filter( ‘aioseo_schema_disable’, ‘aioseo_disable_schema_for_specific_page’ ); function aioseo_disable_schema_for_specific_page( $disabled ) { if ( is_page( 1209 ) ) { return true; } return $disabled; }Continue reading
/** * @link https://library.wpcode.com/snippet/m5ljwkl2/ */ add_filter( ‘simpay_get_paymentintent_args_from_payment_form_request’, function( $args, $form ) { $customer = \SimplePay\Core\API\Customers\retrieve( $args[‘customer’], $form->get_api_request_args() ); $shipping_address = $customer->shipping->address; $shipping_name = $customer->shipping->name; $shipping_phone = $customer->shipping->phone; $args[‘metadata’][‘Shipping-name’] = $shipping_name; $args[‘metadata’][‘Shipping-phone’] = $shipping_phone; foreach ( $shipping_address->toArray() as $key => $value…Continue reading
add_filter(‘the_generator’, ‘__return_empty_string’);Continue reading
function yourprefix_add_custom_user_profile_fields($user) { ?> />Continue reading
function display_iframe_shortcode() { $user_id = get_current_user_id(); $iframe_toggle = get_user_meta($user_id, ‘iframe_toggle’, true); // Determine the display style based on the user’s preference. $display_style = isset($iframe_toggle) && $iframe_toggle === ‘1’ ? ” : ‘style=”display: none;”‘; // Build the output with conditional visibility.…Continue reading