plugin install

This commit is contained in:
Tony Volpe
2024-06-18 17:29:05 -04:00
parent e1aaedd1ae
commit 41f50eacc4
5880 changed files with 1057631 additions and 39681 deletions

View File

@@ -24,7 +24,6 @@ if ( ! class_exists( 'acf_form_attachment' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// actions
@@ -49,7 +48,6 @@ if ( ! class_exists( 'acf_form_attachment' ) ) :
* @param N/A
* @return N/A
*/
function admin_enqueue_scripts() {
// bail early if not valid screen
@@ -81,7 +79,6 @@ if ( ! class_exists( 'acf_form_attachment' ) ) :
* @param n/a
* @return n/a
*/
function admin_footer() {
// render post data
@@ -113,7 +110,6 @@ acf.unload.active = 0;
* @param $post_id (int)
* @return $post_id (int)
*/
function edit_attachment( $form_fields, $post ) {
// vars
@@ -189,7 +185,6 @@ acf.unload.active = 0;
* @param $post_id (int)
* @return $post_id (int)
*/
function save_attachment( $post, $attachment ) {
// bail early if not valid nonce

View File

@@ -24,7 +24,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// actions
@@ -51,7 +50,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param n/a
* @return (boolean)
*/
function validate_page() {
// global
@@ -78,7 +76,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param n/a
* @return n/a
*/
function admin_enqueue_scripts() {
// validate page
@@ -105,7 +102,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param $comment (object)
* @return n/a
*/
function edit_comment( $comment ) {
// vars
@@ -177,7 +173,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function comment_form_field_comment( $html ) {
// global
@@ -241,7 +236,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param comment_id (int)
* @return n/a
*/
function save_comment( $comment_id ) {
// bail early if not valid nonce
@@ -271,7 +265,6 @@ if ( ! class_exists( 'acf_form_comment' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function admin_footer() {
?>

View File

@@ -19,7 +19,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// vars
@@ -48,7 +47,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param N/A
* @return N/A
*/
function customize_controls_init() {
// load acf scripts
@@ -76,7 +74,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param $widget (object) widget info
* @return $instance
*/
function save_widget( $instance, $new_instance, $old_instance, $widget ) {
// bail early if not valid (customize + acf values + nonce)
@@ -128,7 +125,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param $customizer (object)
* @return $value (mixed)
*/
function settings( $customizer ) {
// vars
@@ -188,7 +184,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param $customizer (object)
* @return n/a
*/
function customize_preview_init( $customizer ) {
// get customizer settings (widgets)
@@ -231,7 +226,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param type $var Description. Default.
* @return type Description.
*/
function pre_load_value( $value, $post_id, $field ) {
// check
@@ -254,7 +248,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param type $var Description. Default.
* @return type Description.
*/
function pre_load_reference( $field_key, $field_name, $post_id ) {
// check
@@ -279,7 +272,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param $customizer (object)
* @return n/a
*/
function customize_save( $customizer ) {
// get customizer settings (widgets)
@@ -316,7 +308,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function pre_update_option( $value, $option, $old_value ) {
// bail early if no value
@@ -352,7 +343,6 @@ if ( ! class_exists( 'acf_form_customizer' ) ) :
* @param n/a
* @return n/a
*/
function admin_footer() {
?>

View File

@@ -25,7 +25,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// vars
@@ -78,7 +77,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function validate_form( $args ) {
// defaults
@@ -154,7 +152,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function add_form( $args = array() ) {
// validate
@@ -175,7 +172,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function get_form( $id = '' ) {
// bail early if not set
@@ -187,6 +183,9 @@ if ( ! class_exists( 'acf_form_front' ) ) :
return $this->forms[ $id ];
}
function get_forms() {
return $this->forms;
}
/**
* This function will validate fields from the above array
@@ -198,7 +197,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function validate_save_post() {
// register field if isset in $_POST
@@ -231,7 +229,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function pre_save_post( $post_id, $form ) {
// vars
@@ -298,7 +295,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function enqueue_form() {
// check
@@ -319,7 +315,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param n/a
* @return n/a
*/
function check_submit_form() {
// Verify nonce.
@@ -367,7 +362,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param n/a
* @return n/a
*/
function submit_form( $form ) {
// filter
@@ -418,7 +412,6 @@ if ( ! class_exists( 'acf_form_front' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function render_form( $args = array() ) {
// Vars.
@@ -581,6 +574,10 @@ function acf_get_form( $id = '' ) {
return acf()->form_front->get_form( $id );
}
function acf_get_forms() {
return acf()->form_front->get_forms();
}
function acf_register_form( $args ) {
acf()->form_front->add_form( $args );

View File

@@ -19,7 +19,6 @@ if ( ! class_exists( 'ACF_Form_Gutenberg' ) ) :
* @param void
* @return void
*/
function __construct() {
// Add actions.

View File

@@ -18,7 +18,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// actions
@@ -44,7 +43,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param N/A
* @return N/A
*/
function admin_enqueue_scripts() {
// validate screen
@@ -71,7 +69,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param type $var Description. Default.
* @return type Description.
*/
function wp_nav_menu_item_custom_fields( $item_id, $item, $depth, $args, $id = '' ) {
// vars
@@ -136,7 +133,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function update_nav_menu( $menu_id ) {
// vars
@@ -168,7 +164,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function update_nav_menu_items( $menu_id ) {
// phpcs:disable WordPress.Security.NonceVerification.Missing -- Verified elsewhere.
@@ -198,7 +193,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param type $var Description. Default.
* @return type Description.
*/
function wp_get_nav_menu_items( $items, $menu, $args ) {
acf_set_data( 'nav_menu_id', $menu->term_id );
return $items;
@@ -235,7 +229,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param n/a
* @return n/a
*/
function acf_validate_save_post() {
// phpcs:disable WordPress.Security.NonceVerification.Missing -- Verified elsewhere.
@@ -266,7 +259,6 @@ if ( ! class_exists( 'acf_form_nav_menu' ) ) :
* @param n/a
* @return n/a
*/
function admin_footer() {
// vars

View File

@@ -26,7 +26,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// actions
@@ -51,7 +50,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param n/a
* @return (boolean)
*/
function validate_page() {
// global
@@ -78,7 +76,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param N/A
* @return N/A
*/
function admin_enqueue_scripts() {
// validate page
@@ -110,7 +107,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function add_term( $taxonomy ) {
// vars
@@ -162,7 +158,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function edit_term( $term, $taxonomy ) {
// vars
@@ -214,7 +209,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function admin_footer() {
?>
@@ -309,7 +303,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function save_term( $term_id, $tt_id, $taxonomy ) {
// vars
@@ -338,7 +331,6 @@ if ( ! class_exists( 'acf_form_taxonomy' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function delete_term( $term, $tt_id, $taxonomy, $deleted_term ) {
// bail early if termmeta table exists

View File

@@ -22,7 +22,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// enqueue
@@ -55,7 +54,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param void
* @return void
*/
function admin_enqueue_scripts() {
// bail early if not valid screen
@@ -79,7 +77,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param void
* @return void
*/
function login_form_register() {
// customize action prefix so that "admin_head" = "login_head"
@@ -101,7 +98,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param void
* @return void
*/
function render_register() {
// render
@@ -125,7 +121,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param void
* @return void
*/
function render_edit( $user ) {
// add compatibility with front-end user profile edit forms such as bbPress
@@ -154,7 +149,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function render_new() {
// Multisite uses a different 'user-new.php' form. Don't render fields here
@@ -184,7 +178,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param $el (string)
* @return n/a
*/
function render( $args = array() ) {
// Allow $_POST data to persist across form submission attempts.
@@ -268,7 +261,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function admin_footer() {
// script
@@ -301,7 +293,6 @@ if ( ! class_exists( 'ACF_Form_User' ) ) :
* @param $post_id (int)
* @return $post_id (int)
*/
function save_user( $user_id ) {
// verify nonce

View File

@@ -24,7 +24,6 @@ if ( ! class_exists( 'acf_form_widget' ) ) :
* @param n/a
* @return n/a
*/
function __construct() {
// vars
@@ -53,7 +52,6 @@ if ( ! class_exists( 'acf_form_widget' ) ) :
* @param N/A
* @return N/A
*/
function admin_enqueue_scripts() {
// validate screen
@@ -109,7 +107,6 @@ if ( ! class_exists( 'acf_form_widget' ) ) :
* @param $instance (object)
* @return $post_id (int)
*/
function edit_widget( $widget, $return, $instance ) {
// vars
@@ -195,7 +192,6 @@ if ( ! class_exists( 'acf_form_widget' ) ) :
* @param $widget (object) widget info
* @return $instance
*/
function save_widget( $instance, $new_instance, $old_instance, $widget ) {
// validate nonce if we're not a REST API request.
@@ -229,7 +225,6 @@ if ( ! class_exists( 'acf_form_widget' ) ) :
* @param n/a
* @return n/a
*/
function admin_footer() {
?>
<script type="text/javascript">