Duplicate Post/Page Link

// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…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

Rename Posts to Policies

add_action( ‘init’, ‘cp_change_post_object’ ); // Change dashboard Posts to Policies function cp_change_post_object() { $get_post_type = get_post_type_object(‘post’); $labels = $get_post_type->labels; $labels->name = ‘Policies’; $labels->singular_name = ‘Policy’; $labels->add_new = ‘Add Policy’; $labels->add_new_item = ‘Add Policy’; $labels->edit_item = ‘Edit Policy’; $labels->new_item = ‘Policies’;…Continue reading

Send Values in WP Forms Webhook

/** * Send field values in Dropdown, checkboxes, and Multiple Choice through webhook. * * @link https://wpforms.com/developers/how-to-send-field-values-with-webhooks/ */ function wpf_dev_webhooks_process_delivery_request_options($options, $webhook_data, $fields, $form_data, $entry_id) { //Run on all form IDs if ( empty( $form_data[ ‘id’ ] )) { return $options;…Continue reading