• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Genesis Theme Framework a2z

Genesis Theme Framework a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Parsed Source / Parsed: 49306
function genesis_inpost_seo_save( $post_id, $post ) {

  // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Filtered Later
  if ( ! isset( $_POST['genesis_seo'] ) ) {
    return;
  }

  // Merge user submitted options with fallback defaults.
  $data = wp_parse_args(
    // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Filtered Later
    $_POST['genesis_seo'],
    [
      '_genesis_title'         => '',
      '_genesis_description'   => '',
      '_genesis_keywords'      => '',
      '_genesis_canonical_uri' => '',
      'redirect'               => '',
      '_genesis_noindex'       => 0,
      '_genesis_nofollow'      => 0,
      '_genesis_noarchive'     => 0,
    ]
  );

  // Sanitize the title, description, and tags.
  foreach ( $data as $key => $value ) {
    if ( in_array( $key, [ '_genesis_title', '_genesis_description', '_genesis_keywords' ], true ) ) {
      $data[ $key ] = wp_strip_all_tags( $value );
    }
  }

  genesis_save_custom_fields( $data, 'genesis_inpost_seo_save', 'genesis_inpost_seo_nonce', $post );

}
 

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Source ref: genesis_inpost_seo_save() – Save the SEO settings when we save a post or page.
Parse count / Source file date: 1569839049
MD5 hash: 022f066adc07a1f3c10cf5c570426c10

Footer

Genesis a2z
Genesis Theme Framework a2z
WordPress Dynamic API Reference
WordPress 5.9.3
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  genesis.wp-a2z.org
© Copyright Genesis a2z 2014-2022. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites