plugin updates
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -889,7 +889,7 @@ function acf_render_field_instructions( $field, $tooltip = false ) {
|
||||
$instructions = acf_esc_html( $field['instructions'] );
|
||||
|
||||
if ( $tooltip ) {
|
||||
printf( '<div class="acf-tip"><i tabindex="0" class="acf-icon acf-icon-help acf-js-tooltip" title="%s">?</i></div>', $instructions ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped earlier in function.
|
||||
printf( '<div class="acf-tip"><i tabindex="0" class="acf-icon acf-icon-help acf-js-tooltip" title="%s">?</i></div>', esc_attr( $instructions ) ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped earlier in function.
|
||||
} else {
|
||||
printf( '<p class="description">%s</p>', $instructions ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped earlier in function.
|
||||
}
|
||||
|
||||
@@ -525,19 +525,35 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
* @since 6.0
|
||||
*/
|
||||
public function check_activate() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Used for redirect notice.
|
||||
// Display notice on success redirect.
|
||||
if ( isset( $_GET['acfactivatecomplete'] ) ) {
|
||||
$ids = array_map( 'intval', explode( ',', $_GET['acfactivatecomplete'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized with intval().
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
// Generate text.
|
||||
$text = $this->get_action_notice_text( 'acfactivatecomplete', count( $ids ) );
|
||||
// Verify capability.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append links to text.
|
||||
$links = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'acfactivatecomplete' => '',
|
||||
'acfactivate' => '',
|
||||
'post' => '',
|
||||
'action2' => '',
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! empty( $args['acfactivatecomplete'] ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
$activated = array_map( 'intval', explode( ',', $args['acfactivatecomplete'] ) );
|
||||
$text = $this->get_action_notice_text( 'acfactivatecomplete', count( $activated ) );
|
||||
$links = array();
|
||||
|
||||
foreach ( $activated as $activated_id ) {
|
||||
$links[] = sprintf(
|
||||
'<a href="%1$s">%2$s</a>',
|
||||
get_edit_post_link( $activated_id ),
|
||||
get_the_title( $activated_id )
|
||||
);
|
||||
}
|
||||
|
||||
$text .= ' ' . implode( ', ', $links );
|
||||
|
||||
// Add notice.
|
||||
@@ -546,26 +562,28 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
}
|
||||
|
||||
// Find items to activate.
|
||||
$ids = array();
|
||||
if ( isset( $_GET['acfactivate'] ) ) {
|
||||
$ids[] = intval( $_GET['acfactivate'] );
|
||||
} elseif ( isset( $_GET['post'], $_GET['action2'] ) && $_GET['action2'] === 'acfactivate' ) {
|
||||
$ids = array_map( 'intval', $_GET['post'] );
|
||||
$to_activate = array();
|
||||
if ( ! empty( $args['acfactivate'] ) ) {
|
||||
$to_activate[] = intval( $args['acfactivate'] );
|
||||
} elseif ( ! empty( $args['post'] ) && 'acfactivate' === $args['action2'] ) {
|
||||
$to_activate = array_map( 'intval', $args['post'] );
|
||||
}
|
||||
|
||||
if ( $ids ) {
|
||||
if ( ! empty( $to_activate ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
// Activate the field groups and return an array of IDs that were activated.
|
||||
$new_ids = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$activated_ids = array();
|
||||
$nonce = wp_create_nonce( 'bulk-posts' );
|
||||
|
||||
foreach ( $to_activate as $id ) {
|
||||
$post_type = get_post_type( $id );
|
||||
|
||||
if ( $post_type && acf_update_internal_post_type_active_status( $id, true, $post_type ) ) {
|
||||
$new_ids[] = $id;
|
||||
$activated_ids[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
wp_safe_redirect( $this->get_admin_url( '&acfactivatecomplete=' . implode( ',', $new_ids ) ) );
|
||||
wp_safe_redirect( $this->get_admin_url( '&_wpnonce=' . $nonce . '&acfactivatecomplete=' . implode( ',', $activated_ids ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -576,19 +594,36 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
* @since 6.0
|
||||
*/
|
||||
public function check_deactivate() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Used for redirect notice.
|
||||
// Display notice on success redirect.
|
||||
if ( isset( $_GET['acfdeactivatecomplete'] ) ) {
|
||||
$ids = array_map( 'intval', explode( ',', $_GET['acfdeactivatecomplete'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized with intval().
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
// Generate text.
|
||||
$text = $this->get_action_notice_text( 'acfdeactivatecomplete', count( $ids ) );
|
||||
// Verify capability.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append links to text.
|
||||
$links = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'acfdeactivatecomplete' => '',
|
||||
'acfdeactivate' => '',
|
||||
'post' => '',
|
||||
'action2' => '',
|
||||
)
|
||||
);
|
||||
|
||||
// Display notice on success redirect.
|
||||
if ( ! empty( $args['acfdeactivatecomplete'] ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
$deactivated = array_map( 'intval', explode( ',', $args['acfdeactivatecomplete'] ) );
|
||||
$text = $this->get_action_notice_text( 'acfdeactivatecomplete', count( $deactivated ) );
|
||||
$links = array();
|
||||
|
||||
foreach ( $deactivated as $deactivated_id ) {
|
||||
$links[] = sprintf(
|
||||
'<a href="%1$s">%2$s</a>',
|
||||
get_edit_post_link( $deactivated_id ),
|
||||
get_the_title( $deactivated_id )
|
||||
);
|
||||
}
|
||||
|
||||
$text .= ' ' . implode( ', ', $links );
|
||||
|
||||
// Add notice.
|
||||
@@ -596,27 +631,28 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
return;
|
||||
}
|
||||
|
||||
// Find items to activate.
|
||||
$ids = array();
|
||||
if ( isset( $_GET['acfdeactivate'] ) ) {
|
||||
$ids[] = intval( $_GET['acfdeactivate'] );
|
||||
} elseif ( isset( $_GET['post'], $_GET['action2'] ) && $_GET['action2'] === 'acfdeactivate' ) {
|
||||
$ids = array_map( 'intval', $_GET['post'] );
|
||||
// Find items to deactivate.
|
||||
$to_deactivate = array();
|
||||
if ( ! empty( $args['acfdeactivate'] ) ) {
|
||||
$to_deactivate[] = intval( $args['acfdeactivate'] );
|
||||
} elseif ( ! empty( $args['post'] ) && 'acfdeactivate' === $args['action2'] ) {
|
||||
$to_deactivate = array_map( 'intval', $args['post'] );
|
||||
}
|
||||
|
||||
if ( $ids ) {
|
||||
if ( ! empty( $to_deactivate ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
// Activate the field groups and return an array of IDs.
|
||||
$new_ids = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$deactivated_ids = array();
|
||||
$nonce = wp_create_nonce( 'bulk-posts' );
|
||||
|
||||
foreach ( $to_deactivate as $id ) {
|
||||
$post_type = get_post_type( $id );
|
||||
if ( $post_type && acf_update_internal_post_type_active_status( $id, false, $post_type ) ) {
|
||||
$new_ids[] = $id;
|
||||
$deactivated_ids[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
wp_safe_redirect( $this->get_admin_url( '&acfdeactivatecomplete=' . implode( ',', $new_ids ) ) );
|
||||
wp_safe_redirect( $this->get_admin_url( '&_wpnonce=' . $nonce . '&acfdeactivatecomplete=' . implode( ',', $deactivated_ids ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -627,46 +663,63 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
* @since 5.9.0
|
||||
*/
|
||||
public function check_duplicate() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended -- Used for redirect notice.
|
||||
// Display notice on success redirect.
|
||||
if ( isset( $_GET['acfduplicatecomplete'] ) ) {
|
||||
$ids = array_map( 'intval', explode( ',', $_GET['acfduplicatecomplete'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized with intval().
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
// Generate text.
|
||||
$text = $this->get_action_notice_text( 'acfduplicatecomplete', count( $ids ) );
|
||||
// Verify capability.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append links to text.
|
||||
$links = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'acfduplicatecomplete' => '',
|
||||
'acfduplicate' => '',
|
||||
'post' => '',
|
||||
'action2' => '',
|
||||
)
|
||||
);
|
||||
|
||||
// Display notice on success redirect.
|
||||
if ( ! empty( $args['acfduplicatecomplete'] ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
$duplicated = array_map( 'intval', explode( ',', $args['acfduplicatecomplete'] ) );
|
||||
$text = $this->get_action_notice_text( 'acfduplicatecomplete', count( $duplicated ) );
|
||||
$links = array();
|
||||
|
||||
foreach ( $duplicated as $duplicated_id ) {
|
||||
$links[] = sprintf(
|
||||
'<a href="%1$s">%2$s</a>',
|
||||
get_edit_post_link( $duplicated_id ),
|
||||
get_the_title( $duplicated_id )
|
||||
);
|
||||
}
|
||||
|
||||
$text .= ' ' . implode( ', ', $links );
|
||||
|
||||
// Add notice.
|
||||
acf_add_admin_notice( $text, 'success' );
|
||||
return;
|
||||
}
|
||||
|
||||
// Find items to duplicate.
|
||||
$ids = array();
|
||||
if ( isset( $_GET['acfduplicate'] ) ) {
|
||||
$ids[] = intval( $_GET['acfduplicate'] );
|
||||
} elseif ( isset( $_GET['post'], $_GET['action2'] ) && $_GET['action2'] === 'acfduplicate' ) {
|
||||
$ids = array_map( 'intval', $_GET['post'] );
|
||||
$to_duplicate = array();
|
||||
if ( ! empty( $args['acfduplicate'] ) ) {
|
||||
$to_duplicate[] = intval( $args['acfduplicate'] );
|
||||
} elseif ( ! empty( $args['post'] ) && 'acfduplicate' === $args['action2'] ) {
|
||||
$to_duplicate = array_map( 'intval', $args['post'] );
|
||||
}
|
||||
|
||||
if ( $ids ) {
|
||||
if ( ! empty( $to_duplicate ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
// Duplicate field groups and generate array of new IDs.
|
||||
$new_ids = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$field_group = acf_duplicate_field_group( $id );
|
||||
$new_ids[] = $field_group['ID'];
|
||||
$duplicated_ids = array();
|
||||
$nonce = wp_create_nonce( 'bulk-posts' );
|
||||
|
||||
foreach ( $to_duplicate as $id ) {
|
||||
$field_group = acf_duplicate_field_group( $id );
|
||||
$duplicated_ids[] = $field_group['ID'];
|
||||
}
|
||||
|
||||
// Redirect.
|
||||
wp_safe_redirect( $this->get_admin_url( '&acfduplicatecomplete=' . implode( ',', $new_ids ) ) );
|
||||
wp_safe_redirect( $this->get_admin_url( '&_wpnonce=' . $nonce . '&acfduplicatecomplete=' . implode( ',', $duplicated_ids ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -677,19 +730,36 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
* @since 5.9.0
|
||||
*/
|
||||
public function check_sync() {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||
// Display notice on success redirect.
|
||||
if ( isset( $_GET['acfsynccomplete'] ) ) {
|
||||
$ids = array_map( 'intval', explode( ',', $_GET['acfsynccomplete'] ) ); // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized with intval().
|
||||
// phpcs:enable WordPress.Security.NonceVerification.Recommended
|
||||
// Generate text.
|
||||
$text = $this->get_action_notice_text( 'acfsynccomplete', count( $ids ) );
|
||||
// Verify capability.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Append links to text.
|
||||
$links = array();
|
||||
foreach ( $ids as $id ) {
|
||||
$links[] = '<a href="' . get_edit_post_link( $id ) . '">' . get_the_title( $id ) . '</a>';
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'acfsynccomplete' => '',
|
||||
'acfsync' => '',
|
||||
'post' => '',
|
||||
'action2' => '',
|
||||
)
|
||||
);
|
||||
|
||||
// Display notice on success redirect.
|
||||
if ( ! empty( $args['acfsynccomplete'] ) ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
$synced = array_map( 'intval', explode( ',', $args['acfsynccomplete'] ) );
|
||||
$text = $this->get_action_notice_text( 'acfsynccomplete', count( $synced ) );
|
||||
$links = array();
|
||||
|
||||
foreach ( $synced as $synced_id ) {
|
||||
$links[] = sprintf(
|
||||
'<a href="%1$s">%2$s</a>',
|
||||
get_edit_post_link( $synced_id ),
|
||||
get_the_title( $synced_id )
|
||||
);
|
||||
}
|
||||
|
||||
$text .= ' ' . implode( ', ', $links );
|
||||
|
||||
// Add notice.
|
||||
@@ -699,21 +769,23 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
|
||||
// Find items to sync.
|
||||
$keys = array();
|
||||
if ( isset( $_GET['acfsync'] ) ) {
|
||||
$keys[] = sanitize_text_field( $_GET['acfsync'] );
|
||||
} elseif ( isset( $_GET['post'], $_GET['action2'] ) && $_GET['action2'] === 'acfsync' ) {
|
||||
$keys = array_map( 'sanitize_text_field', $_GET['post'] );
|
||||
if ( ! empty( $args['acfsync'] ) ) {
|
||||
$keys[] = sanitize_text_field( $args['acfsync'] );
|
||||
} elseif ( ! empty( $args['post'] ) && 'acfsync' === $args['action2'] ) {
|
||||
$keys = array_map( 'sanitize_text_field', $args['post'] );
|
||||
}
|
||||
|
||||
if ( $keys && $this->sync ) {
|
||||
check_admin_referer( 'bulk-posts' );
|
||||
|
||||
// Disabled "Local JSON" controller to prevent the .json file from being modified during import.
|
||||
// Disable "Local JSON" controller to prevent the .json file from being modified during import.
|
||||
acf_update_setting( 'json', false );
|
||||
|
||||
// Sync field groups and generate array of new IDs.
|
||||
$files = acf_get_local_json_files( $this->post_type );
|
||||
$new_ids = array();
|
||||
// Sync the items and generate array of new IDs.
|
||||
$files = acf_get_local_json_files( $this->post_type );
|
||||
$nonce = wp_create_nonce( 'bulk-posts' );
|
||||
$synced = array();
|
||||
|
||||
foreach ( $this->sync as $key => $post ) {
|
||||
if ( $post['key'] && in_array( $post['key'], $keys ) ) {
|
||||
// Import.
|
||||
@@ -723,14 +795,15 @@ if ( ! class_exists( 'ACF_Admin_Internal_Post_Type_List' ) ) :
|
||||
// Ignore.
|
||||
continue;
|
||||
}
|
||||
|
||||
$local_post = json_decode( file_get_contents( $files[ $key ] ), true );
|
||||
$local_post['ID'] = $post['ID'];
|
||||
$result = acf_import_internal_post_type( $local_post, $this->post_type );
|
||||
$new_ids[] = $result['ID'];
|
||||
$synced[] = $result['ID'];
|
||||
}
|
||||
|
||||
// Redirect.
|
||||
wp_safe_redirect( $this->get_current_admin_url( '&acfsynccomplete=' . implode( ',', $new_ids ) ) );
|
||||
wp_safe_redirect( $this->get_current_admin_url( '&_wpnonce=' . $nonce . '&acfsynccomplete=' . implode( ',', $synced ) ) );
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -23,7 +23,7 @@ $acf_getting_started = sprintf(
|
||||
<div class="acf-no-field-groups-wrapper">
|
||||
<div class="acf-no-field-groups-inner acf-field-group-pro-features-content">
|
||||
<img src="<?php echo esc_url( acf_get_url( 'assets/images/empty-post-types.svg' ) ); ?>" />
|
||||
<h2><?php echo acf_esc_html( 'Upgrade to ACF PRO to create options pages in just a few clicks', 'acf' ); ?></h2>
|
||||
<h2><?php echo acf_esc_html( __( 'Upgrade to ACF PRO to create options pages in just a few clicks', 'acf' ) ); ?></h2>
|
||||
<p><?php echo acf_esc_html( $acf_options_pages_desc ); ?></p>
|
||||
<div class="acf-ui-options-page-pro-features-actions">
|
||||
<a target="_blank" href="<?php echo $acf_learn_more_link; ?>" class="acf-btn acf-btn-muted"><?php esc_html_e( 'Learn More', 'acf' ); ?> <i class="acf-icon acf-icon-arrow-up-right"></i></a><?php //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped on generation. ?>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -15,17 +15,17 @@ if ( ! class_exists( 'ACF_Ajax_Check_Screen' ) ) :
|
||||
var $public = false;
|
||||
|
||||
/**
|
||||
* get_response
|
||||
*
|
||||
* Returns the response data to sent back.
|
||||
*
|
||||
* @date 31/7/18
|
||||
* @since 5.7.2
|
||||
* @since 5.7.2
|
||||
*
|
||||
* @param array $request The request args.
|
||||
* @return mixed The response data or WP_Error.
|
||||
* @param array $request The request args.
|
||||
* @return array|WP_Error The response data or WP_Error.
|
||||
*/
|
||||
function get_response( $request ) {
|
||||
public function get_response( $request ) {
|
||||
if ( ! current_user_can( 'edit_posts' ) ) {
|
||||
return new WP_Error( 'acf_invalid_permissions', __( 'Sorry, you do not have permission to do that.', 'acf' ) );
|
||||
}
|
||||
|
||||
// vars
|
||||
$args = wp_parse_args(
|
||||
|
||||
@@ -32,6 +32,11 @@ if ( ! class_exists( 'ACF_Ajax_Local_JSON_Diff' ) ) :
|
||||
* @return array|WP_Error The response data or WP_Error.
|
||||
*/
|
||||
public function get_response( $request ) {
|
||||
// Bail early if the current user can't access the ACF admin.
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return new WP_Error( 'acf_not_allowed', __( 'Sorry, you are not allowed to do that.', 'acf' ), array( 'status' => 403 ) );
|
||||
}
|
||||
|
||||
$json = array();
|
||||
|
||||
// Extract props.
|
||||
|
||||
@@ -11,6 +11,39 @@ if ( ! class_exists( 'ACF_Ajax_Query_Users' ) ) :
|
||||
/** @var string The AJAX action name. */
|
||||
var $action = 'acf/ajax/query_users';
|
||||
|
||||
/**
|
||||
* Verifies the request.
|
||||
*
|
||||
* @since 6.3.2
|
||||
*
|
||||
* @param array $request The request args.
|
||||
* @return (bool|WP_Error) True on success, WP_Error on fail.
|
||||
*/
|
||||
public function verify_request( $request ) {
|
||||
if ( empty( $request['nonce'] ) || empty( $request['field_key'] ) ) {
|
||||
return new WP_Error( 'acf_invalid_args', __( 'Invalid request args.', 'acf' ), array( 'status' => 404 ) );
|
||||
}
|
||||
|
||||
$nonce = $request['nonce'];
|
||||
$action = $request['field_key'];
|
||||
|
||||
if ( isset( $request['conditional_logic'] ) && true === (bool) $request['conditional_logic'] ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return new WP_Error( 'acf_invalid_permissions', __( 'Sorry, you do not have permission to do that.', 'acf' ) );
|
||||
}
|
||||
|
||||
// Use the standard ACF admin nonce.
|
||||
$nonce = '';
|
||||
$action = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $action ) ) {
|
||||
return new WP_Error( 'acf_invalid_nonce', __( 'Invalid nonce.', 'acf' ), array( 'status' => 404 ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* init_request
|
||||
*
|
||||
|
||||
@@ -12,17 +12,17 @@ if ( ! class_exists( 'ACF_Ajax_Upgrade' ) ) :
|
||||
var $action = 'acf/ajax/upgrade';
|
||||
|
||||
/**
|
||||
* get_response
|
||||
*
|
||||
* Returns the response data to sent back.
|
||||
*
|
||||
* @date 31/7/18
|
||||
* @since 5.7.2
|
||||
* @since 5.7.2
|
||||
*
|
||||
* @param array $request The request args.
|
||||
* @return mixed The response data or WP_Error.
|
||||
* @param array $request The request args.
|
||||
* @return boolean|WP_Error True if successful, or WP_Error on failure.
|
||||
*/
|
||||
function get_response( $request ) {
|
||||
public function get_response( $request ) {
|
||||
if ( ! current_user_can( acf_get_setting( 'capability' ) ) ) {
|
||||
return new WP_Error( 'upgrade_error', __( 'Sorry, you don\'t have permission to do that.', 'acf' ) );
|
||||
}
|
||||
|
||||
// Switch blog.
|
||||
if ( isset( $request['blog_id'] ) ) {
|
||||
@@ -47,6 +47,7 @@ if ( ! class_exists( 'ACF_Ajax_Upgrade' ) ) :
|
||||
if ( $error ) {
|
||||
return new WP_Error( 'upgrade_error', $error );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,19 @@ if ( ! class_exists( 'ACF_Ajax_User_Setting' ) ) :
|
||||
|
||||
class ACF_Ajax_User_Setting extends ACF_Ajax {
|
||||
|
||||
/** @var string The AJAX action name. */
|
||||
var $action = 'acf/ajax/user_setting';
|
||||
/**
|
||||
* The AJAX action name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $action = 'acf/ajax/user_setting';
|
||||
|
||||
/** @var boolean Prevents access for non-logged in users. */
|
||||
var $public = true;
|
||||
/**
|
||||
* Prevents access for non-logged in users.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
public $public = false;
|
||||
|
||||
/**
|
||||
* get_response
|
||||
@@ -25,7 +33,10 @@ if ( ! class_exists( 'ACF_Ajax_User_Setting' ) ) :
|
||||
* @param array $request The request args.
|
||||
* @return mixed The response data or WP_Error.
|
||||
*/
|
||||
function get_response( $request ) {
|
||||
public function get_response( $request ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
return new WP_Error( 'acf_invalid_permissions', __( 'Sorry, you do not have permission to do that.', 'acf' ) );
|
||||
}
|
||||
|
||||
// update
|
||||
if ( $this->has( 'value' ) ) {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -682,27 +682,32 @@ function acf_verify_nonce( $value ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* acf_verify_ajax
|
||||
*
|
||||
* This function will return true if the current AJAX request is valid
|
||||
* Returns true if the current AJAX request is valid.
|
||||
* It's action will also allow WPML to set the lang and avoid AJAX get_posts issues
|
||||
*
|
||||
* @since 5.2.3
|
||||
*
|
||||
* @param n/a
|
||||
* @return (boolean)
|
||||
* @param string $nonce The nonce to check.
|
||||
* @param string $action The action of the nonce.
|
||||
* @return boolean
|
||||
*/
|
||||
function acf_verify_ajax() {
|
||||
|
||||
// bail early if not acf nonce
|
||||
if ( empty( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_REQUEST['nonce'] ), 'acf_nonce' ) ) {
|
||||
function acf_verify_ajax( $nonce = '', $action = '' ) {
|
||||
// Bail early if we don't have a nonce to check.
|
||||
if ( empty( $nonce ) && empty( $_REQUEST['nonce'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// action for 3rd party customization
|
||||
$nonce_to_check = ! empty( $nonce ) ? $nonce : $_REQUEST['nonce']; // phpcs:ignore WordPress.Security -- We're verifying a nonce here.
|
||||
$nonce_action = ! empty( $action ) ? $action : 'acf_nonce';
|
||||
|
||||
// Bail if nonce can't be verified.
|
||||
if ( ! wp_verify_nonce( sanitize_text_field( $nonce_to_check ), $nonce_action ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Action for 3rd party customization (WPML).
|
||||
do_action( 'acf/verify_ajax' );
|
||||
|
||||
// return
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1361,22 +1366,26 @@ function acf_get_grouped_posts( $args ) {
|
||||
return $data;
|
||||
}
|
||||
|
||||
function _acf_orderby_post_type( $ordeby, $wp_query ) {
|
||||
|
||||
// global
|
||||
/**
|
||||
* The internal ACF function to add order by post types for use in `acf_get_grouped_posts`
|
||||
*
|
||||
* @param string $orderby The current orderby value for a query.
|
||||
* @param object $wp_query The WP_Query.
|
||||
* @return string The potentially modified orderby string.
|
||||
*/
|
||||
function _acf_orderby_post_type( $orderby, $wp_query ) {
|
||||
global $wpdb;
|
||||
|
||||
// get post types
|
||||
$post_types = $wp_query->get( 'post_type' );
|
||||
|
||||
// prepend SQL
|
||||
// Prepend the SQL.
|
||||
if ( is_array( $post_types ) ) {
|
||||
$post_types = array_map( 'esc_sql', $post_types );
|
||||
$post_types = implode( "','", $post_types );
|
||||
$ordeby = "FIELD({$wpdb->posts}.post_type,'$post_types')," . $ordeby;
|
||||
$orderby = "FIELD({$wpdb->posts}.post_type,'$post_types')," . $orderby;
|
||||
}
|
||||
|
||||
// return
|
||||
return $ordeby;
|
||||
return $orderby;
|
||||
}
|
||||
|
||||
function acf_get_post_title( $post = 0, $is_search = false ) {
|
||||
@@ -3109,28 +3118,19 @@ function acf_is_row_collapsed( $field_key = '', $row_index = 0 ) {
|
||||
}
|
||||
|
||||
/**
|
||||
* acf_get_attachment_image
|
||||
* Return an image tag for the provided attachment ID
|
||||
*
|
||||
* description
|
||||
* @since 5.5.0
|
||||
* @deprecated 6.3.2
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @param integer $attachment_id The attachment ID
|
||||
* @param string $size The image size to use in the image tag.
|
||||
* @return false
|
||||
*/
|
||||
function acf_get_attachment_image( $attachment_id = 0, $size = 'thumbnail' ) {
|
||||
|
||||
// vars
|
||||
$url = wp_get_attachment_image_src( $attachment_id, 'thumbnail' );
|
||||
$alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true );
|
||||
|
||||
// bail early if no url
|
||||
if ( ! $url ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// return
|
||||
$value = '<img src="' . $url . '" alt="' . $alt . '" />';
|
||||
// report function as deprecated
|
||||
_deprecated_function( __FUNCTION__, '6.3.2' );
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -475,7 +475,7 @@ if ( ! class_exists( 'ACF_Assets' ) ) :
|
||||
'validation' => acf_get_form_data( 'validation' ),
|
||||
'editor' => acf_is_block_editor() ? 'block' : 'classic',
|
||||
'is_pro' => acf_is_pro(),
|
||||
'debug' => acf_is_beta() || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
|
||||
'debug' => acf_is_beta() || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ),
|
||||
);
|
||||
|
||||
acf_localize_data( $data_to_localize );
|
||||
|
||||
@@ -165,10 +165,17 @@ if ( ! class_exists( 'acf_field_icon_picker' ) ) :
|
||||
?>
|
||||
<div class="acf-icon-picker-tab" data-category="<?php echo esc_attr( $name ); ?>">
|
||||
<div class="acf-icon-picker-media-library">
|
||||
<?php
|
||||
$button_style = 'display: none;';
|
||||
|
||||
if ( in_array( $field['value']['type'], array( 'media_library', 'dashicons' ), true ) && ! empty( $field['value']['value'] ) ) {
|
||||
$button_style = '';
|
||||
}
|
||||
?>
|
||||
<button
|
||||
aria-label="<?php esc_attr_e( 'Click to change the icon in the Media Library', 'acf' ); ?>"
|
||||
class="acf-icon-picker-media-library-preview"
|
||||
style="<?php echo esc_attr( 'media_library' === $field['value']['type'] || 'dashicons' === $field['value']['type'] && ! empty( $field['value']['value'] ) ? '' : 'display: none;' ); ?>"
|
||||
style="<?php echo esc_attr( $button_style ); ?>"
|
||||
>
|
||||
<div class="acf-icon-picker-media-library-preview-img" style="<?php echo esc_attr( 'media_library' !== $field['value']['type'] ? 'display: none;' : '' ); ?>">
|
||||
<?php
|
||||
@@ -375,239 +382,344 @@ if ( ! class_exists( 'acf_field_icon_picker' ) ) :
|
||||
*/
|
||||
public function get_dashicons() {
|
||||
$dashicons = array(
|
||||
'dashicons-admin-generic' => esc_html__( 'Generic icon', 'acf' ),
|
||||
'dashicons-admin-appearance' => esc_html__( 'Appearance icon', 'acf' ),
|
||||
'dashicons-admin-collapse' => esc_html__( 'Collapse icon', 'acf' ),
|
||||
'dashicons-admin-comments' => esc_html__( 'Comments icon', 'acf' ),
|
||||
'dashicons-admin-customizer' => esc_html__( 'Customizer icon', 'acf' ),
|
||||
'dashicons-admin-home' => esc_html__( 'Home icon', 'acf' ),
|
||||
'dashicons-admin-links' => esc_html__( 'Links icon', 'acf' ),
|
||||
'dashicons-admin-media' => esc_html__( 'Media icon', 'acf' ),
|
||||
'dashicons-admin-multisite' => esc_html__( 'Multisite icon', 'acf' ),
|
||||
'dashicons-admin-network' => esc_html__( 'Network icon', 'acf' ),
|
||||
'dashicons-admin-page' => esc_html__( 'Page icon', 'acf' ),
|
||||
'dashicons-admin-plugins' => esc_html__( 'Plugins icon', 'acf' ),
|
||||
'dashicons-admin-post' => esc_html__( 'Post icon', 'acf' ),
|
||||
'dashicons-admin-settings' => esc_html__( 'Settings icon', 'acf' ),
|
||||
'dashicons-admin-site' => esc_html__( 'Site icon', 'acf' ),
|
||||
'dashicons-admin-tools' => esc_html__( 'Tools icon', 'acf' ),
|
||||
'dashicons-admin-users' => esc_html__( 'Users icon', 'acf' ),
|
||||
'dashicons-album' => esc_html__( 'Album icon', 'acf' ),
|
||||
'dashicons-align-center' => esc_html__( 'Align-center icon', 'acf' ),
|
||||
'dashicons-align-left' => esc_html__( 'Align-left icon', 'acf' ),
|
||||
'dashicons-align-none' => esc_html__( 'Align-none icon', 'acf' ),
|
||||
'dashicons-align-right' => esc_html__( 'Align-right icon', 'acf' ),
|
||||
'dashicons-analytics' => esc_html__( 'Analytics icon', 'acf' ),
|
||||
'dashicons-archive' => esc_html__( 'Archive icon', 'acf' ),
|
||||
'dashicons-arrow-down' => esc_html__( 'Arrow down icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt' => esc_html__( 'Arrow down-alt icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt2' => esc_html__( 'Arrow down-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-left' => esc_html__( 'Arrow left icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt' => esc_html__( 'Arrow left-alt icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt2' => esc_html__( 'Arrow left-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-right' => esc_html__( 'Arrow right icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt' => esc_html__( 'Arrow right-alt icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt2' => esc_html__( 'Arrow right-alt2 icon', 'acf' ),
|
||||
'dashicons-arrow-up' => esc_html__( 'Arrow up icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt' => esc_html__( 'Arrow up-alt icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt2' => esc_html__( 'Arrow up-alt2 icon', 'acf' ),
|
||||
'dashicons-art' => esc_html__( 'Art icon', 'acf' ),
|
||||
'dashicons-awards' => esc_html__( 'Awards icon', 'acf' ),
|
||||
'dashicons-backup' => esc_html__( 'Backup icon', 'acf' ),
|
||||
'dashicons-book' => esc_html__( 'Book icon', 'acf' ),
|
||||
'dashicons-book-alt' => esc_html__( 'Book alt icon', 'acf' ),
|
||||
'dashicons-building' => esc_html__( 'Building icon', 'acf' ),
|
||||
'dashicons-businessman' => esc_html__( 'Businessman icon', 'acf' ),
|
||||
'dashicons-calendar' => esc_html__( 'Calendar icon', 'acf' ),
|
||||
'dashicons-calendar-alt' => esc_html__( 'Calendar alt icon', 'acf' ),
|
||||
'dashicons-camera' => esc_html__( 'Camera icon', 'acf' ),
|
||||
'dashicons-carrot' => esc_html__( 'Carrot icon', 'acf' ),
|
||||
'dashicons-cart' => esc_html__( 'Cart icon', 'acf' ),
|
||||
'dashicons-category' => esc_html__( 'Category icon', 'acf' ),
|
||||
'dashicons-chart-area' => esc_html__( 'Chart area icon', 'acf' ),
|
||||
'dashicons-chart-bar' => esc_html__( 'Chart bar icon', 'acf' ),
|
||||
'dashicons-chart-line' => esc_html__( 'Chart line icon', 'acf' ),
|
||||
'dashicons-chart-pie' => esc_html__( 'Chart pie icon', 'acf' ),
|
||||
'dashicons-clipboard' => esc_html__( 'Clipboard icon', 'acf' ),
|
||||
'dashicons-clock' => esc_html__( 'Clock icon', 'acf' ),
|
||||
'dashicons-cloud' => esc_html__( 'Cloud icon', 'acf' ),
|
||||
'dashicons-controls-back' => esc_html__( 'Controls back icon', 'acf' ),
|
||||
'dashicons-controls-forward' => esc_html__( 'Controls forward icon', 'acf' ),
|
||||
'dashicons-controls-pause' => esc_html__( 'Controls pause icon', 'acf' ),
|
||||
'dashicons-controls-play' => esc_html__( 'Controls play icon', 'acf' ),
|
||||
'dashicons-controls-repeat' => esc_html__( 'Controls repeat icon', 'acf' ),
|
||||
'dashicons-controls-skipback' => esc_html__( 'Controls skipback icon', 'acf' ),
|
||||
'dashicons-controls-skipforward' => esc_html__( 'Controls skipforward icon', 'acf' ),
|
||||
'dashicons-controls-volumeoff' => esc_html__( 'Controls volumeoff icon', 'acf' ),
|
||||
'dashicons-controls-volumeon' => esc_html__( 'Controls volumeon icon', 'acf' ),
|
||||
'dashicons-dashboard' => esc_html__( 'Dashboard icon', 'acf' ),
|
||||
'dashicons-desktop' => esc_html__( 'Desktop icon', 'acf' ),
|
||||
'dashicons-dismiss' => esc_html__( 'Dismiss icon', 'acf' ),
|
||||
'dashicons-download' => esc_html__( 'Download icon', 'acf' ),
|
||||
'dashicons-edit' => esc_html__( 'Edit icon', 'acf' ),
|
||||
'dashicons-editor-aligncenter' => esc_html__( 'aligncenter icon', 'acf' ),
|
||||
'dashicons-editor-alignleft' => esc_html__( 'alignleft icon', 'acf' ),
|
||||
'dashicons-editor-alignright' => esc_html__( 'alignright icon', 'acf' ),
|
||||
'dashicons-editor-bold' => esc_html__( 'Bold icon', 'acf' ),
|
||||
'dashicons-editor-break' => esc_html__( 'Break icon', 'acf' ),
|
||||
'dashicons-editor-code' => esc_html__( 'Code icon', 'acf' ),
|
||||
'dashicons-editor-contract' => esc_html__( 'Contract icon', 'acf' ),
|
||||
'dashicons-editor-customchar' => esc_html__( 'Customchar icon', 'acf' ),
|
||||
'dashicons-editor-expand' => esc_html__( 'Expand icon', 'acf' ),
|
||||
'dashicons-editor-help' => esc_html__( 'Help icon', 'acf' ),
|
||||
'dashicons-editor-indent' => esc_html__( 'Indent icon', 'acf' ),
|
||||
'dashicons-editor-insertmore' => esc_html__( 'Insertmore icon', 'acf' ),
|
||||
'dashicons-editor-italic' => esc_html__( 'Italic icon', 'acf' ),
|
||||
'dashicons-editor-justify' => esc_html__( 'Justify icon', 'acf' ),
|
||||
'dashicons-editor-kitchensink' => esc_html__( 'Kitchensink icon', 'acf' ),
|
||||
'dashicons-editor-ol' => esc_html__( 'Ol icon', 'acf' ),
|
||||
'dashicons-editor-outdent' => esc_html__( 'Outdent icon', 'acf' ),
|
||||
'dashicons-editor-paragraph' => esc_html__( 'Paragraph icon', 'acf' ),
|
||||
'dashicons-editor-paste-text' => esc_html__( 'Paste text icon', 'acf' ),
|
||||
'dashicons-editor-paste-word' => esc_html__( 'Paste word icon', 'acf' ),
|
||||
'dashicons-editor-quote' => esc_html__( 'Quote icon', 'acf' ),
|
||||
'dashicons-editor-removeformatting' => esc_html__( 'Removeformatting icon', 'acf' ),
|
||||
'dashicons-editor-rtl' => esc_html__( 'Rtl icon', 'acf' ),
|
||||
'dashicons-editor-spellcheck' => esc_html__( 'Spellcheck icon', 'acf' ),
|
||||
'dashicons-editor-strikethrough' => esc_html__( 'Strikethrough icon', 'acf' ),
|
||||
'dashicons-editor-table' => esc_html__( 'Table icon', 'acf' ),
|
||||
'dashicons-editor-textcolor' => esc_html__( 'Textcolor icon', 'acf' ),
|
||||
'dashicons-editor-ul' => esc_html__( 'Ul icon', 'acf' ),
|
||||
'dashicons-editor-underline' => esc_html__( 'Underline icon', 'acf' ),
|
||||
'dashicons-editor-unlink' => esc_html__( 'Unlink icon', 'acf' ),
|
||||
'dashicons-editor-video' => esc_html__( 'Video icon', 'acf' ),
|
||||
'dashicons-email' => esc_html__( 'Email icon', 'acf' ),
|
||||
'dashicons-email-alt' => esc_html__( 'Email alt icon', 'acf' ),
|
||||
'dashicons-exerpt-view' => esc_html__( 'Exerpt-view icon', 'acf' ),
|
||||
'dashicons-external' => esc_html__( 'External icon', 'acf' ),
|
||||
'dashicons-facebook' => esc_html__( 'Facebook icon', 'acf' ),
|
||||
'dashicons-facebook-alt' => esc_html__( 'Facebook alt icon', 'acf' ),
|
||||
'dashicons-feedback' => esc_html__( 'Feedback icon', 'acf' ),
|
||||
'dashicons-filter' => esc_html__( 'Filter icon', 'acf' ),
|
||||
'dashicons-flag' => esc_html__( 'Flag icon', 'acf' ),
|
||||
'dashicons-format-aside' => esc_html__( 'Format aside icon', 'acf' ),
|
||||
'dashicons-format-audio' => esc_html__( 'Format audio icon', 'acf' ),
|
||||
'dashicons-format-chat' => esc_html__( 'Format chat icon', 'acf' ),
|
||||
'dashicons-format-gallery' => esc_html__( 'Format gallery icon', 'acf' ),
|
||||
'dashicons-format-image' => esc_html__( 'Format image icon', 'acf' ),
|
||||
'dashicons-format-quote' => esc_html__( 'Format quote icon', 'acf' ),
|
||||
'dashicons-format-status' => esc_html__( 'Format status icon', 'acf' ),
|
||||
'dashicons-format-video' => esc_html__( 'Format video icon', 'acf' ),
|
||||
'dashicons-forms' => esc_html__( 'Forms icon', 'acf' ),
|
||||
'dashicons-googleplus' => esc_html__( 'Googleplus icon', 'acf' ),
|
||||
'dashicons-grid-view' => esc_html__( 'Grid-view icon', 'acf' ),
|
||||
'dashicons-groups' => esc_html__( 'Groups icon', 'acf' ),
|
||||
'dashicons-hammer' => esc_html__( 'Hammer icon', 'acf' ),
|
||||
'dashicons-heart' => esc_html__( 'Heart icon', 'acf' ),
|
||||
'dashicons-hidden' => esc_html__( 'Hidden icon', 'acf' ),
|
||||
'dashicons-id' => esc_html__( 'Id icon', 'acf' ),
|
||||
'dashicons-id-alt' => esc_html__( 'Id-alt icon', 'acf' ),
|
||||
'dashicons-image-crop' => esc_html__( 'Image crop icon', 'acf' ),
|
||||
'dashicons-image-filter' => esc_html__( 'Image filter icon', 'acf' ),
|
||||
'dashicons-image-flip-horizontal' => esc_html__( 'Image flip-horizontal icon', 'acf' ),
|
||||
'dashicons-image-flip-vertical' => esc_html__( 'Image flip-vertical icon', 'acf' ),
|
||||
'dashicons-image-rotate' => esc_html__( 'Image rotate icon', 'acf' ),
|
||||
'dashicons-image-rotate-left' => esc_html__( 'Image rotate-left icon', 'acf' ),
|
||||
'dashicons-image-rotate-right' => esc_html__( 'Image rotate-right icon', 'acf' ),
|
||||
'dashicons-images-alt' => esc_html__( 'Images-alt icon', 'acf' ),
|
||||
'dashicons-images-alt2' => esc_html__( 'Images-alt2 icon', 'acf' ),
|
||||
'dashicons-index-card' => esc_html__( 'Index-card icon', 'acf' ),
|
||||
'dashicons-info' => esc_html__( 'Info icon', 'acf' ),
|
||||
'dashicons-laptop' => esc_html__( 'Laptop icon', 'acf' ),
|
||||
'dashicons-layout' => esc_html__( 'Layout icon', 'acf' ),
|
||||
'dashicons-leftright' => esc_html__( 'Leftright icon', 'acf' ),
|
||||
'dashicons-lightbulb' => esc_html__( 'Lightbulb icon', 'acf' ),
|
||||
'dashicons-list-view' => esc_html__( 'List-view icon', 'acf' ),
|
||||
'dashicons-location' => esc_html__( 'Location icon', 'acf' ),
|
||||
'dashicons-location-alt' => esc_html__( 'Location-alt icon', 'acf' ),
|
||||
'dashicons-lock' => esc_html__( 'Lock icon', 'acf' ),
|
||||
'dashicons-marker' => esc_html__( 'Marker icon', 'acf' ),
|
||||
'dashicons-media-archive' => esc_html__( 'Media archive icon', 'acf' ),
|
||||
'dashicons-media-audio' => esc_html__( 'Media audio icon', 'acf' ),
|
||||
'dashicons-media-code' => esc_html__( 'Media code icon', 'acf' ),
|
||||
'dashicons-media-default' => esc_html__( 'Media default icon', 'acf' ),
|
||||
'dashicons-media-document' => esc_html__( 'Media document icon', 'acf' ),
|
||||
'dashicons-media-interactive' => esc_html__( 'Media interactive icon', 'acf' ),
|
||||
'dashicons-media-spreadsheet' => esc_html__( 'Media spreadsheet icon', 'acf' ),
|
||||
'dashicons-media-text' => esc_html__( 'Media text icon', 'acf' ),
|
||||
'dashicons-media-video' => esc_html__( 'Media video icon', 'acf' ),
|
||||
'dashicons-megaphone' => esc_html__( 'Megaphone icon', 'acf' ),
|
||||
'dashicons-menu' => esc_html__( 'Menu icon', 'acf' ),
|
||||
'dashicons-microphone' => esc_html__( 'Microphone icon', 'acf' ),
|
||||
'dashicons-migrate' => esc_html__( 'Migrate icon', 'acf' ),
|
||||
'dashicons-minus' => esc_html__( 'Minus icon', 'acf' ),
|
||||
'dashicons-money' => esc_html__( 'Money icon', 'acf' ),
|
||||
'dashicons-move' => esc_html__( 'Move icon', 'acf' ),
|
||||
'dashicons-nametag' => esc_html__( 'Nametag icon', 'acf' ),
|
||||
'dashicons-networking' => esc_html__( 'Networking icon', 'acf' ),
|
||||
'dashicons-no' => esc_html__( 'No icon', 'acf' ),
|
||||
'dashicons-no-alt' => esc_html__( 'No alternative icon', 'acf' ),
|
||||
'dashicons-palmtree' => esc_html__( 'Palmtree icon', 'acf' ),
|
||||
'dashicons-paperclip' => esc_html__( 'Paperclip icon', 'acf' ),
|
||||
'dashicons-performance' => esc_html__( 'Performance icon', 'acf' ),
|
||||
'dashicons-phone' => esc_html__( 'Phone icon', 'acf' ),
|
||||
'dashicons-playlist-audio' => esc_html__( 'Playlist-audio icon', 'acf' ),
|
||||
'dashicons-playlist-video' => esc_html__( 'Playlist-video icon', 'acf' ),
|
||||
'dashicons-plus' => esc_html__( 'Plus icon', 'acf' ),
|
||||
'dashicons-plus-alt' => esc_html__( 'Plus-alt icon', 'acf' ),
|
||||
'dashicons-portfolio' => esc_html__( 'Portfolio icon', 'acf' ),
|
||||
'dashicons-post-status' => esc_html__( 'Post-status icon', 'acf' ),
|
||||
'dashicons-pressthis' => esc_html__( 'Pressthis icon', 'acf' ),
|
||||
'dashicons-products' => esc_html__( 'Products icon', 'acf' ),
|
||||
'dashicons-randomize' => esc_html__( 'Randomize icon', 'acf' ),
|
||||
'dashicons-redo' => esc_html__( 'Redo icon', 'acf' ),
|
||||
'dashicons-rss' => esc_html__( 'Rss icon', 'acf' ),
|
||||
'dashicons-schedule' => esc_html__( 'Schedule icon', 'acf' ),
|
||||
'dashicons-screenoptions' => esc_html__( 'Screenoptions icon', 'acf' ),
|
||||
'dashicons-search' => esc_html__( 'Search icon', 'acf' ),
|
||||
'dashicons-share' => esc_html__( 'Share icon', 'acf' ),
|
||||
'dashicons-share-alt' => esc_html__( 'Share-alt icon', 'acf' ),
|
||||
'dashicons-share-alt2' => esc_html__( 'Share-alt2 icon', 'acf' ),
|
||||
'dashicons-shield' => esc_html__( 'Shield icon', 'acf' ),
|
||||
'dashicons-shield-alt' => esc_html__( 'Shield-alt icon', 'acf' ),
|
||||
'dashicons-slides' => esc_html__( 'Slides icon', 'acf' ),
|
||||
'dashicons-smartphone' => esc_html__( 'Smartphone icon', 'acf' ),
|
||||
'dashicons-smiley' => esc_html__( 'Smiley icon', 'acf' ),
|
||||
'dashicons-sort' => esc_html__( 'Sort icon', 'acf' ),
|
||||
'dashicons-sos' => esc_html__( 'Sos icon', 'acf' ),
|
||||
'dashicons-star-empty' => esc_html__( 'Star-empty icon', 'acf' ),
|
||||
'dashicons-star-filled' => esc_html__( 'Star-filled icon', 'acf' ),
|
||||
'dashicons-star-half' => esc_html__( 'Star-half icon', 'acf' ),
|
||||
'dashicons-sticky' => esc_html__( 'Sticky icon', 'acf' ),
|
||||
'dashicons-store' => esc_html__( 'Store icon', 'acf' ),
|
||||
'dashicons-tablet' => esc_html__( 'Tablet icon', 'acf' ),
|
||||
'dashicons-tag' => esc_html__( 'Tag icon', 'acf' ),
|
||||
'dashicons-tagcloud' => esc_html__( 'Tagcloud icon', 'acf' ),
|
||||
'dashicons-testimonial' => esc_html__( 'Testimonial icon', 'acf' ),
|
||||
'dashicons-text' => esc_html__( 'Text icon', 'acf' ),
|
||||
'dashicons-thumbs-down' => esc_html__( 'Thumbs-down icon', 'acf' ),
|
||||
'dashicons-thumbs-up' => esc_html__( 'Thumbs-up icon', 'acf' ),
|
||||
'dashicons-tickets' => esc_html__( 'Tickets icon', 'acf' ),
|
||||
'dashicons-tickets-alt' => esc_html__( 'Tickets alternative icon', 'acf' ),
|
||||
'dashicons-translation' => esc_html__( 'Translation icon', 'acf' ),
|
||||
'dashicons-trash' => esc_html__( 'Trash icon', 'acf' ),
|
||||
'dashicons-twitter' => esc_html__( 'Twitter icon', 'acf' ),
|
||||
'dashicons-undo' => esc_html__( 'Undo icon', 'acf' ),
|
||||
'dashicons-universal-access' => esc_html__( 'Universal access icon', 'acf' ),
|
||||
'dashicons-universal-access-alt' => esc_html__( 'Universal access alternative icon', 'acf' ),
|
||||
'dashicons-unlock' => esc_html__( 'Unlock icon', 'acf' ),
|
||||
'dashicons-update' => esc_html__( 'Update icon', 'acf' ),
|
||||
'dashicons-upload' => esc_html__( 'Upload icon', 'acf' ),
|
||||
'dashicons-vault' => esc_html__( 'Vault icon', 'acf' ),
|
||||
'dashicons-video-alt' => esc_html__( 'Video-alt icon', 'acf' ),
|
||||
'dashicons-video-alt2' => esc_html__( 'Video-alt2 icon', 'acf' ),
|
||||
'dashicons-video-alt3' => esc_html__( 'Video-alt3 icon', 'acf' ),
|
||||
'dashicons-visibility' => esc_html__( 'Visibility icon', 'acf' ),
|
||||
'dashicons-warning' => esc_html__( 'Warning icon', 'acf' ),
|
||||
'dashicons-welcome-add-page' => esc_html__( 'Welcome add-page icon', 'acf' ),
|
||||
'dashicons-welcome-comments' => esc_html__( 'Welcome comments icon', 'acf' ),
|
||||
'dashicons-welcome-learn-more' => esc_html__( 'Welcome learn-more icon', 'acf' ),
|
||||
'dashicons-welcome-view-site' => esc_html__( 'Welcome view-site icon', 'acf' ),
|
||||
'dashicons-welcome-widgets-menus' => esc_html__( 'Welcome widgets-menus icon', 'acf' ),
|
||||
'dashicons-welcome-write-blog' => esc_html__( 'Welcome write-blog icon', 'acf' ),
|
||||
'dashicons-wordpress' => esc_html__( 'Wordpress icon', 'acf' ),
|
||||
'dashicons-wordpress-alt' => esc_html__( 'Wordpress-alt icon', 'acf' ),
|
||||
'dashicons-yes' => esc_html__( 'Yes icon', 'acf' ),
|
||||
'dashicons-admin-appearance' => esc_html__( 'Appearance Icon', 'acf' ),
|
||||
'dashicons-admin-collapse' => esc_html__( 'Collapse Icon', 'acf' ),
|
||||
'dashicons-admin-comments' => esc_html__( 'Comments Icon', 'acf' ),
|
||||
'dashicons-admin-customizer' => esc_html__( 'Customizer Icon', 'acf' ),
|
||||
'dashicons-admin-generic' => esc_html__( 'Generic Icon', 'acf' ),
|
||||
'dashicons-admin-home' => esc_html__( 'Home Icon', 'acf' ),
|
||||
'dashicons-admin-links' => esc_html__( 'Links Icon', 'acf' ),
|
||||
'dashicons-admin-media' => esc_html__( 'Media Icon', 'acf' ),
|
||||
'dashicons-admin-multisite' => esc_html__( 'Multisite Icon', 'acf' ),
|
||||
'dashicons-admin-network' => esc_html__( 'Network Icon', 'acf' ),
|
||||
'dashicons-admin-page' => esc_html__( 'Page Icon', 'acf' ),
|
||||
'dashicons-admin-plugins' => esc_html__( 'Plugins Icon', 'acf' ),
|
||||
'dashicons-admin-post' => esc_html__( 'Post Icon', 'acf' ),
|
||||
'dashicons-admin-settings' => esc_html__( 'Settings Icon', 'acf' ),
|
||||
'dashicons-admin-site' => esc_html__( 'Site Icon', 'acf' ),
|
||||
'dashicons-admin-site-alt' => esc_html__( 'Site (alt) Icon', 'acf' ),
|
||||
'dashicons-admin-site-alt2' => esc_html__( 'Site (alt2) Icon', 'acf' ),
|
||||
'dashicons-admin-site-alt3' => esc_html__( 'Site (alt3) Icon', 'acf' ),
|
||||
'dashicons-admin-tools' => esc_html__( 'Tools Icon', 'acf' ),
|
||||
'dashicons-admin-users' => esc_html__( 'Users Icon', 'acf' ),
|
||||
'dashicons-airplane' => esc_html__( 'Airplane Icon', 'acf' ),
|
||||
'dashicons-album' => esc_html__( 'Album Icon', 'acf' ),
|
||||
'dashicons-align-center' => esc_html__( 'Align Center Icon', 'acf' ),
|
||||
'dashicons-align-full-width' => esc_html__( 'Align Full Width Icon', 'acf' ),
|
||||
'dashicons-align-left' => esc_html__( 'Align Left Icon', 'acf' ),
|
||||
'dashicons-align-none' => esc_html__( 'Align None Icon', 'acf' ),
|
||||
'dashicons-align-pull-left' => esc_html__( 'Align Pull Left Icon', 'acf' ),
|
||||
'dashicons-align-pull-right' => esc_html__( 'Align Pull Right Icon', 'acf' ),
|
||||
'dashicons-align-right' => esc_html__( 'Align Right Icon', 'acf' ),
|
||||
'dashicons-align-wide' => esc_html__( 'Align Wide Icon', 'acf' ),
|
||||
'dashicons-amazon' => esc_html__( 'Amazon Icon', 'acf' ),
|
||||
'dashicons-analytics' => esc_html__( 'Analytics Icon', 'acf' ),
|
||||
'dashicons-archive' => esc_html__( 'Archive Icon', 'acf' ),
|
||||
'dashicons-arrow-down' => esc_html__( 'Arrow Down Icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt' => esc_html__( 'Arrow Down (alt) Icon', 'acf' ),
|
||||
'dashicons-arrow-down-alt2' => esc_html__( 'Arrow Down (alt2) Icon', 'acf' ),
|
||||
'dashicons-arrow-left' => esc_html__( 'Arrow Left Icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt' => esc_html__( 'Arrow Left (alt) Icon', 'acf' ),
|
||||
'dashicons-arrow-left-alt2' => esc_html__( 'Arrow Left (alt2) Icon', 'acf' ),
|
||||
'dashicons-arrow-right' => esc_html__( 'Arrow Right Icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt' => esc_html__( 'Arrow Right (alt) Icon', 'acf' ),
|
||||
'dashicons-arrow-right-alt2' => esc_html__( 'Arrow Right (alt2) Icon', 'acf' ),
|
||||
'dashicons-arrow-up' => esc_html__( 'Arrow Up Icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt' => esc_html__( 'Arrow Up (alt) Icon', 'acf' ),
|
||||
'dashicons-arrow-up-alt2' => esc_html__( 'Arrow Up (alt2) Icon', 'acf' ),
|
||||
'dashicons-art' => esc_html__( 'Art Icon', 'acf' ),
|
||||
'dashicons-awards' => esc_html__( 'Awards Icon', 'acf' ),
|
||||
'dashicons-backup' => esc_html__( 'Backup Icon', 'acf' ),
|
||||
'dashicons-bank' => esc_html__( 'Bank Icon', 'acf' ),
|
||||
'dashicons-beer' => esc_html__( 'Beer Icon', 'acf' ),
|
||||
'dashicons-bell' => esc_html__( 'Bell Icon', 'acf' ),
|
||||
'dashicons-block-default' => esc_html__( 'Block Default Icon', 'acf' ),
|
||||
'dashicons-book' => esc_html__( 'Book Icon', 'acf' ),
|
||||
'dashicons-book-alt' => esc_html__( 'Book (alt) Icon', 'acf' ),
|
||||
'dashicons-buddicons-activity' => esc_html__( 'Activity Icon', 'acf' ),
|
||||
'dashicons-buddicons-bbpress-logo' => esc_html__( 'BbPress Icon', 'acf' ),
|
||||
'dashicons-buddicons-buddypress-logo' => esc_html__( 'BuddyPress Icon', 'acf' ),
|
||||
'dashicons-buddicons-community' => esc_html__( 'Community Icon', 'acf' ),
|
||||
'dashicons-buddicons-forums' => esc_html__( 'Forums Icon', 'acf' ),
|
||||
'dashicons-buddicons-friends' => esc_html__( 'Friends Icon', 'acf' ),
|
||||
'dashicons-buddicons-groups' => esc_html__( 'Groups Icon', 'acf' ),
|
||||
'dashicons-buddicons-pm' => esc_html__( 'Pm Icon', 'acf' ),
|
||||
'dashicons-buddicons-replies' => esc_html__( 'Replies Icon', 'acf' ),
|
||||
'dashicons-buddicons-topics' => esc_html__( 'Topics Icon', 'acf' ),
|
||||
'dashicons-buddicons-tracking' => esc_html__( 'Tracking Icon', 'acf' ),
|
||||
'dashicons-building' => esc_html__( 'Building Icon', 'acf' ),
|
||||
'dashicons-businessman' => esc_html__( 'Businessman Icon', 'acf' ),
|
||||
'dashicons-businessperson' => esc_html__( 'Businessperson Icon', 'acf' ),
|
||||
'dashicons-businesswoman' => esc_html__( 'Businesswoman Icon', 'acf' ),
|
||||
'dashicons-button' => esc_html__( 'Button Icon', 'acf' ),
|
||||
'dashicons-calculator' => esc_html__( 'Calculator Icon', 'acf' ),
|
||||
'dashicons-calendar' => esc_html__( 'Calendar Icon', 'acf' ),
|
||||
'dashicons-calendar-alt' => esc_html__( 'Calendar (alt) Icon', 'acf' ),
|
||||
'dashicons-camera' => esc_html__( 'Camera Icon', 'acf' ),
|
||||
'dashicons-camera-alt' => esc_html__( 'Camera (alt) Icon', 'acf' ),
|
||||
'dashicons-car' => esc_html__( 'Car Icon', 'acf' ),
|
||||
'dashicons-carrot' => esc_html__( 'Carrot Icon', 'acf' ),
|
||||
'dashicons-cart' => esc_html__( 'Cart Icon', 'acf' ),
|
||||
'dashicons-category' => esc_html__( 'Category Icon', 'acf' ),
|
||||
'dashicons-chart-area' => esc_html__( 'Chart Area Icon', 'acf' ),
|
||||
'dashicons-chart-bar' => esc_html__( 'Chart Bar Icon', 'acf' ),
|
||||
'dashicons-chart-line' => esc_html__( 'Chart Line Icon', 'acf' ),
|
||||
'dashicons-chart-pie' => esc_html__( 'Chart Pie Icon', 'acf' ),
|
||||
'dashicons-clipboard' => esc_html__( 'Clipboard Icon', 'acf' ),
|
||||
'dashicons-clock' => esc_html__( 'Clock Icon', 'acf' ),
|
||||
'dashicons-cloud' => esc_html__( 'Cloud Icon', 'acf' ),
|
||||
'dashicons-cloud-saved' => esc_html__( 'Cloud Saved Icon', 'acf' ),
|
||||
'dashicons-cloud-upload' => esc_html__( 'Cloud Upload Icon', 'acf' ),
|
||||
'dashicons-code-standards' => esc_html__( 'Code Standards Icon', 'acf' ),
|
||||
'dashicons-coffee' => esc_html__( 'Coffee Icon', 'acf' ),
|
||||
'dashicons-color-picker' => esc_html__( 'Color Picker Icon', 'acf' ),
|
||||
'dashicons-columns' => esc_html__( 'Columns Icon', 'acf' ),
|
||||
'dashicons-controls-back' => esc_html__( 'Back Icon', 'acf' ),
|
||||
'dashicons-controls-forward' => esc_html__( 'Forward Icon', 'acf' ),
|
||||
'dashicons-controls-pause' => esc_html__( 'Pause Icon', 'acf' ),
|
||||
'dashicons-controls-play' => esc_html__( 'Play Icon', 'acf' ),
|
||||
'dashicons-controls-repeat' => esc_html__( 'Repeat Icon', 'acf' ),
|
||||
'dashicons-controls-skipback' => esc_html__( 'Skip Back Icon', 'acf' ),
|
||||
'dashicons-controls-skipforward' => esc_html__( 'Skip Forward Icon', 'acf' ),
|
||||
'dashicons-controls-volumeoff' => esc_html__( 'Volume Off Icon', 'acf' ),
|
||||
'dashicons-controls-volumeon' => esc_html__( 'Volume On Icon', 'acf' ),
|
||||
'dashicons-cover-image' => esc_html__( 'Cover Image Icon', 'acf' ),
|
||||
'dashicons-dashboard' => esc_html__( 'Dashboard Icon', 'acf' ),
|
||||
'dashicons-database' => esc_html__( 'Database Icon', 'acf' ),
|
||||
'dashicons-database-add' => esc_html__( 'Database Add Icon', 'acf' ),
|
||||
'dashicons-database-export' => esc_html__( 'Database Export Icon', 'acf' ),
|
||||
'dashicons-database-import' => esc_html__( 'Database Import Icon', 'acf' ),
|
||||
'dashicons-database-remove' => esc_html__( 'Database Remove Icon', 'acf' ),
|
||||
'dashicons-database-view' => esc_html__( 'Database View Icon', 'acf' ),
|
||||
'dashicons-desktop' => esc_html__( 'Desktop Icon', 'acf' ),
|
||||
'dashicons-dismiss' => esc_html__( 'Dismiss Icon', 'acf' ),
|
||||
'dashicons-download' => esc_html__( 'Download Icon', 'acf' ),
|
||||
'dashicons-drumstick' => esc_html__( 'Drumstick Icon', 'acf' ),
|
||||
'dashicons-edit' => esc_html__( 'Edit Icon', 'acf' ),
|
||||
'dashicons-edit-large' => esc_html__( 'Edit Large Icon', 'acf' ),
|
||||
'dashicons-edit-page' => esc_html__( 'Edit Page Icon', 'acf' ),
|
||||
'dashicons-editor-aligncenter' => esc_html__( 'Align Center Icon', 'acf' ),
|
||||
'dashicons-editor-alignleft' => esc_html__( 'Align Left Icon', 'acf' ),
|
||||
'dashicons-editor-alignright' => esc_html__( 'Align Right Icon', 'acf' ),
|
||||
'dashicons-editor-bold' => esc_html__( 'Bold Icon', 'acf' ),
|
||||
'dashicons-editor-break' => esc_html__( 'Break Icon', 'acf' ),
|
||||
'dashicons-editor-code' => esc_html__( 'Code Icon', 'acf' ),
|
||||
'dashicons-editor-contract' => esc_html__( 'Contract Icon', 'acf' ),
|
||||
'dashicons-editor-customchar' => esc_html__( 'Custom Character Icon', 'acf' ),
|
||||
'dashicons-editor-expand' => esc_html__( 'Expand Icon', 'acf' ),
|
||||
'dashicons-editor-help' => esc_html__( 'Help Icon', 'acf' ),
|
||||
'dashicons-editor-indent' => esc_html__( 'Indent Icon', 'acf' ),
|
||||
'dashicons-editor-insertmore' => esc_html__( 'Insert More Icon', 'acf' ),
|
||||
'dashicons-editor-italic' => esc_html__( 'Italic Icon', 'acf' ),
|
||||
'dashicons-editor-justify' => esc_html__( 'Justify Icon', 'acf' ),
|
||||
'dashicons-editor-kitchensink' => esc_html__( 'Kitchen Sink Icon', 'acf' ),
|
||||
'dashicons-editor-ltr' => esc_html__( 'LTR Icon', 'acf' ),
|
||||
'dashicons-editor-ol' => esc_html__( 'Ordered List Icon', 'acf' ),
|
||||
'dashicons-editor-ol-rtl' => esc_html__( 'Ordered List RTL Icon', 'acf' ),
|
||||
'dashicons-editor-outdent' => esc_html__( 'Outdent Icon', 'acf' ),
|
||||
'dashicons-editor-paragraph' => esc_html__( 'Paragraph Icon', 'acf' ),
|
||||
'dashicons-editor-paste-text' => esc_html__( 'Paste Text Icon', 'acf' ),
|
||||
'dashicons-editor-paste-word' => esc_html__( 'Paste Word Icon', 'acf' ),
|
||||
'dashicons-editor-quote' => esc_html__( 'Quote Icon', 'acf' ),
|
||||
'dashicons-editor-removeformatting' => esc_html__( 'Remove Formatting Icon', 'acf' ),
|
||||
'dashicons-editor-rtl' => esc_html__( 'RTL Icon', 'acf' ),
|
||||
'dashicons-editor-spellcheck' => esc_html__( 'Spellcheck Icon', 'acf' ),
|
||||
'dashicons-editor-strikethrough' => esc_html__( 'Strikethrough Icon', 'acf' ),
|
||||
'dashicons-editor-table' => esc_html__( 'Table Icon', 'acf' ),
|
||||
'dashicons-editor-textcolor' => esc_html__( 'Text Color Icon', 'acf' ),
|
||||
'dashicons-editor-ul' => esc_html__( 'Unordered List Icon', 'acf' ),
|
||||
'dashicons-editor-underline' => esc_html__( 'Underline Icon', 'acf' ),
|
||||
'dashicons-editor-unlink' => esc_html__( 'Unlink Icon', 'acf' ),
|
||||
'dashicons-editor-video' => esc_html__( 'Video Icon', 'acf' ),
|
||||
'dashicons-ellipsis' => esc_html__( 'Ellipsis Icon', 'acf' ),
|
||||
'dashicons-email' => esc_html__( 'Email Icon', 'acf' ),
|
||||
'dashicons-email-alt' => esc_html__( 'Email (alt) Icon', 'acf' ),
|
||||
'dashicons-email-alt2' => esc_html__( 'Email (alt2) Icon', 'acf' ),
|
||||
'dashicons-embed-audio' => esc_html__( 'Embed Audio Icon', 'acf' ),
|
||||
'dashicons-embed-generic' => esc_html__( 'Embed Generic Icon', 'acf' ),
|
||||
'dashicons-embed-photo' => esc_html__( 'Embed Photo Icon', 'acf' ),
|
||||
'dashicons-embed-post' => esc_html__( 'Embed Post Icon', 'acf' ),
|
||||
'dashicons-embed-video' => esc_html__( 'Embed Video Icon', 'acf' ),
|
||||
'dashicons-excerpt-view' => esc_html__( 'Excerpt View Icon', 'acf' ),
|
||||
'dashicons-exit' => esc_html__( 'Exit Icon', 'acf' ),
|
||||
'dashicons-external' => esc_html__( 'External Icon', 'acf' ),
|
||||
'dashicons-facebook' => esc_html__( 'Facebook Icon', 'acf' ),
|
||||
'dashicons-facebook-alt' => esc_html__( 'Facebook (alt) Icon', 'acf' ),
|
||||
'dashicons-feedback' => esc_html__( 'Feedback Icon', 'acf' ),
|
||||
'dashicons-filter' => esc_html__( 'Filter Icon', 'acf' ),
|
||||
'dashicons-flag' => esc_html__( 'Flag Icon', 'acf' ),
|
||||
'dashicons-food' => esc_html__( 'Food Icon', 'acf' ),
|
||||
'dashicons-format-aside' => esc_html__( 'Aside Icon', 'acf' ),
|
||||
'dashicons-format-audio' => esc_html__( 'Audio Icon', 'acf' ),
|
||||
'dashicons-format-chat' => esc_html__( 'Chat Icon', 'acf' ),
|
||||
'dashicons-format-gallery' => esc_html__( 'Gallery Icon', 'acf' ),
|
||||
'dashicons-format-image' => esc_html__( 'Image Icon', 'acf' ),
|
||||
'dashicons-format-quote' => esc_html__( 'Quote Icon', 'acf' ),
|
||||
'dashicons-format-status' => esc_html__( 'Status Icon', 'acf' ),
|
||||
'dashicons-format-video' => esc_html__( 'Video Icon', 'acf' ),
|
||||
'dashicons-forms' => esc_html__( 'Forms Icon', 'acf' ),
|
||||
'dashicons-fullscreen-alt' => esc_html__( 'Fullscreen (alt) Icon', 'acf' ),
|
||||
'dashicons-fullscreen-exit-alt' => esc_html__( 'Fullscreen Exit (alt) Icon', 'acf' ),
|
||||
'dashicons-games' => esc_html__( 'Games Icon', 'acf' ),
|
||||
'dashicons-google' => esc_html__( 'Google Icon', 'acf' ),
|
||||
'dashicons-grid-view' => esc_html__( 'Grid View Icon', 'acf' ),
|
||||
'dashicons-groups' => esc_html__( 'Groups Icon', 'acf' ),
|
||||
'dashicons-hammer' => esc_html__( 'Hammer Icon', 'acf' ),
|
||||
'dashicons-heading' => esc_html__( 'Heading Icon', 'acf' ),
|
||||
'dashicons-heart' => esc_html__( 'Heart Icon', 'acf' ),
|
||||
'dashicons-hidden' => esc_html__( 'Hidden Icon', 'acf' ),
|
||||
'dashicons-hourglass' => esc_html__( 'Hourglass Icon', 'acf' ),
|
||||
'dashicons-html' => esc_html__( 'HTML Icon', 'acf' ),
|
||||
'dashicons-id' => esc_html__( 'Id Icon', 'acf' ),
|
||||
'dashicons-id-alt' => esc_html__( 'Id (alt) Icon', 'acf' ),
|
||||
'dashicons-image-crop' => esc_html__( 'Crop Icon', 'acf' ),
|
||||
'dashicons-image-filter' => esc_html__( 'Filter Icon', 'acf' ),
|
||||
'dashicons-image-flip-horizontal' => esc_html__( 'Flip Horizontal Icon', 'acf' ),
|
||||
'dashicons-image-flip-vertical' => esc_html__( 'Flip Vertical Icon', 'acf' ),
|
||||
'dashicons-image-rotate' => esc_html__( 'Rotate Icon', 'acf' ),
|
||||
'dashicons-image-rotate-left' => esc_html__( 'Rotate Left Icon', 'acf' ),
|
||||
'dashicons-image-rotate-right' => esc_html__( 'Rotate Right Icon', 'acf' ),
|
||||
'dashicons-images-alt' => esc_html__( 'Images (alt) Icon', 'acf' ),
|
||||
'dashicons-images-alt2' => esc_html__( 'Images (alt2) Icon', 'acf' ),
|
||||
'dashicons-index-card' => esc_html__( 'Index Card Icon', 'acf' ),
|
||||
'dashicons-info' => esc_html__( 'Info Icon', 'acf' ),
|
||||
'dashicons-info-outline' => esc_html__( 'Info Outline Icon', 'acf' ),
|
||||
'dashicons-insert' => esc_html__( 'Insert Icon', 'acf' ),
|
||||
'dashicons-insert-after' => esc_html__( 'Insert After Icon', 'acf' ),
|
||||
'dashicons-insert-before' => esc_html__( 'Insert Before Icon', 'acf' ),
|
||||
'dashicons-instagram' => esc_html__( 'Instagram Icon', 'acf' ),
|
||||
'dashicons-laptop' => esc_html__( 'Laptop Icon', 'acf' ),
|
||||
'dashicons-layout' => esc_html__( 'Layout Icon', 'acf' ),
|
||||
'dashicons-leftright' => esc_html__( 'Left Right Icon', 'acf' ),
|
||||
'dashicons-lightbulb' => esc_html__( 'Lightbulb Icon', 'acf' ),
|
||||
'dashicons-linkedin' => esc_html__( 'LinkedIn Icon', 'acf' ),
|
||||
'dashicons-list-view' => esc_html__( 'List View Icon', 'acf' ),
|
||||
'dashicons-location' => esc_html__( 'Location Icon', 'acf' ),
|
||||
'dashicons-location-alt' => esc_html__( 'Location (alt) Icon', 'acf' ),
|
||||
'dashicons-lock' => esc_html__( 'Lock Icon', 'acf' ),
|
||||
'dashicons-marker' => esc_html__( 'Marker Icon', 'acf' ),
|
||||
'dashicons-media-archive' => esc_html__( 'Archive Icon', 'acf' ),
|
||||
'dashicons-media-audio' => esc_html__( 'Audio Icon', 'acf' ),
|
||||
'dashicons-media-code' => esc_html__( 'Code Icon', 'acf' ),
|
||||
'dashicons-media-default' => esc_html__( 'Default Icon', 'acf' ),
|
||||
'dashicons-media-document' => esc_html__( 'Document Icon', 'acf' ),
|
||||
'dashicons-media-interactive' => esc_html__( 'Interactive Icon', 'acf' ),
|
||||
'dashicons-media-spreadsheet' => esc_html__( 'Spreadsheet Icon', 'acf' ),
|
||||
'dashicons-media-text' => esc_html__( 'Text Icon', 'acf' ),
|
||||
'dashicons-media-video' => esc_html__( 'Video Icon', 'acf' ),
|
||||
'dashicons-megaphone' => esc_html__( 'Megaphone Icon', 'acf' ),
|
||||
'dashicons-menu' => esc_html__( 'Menu Icon', 'acf' ),
|
||||
'dashicons-menu-alt' => esc_html__( 'Menu (alt) Icon', 'acf' ),
|
||||
'dashicons-menu-alt2' => esc_html__( 'Menu (alt2) Icon', 'acf' ),
|
||||
'dashicons-menu-alt3' => esc_html__( 'Menu (alt3) Icon', 'acf' ),
|
||||
'dashicons-microphone' => esc_html__( 'Microphone Icon', 'acf' ),
|
||||
'dashicons-migrate' => esc_html__( 'Migrate Icon', 'acf' ),
|
||||
'dashicons-minus' => esc_html__( 'Minus Icon', 'acf' ),
|
||||
'dashicons-money' => esc_html__( 'Money Icon', 'acf' ),
|
||||
'dashicons-money-alt' => esc_html__( 'Money (alt) Icon', 'acf' ),
|
||||
'dashicons-move' => esc_html__( 'Move Icon', 'acf' ),
|
||||
'dashicons-nametag' => esc_html__( 'Nametag Icon', 'acf' ),
|
||||
'dashicons-networking' => esc_html__( 'Networking Icon', 'acf' ),
|
||||
'dashicons-no' => esc_html__( 'No Icon', 'acf' ),
|
||||
'dashicons-no-alt' => esc_html__( 'No (alt) Icon', 'acf' ),
|
||||
'dashicons-open-folder' => esc_html__( 'Open Folder Icon', 'acf' ),
|
||||
'dashicons-palmtree' => esc_html__( 'Palm Tree Icon', 'acf' ),
|
||||
'dashicons-paperclip' => esc_html__( 'Paperclip Icon', 'acf' ),
|
||||
'dashicons-pdf' => esc_html__( 'PDF Icon', 'acf' ),
|
||||
'dashicons-performance' => esc_html__( 'Performance Icon', 'acf' ),
|
||||
'dashicons-pets' => esc_html__( 'Pets Icon', 'acf' ),
|
||||
'dashicons-phone' => esc_html__( 'Phone Icon', 'acf' ),
|
||||
'dashicons-pinterest' => esc_html__( 'Pinterest Icon', 'acf' ),
|
||||
'dashicons-playlist-audio' => esc_html__( 'Playlist Audio Icon', 'acf' ),
|
||||
'dashicons-playlist-video' => esc_html__( 'Playlist Video Icon', 'acf' ),
|
||||
'dashicons-plugins-checked' => esc_html__( 'Plugins Checked Icon', 'acf' ),
|
||||
'dashicons-plus' => esc_html__( 'Plus Icon', 'acf' ),
|
||||
'dashicons-plus-alt' => esc_html__( 'Plus (alt) Icon', 'acf' ),
|
||||
'dashicons-plus-alt2' => esc_html__( 'Plus (alt2) Icon', 'acf' ),
|
||||
'dashicons-podio' => esc_html__( 'Podio Icon', 'acf' ),
|
||||
'dashicons-portfolio' => esc_html__( 'Portfolio Icon', 'acf' ),
|
||||
'dashicons-post-status' => esc_html__( 'Post Status Icon', 'acf' ),
|
||||
'dashicons-pressthis' => esc_html__( 'Pressthis Icon', 'acf' ),
|
||||
'dashicons-printer' => esc_html__( 'Printer Icon', 'acf' ),
|
||||
'dashicons-privacy' => esc_html__( 'Privacy Icon', 'acf' ),
|
||||
'dashicons-products' => esc_html__( 'Products Icon', 'acf' ),
|
||||
'dashicons-randomize' => esc_html__( 'Randomize Icon', 'acf' ),
|
||||
'dashicons-reddit' => esc_html__( 'Reddit Icon', 'acf' ),
|
||||
'dashicons-redo' => esc_html__( 'Redo Icon', 'acf' ),
|
||||
'dashicons-remove' => esc_html__( 'Remove Icon', 'acf' ),
|
||||
'dashicons-rest-api' => esc_html__( 'REST API Icon', 'acf' ),
|
||||
'dashicons-rss' => esc_html__( 'RSS Icon', 'acf' ),
|
||||
'dashicons-saved' => esc_html__( 'Saved Icon', 'acf' ),
|
||||
'dashicons-schedule' => esc_html__( 'Schedule Icon', 'acf' ),
|
||||
'dashicons-screenoptions' => esc_html__( 'Screen Options Icon', 'acf' ),
|
||||
'dashicons-search' => esc_html__( 'Search Icon', 'acf' ),
|
||||
'dashicons-share' => esc_html__( 'Share Icon', 'acf' ),
|
||||
'dashicons-share-alt' => esc_html__( 'Share (alt) Icon', 'acf' ),
|
||||
'dashicons-share-alt2' => esc_html__( 'Share (alt2) Icon', 'acf' ),
|
||||
'dashicons-shield' => esc_html__( 'Shield Icon', 'acf' ),
|
||||
'dashicons-shield-alt' => esc_html__( 'Shield (alt) Icon', 'acf' ),
|
||||
'dashicons-shortcode' => esc_html__( 'Shortcode Icon', 'acf' ),
|
||||
'dashicons-slides' => esc_html__( 'Slides Icon', 'acf' ),
|
||||
'dashicons-smartphone' => esc_html__( 'Smartphone Icon', 'acf' ),
|
||||
'dashicons-smiley' => esc_html__( 'Smiley Icon', 'acf' ),
|
||||
'dashicons-sort' => esc_html__( 'Sort Icon', 'acf' ),
|
||||
'dashicons-sos' => esc_html__( 'Sos Icon', 'acf' ),
|
||||
'dashicons-spotify' => esc_html__( 'Spotify Icon', 'acf' ),
|
||||
'dashicons-star-empty' => esc_html__( 'Star Empty Icon', 'acf' ),
|
||||
'dashicons-star-filled' => esc_html__( 'Star Filled Icon', 'acf' ),
|
||||
'dashicons-star-half' => esc_html__( 'Star Half Icon', 'acf' ),
|
||||
'dashicons-sticky' => esc_html__( 'Sticky Icon', 'acf' ),
|
||||
'dashicons-store' => esc_html__( 'Store Icon', 'acf' ),
|
||||
'dashicons-superhero' => esc_html__( 'Superhero Icon', 'acf' ),
|
||||
'dashicons-superhero-alt' => esc_html__( 'Superhero (alt) Icon', 'acf' ),
|
||||
'dashicons-table-col-after' => esc_html__( 'Table Col After Icon', 'acf' ),
|
||||
'dashicons-table-col-before' => esc_html__( 'Table Col Before Icon', 'acf' ),
|
||||
'dashicons-table-col-delete' => esc_html__( 'Table Col Delete Icon', 'acf' ),
|
||||
'dashicons-table-row-after' => esc_html__( 'Table Row After Icon', 'acf' ),
|
||||
'dashicons-table-row-before' => esc_html__( 'Table Row Before Icon', 'acf' ),
|
||||
'dashicons-table-row-delete' => esc_html__( 'Table Row Delete Icon', 'acf' ),
|
||||
'dashicons-tablet' => esc_html__( 'Tablet Icon', 'acf' ),
|
||||
'dashicons-tag' => esc_html__( 'Tag Icon', 'acf' ),
|
||||
'dashicons-tagcloud' => esc_html__( 'Tagcloud Icon', 'acf' ),
|
||||
'dashicons-testimonial' => esc_html__( 'Testimonial Icon', 'acf' ),
|
||||
'dashicons-text' => esc_html__( 'Text Icon', 'acf' ),
|
||||
'dashicons-text-page' => esc_html__( 'Text Page Icon', 'acf' ),
|
||||
'dashicons-thumbs-down' => esc_html__( 'Thumbs Down Icon', 'acf' ),
|
||||
'dashicons-thumbs-up' => esc_html__( 'Thumbs Up Icon', 'acf' ),
|
||||
'dashicons-tickets' => esc_html__( 'Tickets Icon', 'acf' ),
|
||||
'dashicons-tickets-alt' => esc_html__( 'Tickets (alt) Icon', 'acf' ),
|
||||
'dashicons-tide' => esc_html__( 'Tide Icon', 'acf' ),
|
||||
'dashicons-translation' => esc_html__( 'Translation Icon', 'acf' ),
|
||||
'dashicons-trash' => esc_html__( 'Trash Icon', 'acf' ),
|
||||
'dashicons-twitch' => esc_html__( 'Twitch Icon', 'acf' ),
|
||||
'dashicons-twitter' => esc_html__( 'Twitter Icon', 'acf' ),
|
||||
'dashicons-twitter-alt' => esc_html__( 'Twitter (alt) Icon', 'acf' ),
|
||||
'dashicons-undo' => esc_html__( 'Undo Icon', 'acf' ),
|
||||
'dashicons-universal-access' => esc_html__( 'Universal Access Icon', 'acf' ),
|
||||
'dashicons-universal-access-alt' => esc_html__( 'Universal Access (alt) Icon', 'acf' ),
|
||||
'dashicons-unlock' => esc_html__( 'Unlock Icon', 'acf' ),
|
||||
'dashicons-update' => esc_html__( 'Update Icon', 'acf' ),
|
||||
'dashicons-update-alt' => esc_html__( 'Update (alt) Icon', 'acf' ),
|
||||
'dashicons-upload' => esc_html__( 'Upload Icon', 'acf' ),
|
||||
'dashicons-vault' => esc_html__( 'Vault Icon', 'acf' ),
|
||||
'dashicons-video-alt' => esc_html__( 'Video (alt) Icon', 'acf' ),
|
||||
'dashicons-video-alt2' => esc_html__( 'Video (alt2) Icon', 'acf' ),
|
||||
'dashicons-video-alt3' => esc_html__( 'Video (alt3) Icon', 'acf' ),
|
||||
'dashicons-visibility' => esc_html__( 'Visibility Icon', 'acf' ),
|
||||
'dashicons-warning' => esc_html__( 'Warning Icon', 'acf' ),
|
||||
'dashicons-welcome-add-page' => esc_html__( 'Add Page Icon', 'acf' ),
|
||||
'dashicons-welcome-comments' => esc_html__( 'Comments Icon', 'acf' ),
|
||||
'dashicons-welcome-learn-more' => esc_html__( 'Learn More Icon', 'acf' ),
|
||||
'dashicons-welcome-view-site' => esc_html__( 'View Site Icon', 'acf' ),
|
||||
'dashicons-welcome-widgets-menus' => esc_html__( 'Widgets Menus Icon', 'acf' ),
|
||||
'dashicons-welcome-write-blog' => esc_html__( 'Write Blog Icon', 'acf' ),
|
||||
'dashicons-whatsapp' => esc_html__( 'WhatsApp Icon', 'acf' ),
|
||||
'dashicons-wordpress' => esc_html__( 'WordPress Icon', 'acf' ),
|
||||
'dashicons-wordpress-alt' => esc_html__( 'WordPress (alt) Icon', 'acf' ),
|
||||
'dashicons-xing' => esc_html__( 'Xing Icon', 'acf' ),
|
||||
'dashicons-yes' => esc_html__( 'Yes Icon', 'acf' ),
|
||||
'dashicons-yes-alt' => esc_html__( 'Yes (alt) Icon', 'acf' ),
|
||||
'dashicons-youtube' => esc_html__( 'YouTube Icon', 'acf' ),
|
||||
);
|
||||
|
||||
return apply_filters( 'acf/fields/icon_picker/dashicons', $dashicons );
|
||||
|
||||
@@ -96,30 +96,27 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
* Returns AJAX results for the oEmbed field.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @return void
|
||||
*/
|
||||
function ajax_query() {
|
||||
public function ajax_query() {
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'nonce' => '',
|
||||
'field_key' => '',
|
||||
)
|
||||
);
|
||||
|
||||
// validate
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
if ( ! acf_verify_ajax( $args['nonce'], $args['field_key'] ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// get choices
|
||||
$response = $this->get_ajax_query( $_POST );
|
||||
|
||||
// return
|
||||
wp_send_json( $response );
|
||||
wp_send_json( $this->get_ajax_query( $_POST ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
@@ -162,25 +159,19 @@ if ( ! class_exists( 'acf_field_oembed' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* render_field()
|
||||
* Renders the oEmbed field.
|
||||
*
|
||||
* Create the HTML interface for your field
|
||||
* @since 3.6
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @param array $field The field settings array.
|
||||
* @return void
|
||||
*/
|
||||
function render_field( $field ) {
|
||||
|
||||
// atts
|
||||
public function render_field( $field ) {
|
||||
$atts = array(
|
||||
'class' => 'acf-oembed',
|
||||
'class' => 'acf-oembed',
|
||||
'data-nonce' => wp_create_nonce( $field['key'] ),
|
||||
);
|
||||
|
||||
// <strong><?php _e("Error.", 'acf'); </strong> _e("No embed found for the given URL.", 'acf');
|
||||
// value
|
||||
if ( $field['value'] ) {
|
||||
$atts['class'] .= ' has-value';
|
||||
}
|
||||
|
||||
@@ -2,20 +2,18 @@
|
||||
|
||||
if ( ! class_exists( 'acf_field_output' ) ) :
|
||||
|
||||
/**
|
||||
* This class and field type has been deprecated since ACF 6.3.2 and will not output anything.
|
||||
*/
|
||||
class acf_field_output extends acf_field {
|
||||
|
||||
|
||||
/**
|
||||
* This function will setup the field type data
|
||||
*
|
||||
* @type function
|
||||
* @date 5/03/2014
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param n/a
|
||||
* @return n/a
|
||||
*/
|
||||
function initialize() {
|
||||
public function initialize() {
|
||||
|
||||
// vars
|
||||
$this->name = 'output';
|
||||
@@ -28,32 +26,16 @@ if ( ! class_exists( 'acf_field_output' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
* The render field call. Deprecated since ACF 6.3.2.
|
||||
*
|
||||
* @param $field (array) the $field being rendered
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
*
|
||||
* @param $field (array) the $field being edited
|
||||
* @return n/a
|
||||
* @param array $field The $field being edited
|
||||
* @return false
|
||||
*/
|
||||
function render_field( $field ) {
|
||||
public function render_field( $field ) {
|
||||
|
||||
// bail early if no html
|
||||
if ( ! $field['html'] ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// html
|
||||
if ( is_string( $field['html'] ) && ! function_exists( $field['html'] ) ) {
|
||||
echo acf_esc_html( $field['html'] );
|
||||
|
||||
// function
|
||||
} else {
|
||||
call_user_func_array( $field['html'], array( $field ) );
|
||||
}
|
||||
// Deprecated since 6.3.2 and will be removed in a future release.
|
||||
_deprecated_function( __FUNCTION__, '6.3.2' );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,19 +60,28 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
}
|
||||
|
||||
/**
|
||||
* description
|
||||
* Returns AJAX results for the Page Link field.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @return void
|
||||
*/
|
||||
function ajax_query() {
|
||||
public function ajax_query() {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
$conditional_logic = (bool) acf_request_arg( 'conditional_logic', false );
|
||||
|
||||
// validate
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
if ( $conditional_logic ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Use the standard ACF admin nonce.
|
||||
$nonce = '';
|
||||
$key = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
@@ -370,21 +379,20 @@ if ( ! class_exists( 'acf_field_page_link' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
* Renders the Page Link field.
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
* @since 3.6
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @param array $field The field settings array.
|
||||
* @return void
|
||||
*/
|
||||
function render_field( $field ) {
|
||||
|
||||
public function render_field( $field ) {
|
||||
// Change Field into a select
|
||||
$field['type'] = 'select';
|
||||
$field['ui'] = 1;
|
||||
$field['ajax'] = 1;
|
||||
$field['choices'] = array();
|
||||
$field['nonce'] = wp_create_nonce( $field['key'] );
|
||||
|
||||
// populate choices if value exists
|
||||
if ( ! empty( $field['value'] ) ) {
|
||||
|
||||
@@ -58,30 +58,40 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
* AJAX query handler for post object fields.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function ajax_query() {
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
$conditional_logic = (bool) acf_request_arg( 'conditional_logic', false );
|
||||
|
||||
if ( $conditional_logic ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Use the standard ACF admin nonce.
|
||||
$nonce = '';
|
||||
$key = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// get choices
|
||||
$response = $this->get_ajax_query( $_POST );
|
||||
|
||||
// return
|
||||
acf_send_ajax_results( $response );
|
||||
acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
* @since 5.0.9
|
||||
* @since 5.0.9
|
||||
*
|
||||
* @param array $options The options being queried for the ajax request.
|
||||
* @return array The AJAX response array.
|
||||
* @param array $options The options being queried for the ajax request.
|
||||
* @return array|boolean The AJAX response array, or false on failure.
|
||||
*/
|
||||
public function get_ajax_query( $options = array() ) {
|
||||
|
||||
// defaults
|
||||
$options = acf_parse_args(
|
||||
$options,
|
||||
@@ -223,7 +233,6 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array containing id, text and maybe description data
|
||||
*
|
||||
@@ -298,13 +307,14 @@ if ( ! class_exists( 'acf_field_post_object' ) ) :
|
||||
* @since 3.6
|
||||
*
|
||||
* @param array $field An array holding all the field's data.
|
||||
* @return void
|
||||
*/
|
||||
public function render_field( $field ) {
|
||||
|
||||
// Change Field into a select
|
||||
$field['type'] = 'select';
|
||||
$field['ui'] = 1;
|
||||
$field['ajax'] = 1;
|
||||
$field['nonce'] = wp_create_nonce( $field['key'] );
|
||||
$field['choices'] = array();
|
||||
|
||||
// load posts
|
||||
|
||||
@@ -80,44 +80,44 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* description
|
||||
* Returns AJAX results for the Relationship field.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @return void
|
||||
*/
|
||||
function ajax_query() {
|
||||
public function ajax_query() {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
$conditional_logic = (bool) acf_request_arg( 'conditional_logic', false );
|
||||
|
||||
// validate
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
if ( $conditional_logic ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Use the standard ACF admin nonce.
|
||||
$nonce = '';
|
||||
$key = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// get choices
|
||||
$response = $this->get_ajax_query( $_POST );
|
||||
|
||||
// return
|
||||
acf_send_ajax_results( $response );
|
||||
acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
* @type function
|
||||
* @date 15/10/2014
|
||||
* @since 5.0.9
|
||||
*
|
||||
* @param $options (array)
|
||||
* @return (array)
|
||||
* @param array $options An array of options for the query.
|
||||
* @return array
|
||||
*/
|
||||
function get_ajax_query( $options = array() ) {
|
||||
|
||||
public function get_ajax_query( $options = array() ) {
|
||||
// defaults
|
||||
$options = wp_parse_args(
|
||||
$options,
|
||||
@@ -273,7 +273,6 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array containing id, text and maybe description data
|
||||
*
|
||||
@@ -418,6 +417,7 @@ if ( ! class_exists( 'acf_field_relationship' ) ) :
|
||||
'data-paged' => 1,
|
||||
'data-post_type' => '',
|
||||
'data-taxonomy' => '',
|
||||
'data-nonce' => wp_create_nonce( $field['key'] ),
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -112,32 +112,30 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* description
|
||||
* AJAX handler for getting Select field choices.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @return void
|
||||
*/
|
||||
function ajax_query() {
|
||||
public function ajax_query() {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
|
||||
// validate
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
// Back-compat for field settings.
|
||||
if ( ! acf_is_field_key( $key ) ) {
|
||||
$nonce = '';
|
||||
$key = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// get choices
|
||||
$response = $this->get_ajax_query( $_POST );
|
||||
|
||||
// return
|
||||
acf_send_ajax_results( $response );
|
||||
acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
@@ -292,7 +290,12 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
if ( ! empty( $field['ajax_action'] ) ) {
|
||||
$select['data-ajax_action'] = $field['ajax_action'];
|
||||
}
|
||||
|
||||
if ( ! empty( $field['nonce'] ) ) {
|
||||
$select['data-nonce'] = $field['nonce'];
|
||||
}
|
||||
if ( $field['ajax'] && empty( $field['nonce'] ) && acf_is_field_key( $field['key'] ) ) {
|
||||
$select['data-nonce'] = wp_create_nonce( $field['key'] );
|
||||
}
|
||||
if ( ! empty( $field['hide_search'] ) ) {
|
||||
$select['data-minimum-results-for-search'] = '-1';
|
||||
}
|
||||
@@ -307,10 +310,6 @@ if ( ! class_exists( 'acf_field_select' ) ) :
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $field['query_nonce'] ) ) {
|
||||
$select['data-query-nonce'] = $field['query_nonce'];
|
||||
}
|
||||
|
||||
// append
|
||||
$select['value'] = $value;
|
||||
$select['choices'] = $choices;
|
||||
|
||||
@@ -48,32 +48,35 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
add_action( 'acf/save_post', array( $this, 'save_post' ), 15, 1 );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* description
|
||||
* Returns AJAX results for the Taxonomy field.
|
||||
*
|
||||
* @type function
|
||||
* @date 24/10/13
|
||||
* @since 5.0.0
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param $post_id (int)
|
||||
* @return $post_id (int)
|
||||
* @return void
|
||||
*/
|
||||
function ajax_query() {
|
||||
public function ajax_query() {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
$conditional_logic = (bool) acf_request_arg( 'conditional_logic', false );
|
||||
|
||||
// validate
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
if ( $conditional_logic ) {
|
||||
if ( ! acf_current_user_can_admin() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Use the standard ACF admin nonce.
|
||||
$nonce = '';
|
||||
$key = '';
|
||||
}
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// get choices
|
||||
$response = $this->get_ajax_query( $_POST );
|
||||
|
||||
// return
|
||||
acf_send_ajax_results( $response );
|
||||
acf_send_ajax_results( $this->get_ajax_query( $_POST ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This function will return an array of data formatted for use in a select2 AJAX response
|
||||
*
|
||||
@@ -455,18 +458,15 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
* Renders the Taxonomy field.
|
||||
*
|
||||
* @type action
|
||||
* @since 3.6
|
||||
* @date 23/01/13
|
||||
* @since 3.6
|
||||
*
|
||||
* @param $field - an array holding all the field's data
|
||||
* @param array $field The field settings array.
|
||||
* @return void
|
||||
*/
|
||||
function render_field( $field ) {
|
||||
|
||||
public function render_field( $field ) {
|
||||
// force value to array
|
||||
$field['value'] = acf_get_array( $field['value'] );
|
||||
|
||||
@@ -477,6 +477,7 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
'data-ftype' => $field['field_type'],
|
||||
'data-taxonomy' => $field['taxonomy'],
|
||||
'data-allow_null' => $field['allow_null'],
|
||||
'data-nonce' => wp_create_nonce( $field['key'] ),
|
||||
);
|
||||
// get taxonomy
|
||||
$taxonomy = get_taxonomy( $field['taxonomy'] );
|
||||
@@ -514,7 +515,6 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create the HTML interface for your field
|
||||
*
|
||||
@@ -750,25 +750,14 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
|
||||
|
||||
/**
|
||||
* ajax_add_term
|
||||
* AJAX handler for adding Taxonomy field terms.
|
||||
*
|
||||
* @since 5.2.3
|
||||
*
|
||||
* @type function
|
||||
* @date 17/04/2015
|
||||
* @since 5.2.3
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function ajax_add_term() {
|
||||
|
||||
// verify nonce
|
||||
if ( ! acf_verify_ajax() ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// vars
|
||||
$args = wp_parse_args(
|
||||
$_POST,
|
||||
public function ajax_add_term() {
|
||||
$args = acf_request_args(
|
||||
array(
|
||||
'nonce' => '',
|
||||
'field_key' => '',
|
||||
@@ -777,6 +766,10 @@ if ( ! class_exists( 'acf_field_taxonomy' ) ) :
|
||||
)
|
||||
);
|
||||
|
||||
if ( ! acf_verify_ajax( $args['nonce'], $args['field_key'] ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// load field
|
||||
$field = acf_get_field( $args['field_key'] );
|
||||
if ( ! $field ) {
|
||||
|
||||
@@ -153,20 +153,18 @@ if ( ! class_exists( 'ACF_Field_User' ) ) :
|
||||
/**
|
||||
* Renders the field input HTML.
|
||||
*
|
||||
* @date 23/01/13
|
||||
* @since 3.6.0
|
||||
*
|
||||
* @param array $field The ACF field.
|
||||
* @return void
|
||||
*/
|
||||
function render_field( $field ) {
|
||||
|
||||
public function render_field( $field ) {
|
||||
// Change Field into a select.
|
||||
$field['type'] = 'select';
|
||||
$field['ui'] = 1;
|
||||
$field['ajax'] = 1;
|
||||
$field['choices'] = array();
|
||||
$field['query_nonce'] = wp_create_nonce( 'acf/fields/user/query' . $field['key'] );
|
||||
$field['type'] = 'select';
|
||||
$field['ui'] = 1;
|
||||
$field['ajax'] = 1;
|
||||
$field['choices'] = array();
|
||||
$field['nonce'] = wp_create_nonce( $field['key'] );
|
||||
|
||||
// Populate choices.
|
||||
if ( $field['value'] ) {
|
||||
@@ -403,7 +401,10 @@ if ( ! class_exists( 'ACF_Field_User' ) ) :
|
||||
}
|
||||
|
||||
// Verify that this is a legitimate request using a separate nonce from the main AJAX nonce.
|
||||
if ( ! isset( $_REQUEST['user_query_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_REQUEST['user_query_nonce'] ), 'acf/fields/user/query' . $query->field['key'] ) ) {
|
||||
$nonce = acf_request_arg( 'nonce', '' );
|
||||
$key = acf_request_arg( 'field_key', '' );
|
||||
|
||||
if ( ! acf_verify_ajax( $nonce, $key ) ) {
|
||||
$query->send( new WP_Error( 'acf_invalid_request', __( 'Invalid request.', 'acf' ), array( 'status' => 404 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// There are many ways to WordPress.
|
||||
Reference in New Issue
Block a user