rt'] ) && $yoast_mapping['twitter_import'] && $aioseo_indexable['twitter_use_og'] ) {
$aioseo_indexable['twitter_title'] = $aioseo_indexable['og_title'];
$aioseo_indexable['twitter_description'] = $aioseo_indexable['og_description'];
}
if ( ! empty( $aioseo_indexable[ $aioseo_key ] ) ) {
$indexable->{$yoast_mapping['yoast_name']} = $this->transform_import_data( $yoast_mapping['transform_method'], $aioseo_indexable, $aioseo_key, $yoast_mapping, $indexable );
}
}
return $indexable;
}
/**
* Transforms the data to be imported.
*
* @param string $transform_method The method that is going to be used for transforming the data.
* @param array $aioseo_indexable The data of the AIOSEO indexable data that is being imported.
* @param string $aioseo_key The name of the specific set of data that is going to be transformed.
* @param array $yoast_mapping Extra details for the import of the specific data that is going to be transformed.
* @param Indexable $indexable The Yoast indexable that we are going to import the transformed data into.
*
* @return string|bool|null The transformed data to be imported.
*/
protected function transform_import_data( $transform_method, $aioseo_indexable, $aioseo_key, $yoast_mapping, $indexable ) {
return \call_user_func( [ $this, $transform_method ], $aioseo_indexable, $aioseo_key, $yoast_mapping, $indexable );
}
/**
* Returns the number of objects that will be imported in a single importing pass.
*
* @return int The limit.
*/
public function get_limit() {
/**
* Filter 'wpseo_aioseo_post_indexation_limit' - Allow filtering the number of posts indexed during each indexing pass.
*
* @param int $max_posts The maximum number of posts indexed.
*/
$limit = \apply_filters( 'wpseo_aioseo_post_indexation_limit', 25 );
if ( ! \is_int( $limit ) || $limit < 1 ) {
$limit = 25;
}
return $limit;
}
/**
* Populates the needed data array based on which columns we use from the AIOSEO indexable table.
*
* @return array The needed data array that contains all the needed columns.
*/
public function get_needed_data() {
$needed_data = \array_keys( $this->aioseo_to_yoast_map );
\array_push( $needed_data, 'id', 'post_id', 'robots_default', 'og_image_custom_url', 'og_image_type', 'twitter_image_custom_url', 'twitter_image_type', 'twitter_use_og' );
return $needed_data;
}
/**
* Populates the needed robot data array to be used in validating against its structure.
*
* @return array The needed data array that contains all the needed columns.
*/
public function get_needed_robot_data() {
$needed_robot_data = [];
foreach ( $this->aioseo_to_yoast_map as $yoast_mapping ) {
if ( isset( $yoast_mapping['robot_type'] ) ) {
$needed_robot_data[] = $yoast_mapping['robot_type'];
}
}
return $needed_robot_data;
}
/**
* Creates a query for gathering AiOSEO data from the database.
*
* @param int $limit The maximum number of unimported objects to be returned.
* @param bool $just_detect Whether we want to just detect if there are unimported objects. If false, we want to actually import them too.
*
* @return string The query to use for importing or counting the number of items to import.
*/
public function query( $limit = false, $just_detect = false ) {
$table = $this->aioseo_helper->get_table();
$select_statement = 'id';
if ( ! $just_detect ) {
// If we want to import too, we need the actual needed data from AIOSEO indexables.
$needed_data = $this->get_needed_data();
$select_statement = \implode( ', ', $needed_data );
}
$cursor_id = $this->get_cursor_id();
$cursor = $this->import_cursor->get_cursor( $cursor_id );
/**
* Filter 'wpseo_aioseo_post_cursor' - Allow filtering the value of the aioseo post import cursor.
*
* @param int $import_cursor The value of the aioseo post import cursor.
*/
$cursor = \apply_filters( 'wpseo_aioseo_post_import_cursor', $cursor );
$replacements = [ $cursor ];
$limit_statement = '';
if ( ! empty( $limit ) ) {
$replacements[] = $limit;
$limit_statement = ' LIMIT %d';
}
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Reason: There is no unescaped user input.
return $this->wpdb->prepare(
"SELECT {$select_statement} FROM {$table} WHERE id > %d ORDER BY id{$limit_statement}",
$replacements
);
// phpcs:enable WordPress.DB.PreparedSQL.InterpolatedNotPrepared
}
/**
* Minimally transforms data to be imported.
*
* @param array $aioseo_data All of the AIOSEO data to be imported.
* @param string $aioseo_key The AIOSEO key that contains the setting we're working with.
*
* @return string The transformed meta data.
*/
public function simple_import_post( $aioseo_data, $aioseo_key ) {
return $this->simple_import( $aioseo_data[ $aioseo_key ] );
}
/**
* Transforms URL to be imported.
*
* @param array $aioseo_data All of the AIOSEO data to be imported.
* @param string $aioseo_key The AIOSEO key that contains the setting we're working with.
*
* @return string The transformed URL.
*/
public function url_import_post( $aioseo_data, $aioseo_key ) {
return $this->url_import( $aioseo_data[ $aioseo_key ] );
}
/**
* Plucks the keyphrase to be imported from the AIOSEO array of keyphrase meta data.
*
* @param array $aioseo_data All of the AIOSEO data to be imported.
* @param string $aioseo_key The AIOSEO key that contains the setting we're working with, aka keyphrases.
*
* @return string|null The plucked keyphrase.
*/
public function keyphrase_import( $aioseo_data, $aioseo_key ) {
$meta_data = \json_decode( $aioseo_data[ $aioseo_key ], true );
if ( ! isset( $meta_data['focus']['keyphrase'] ) ) {
return null;
}
return $this->sanitization->sanitize_text_field( $meta_data['focus']['keyphrase'] );
}
/**
* Imports the post's noindex setting.
*
* @param bool $aioseo_robots_settings AIOSEO's set of robot settings for the post.
*
* @return bool|null The value of Yoast's noindex setting for the post.
*/
public function post_robots_noindex_import( $aioseo_robots_settings ) {
// If robot settings defer to default settings, we have null in the is_robots_noindex field.
if ( $aioseo_robots_settings['robots_default'] ) {
return null;
}
return $aioseo_robots_settings['robots_noindex'];
}
/**
* Imports the post's robots setting.
*
* @param bool $aioseo_robots_settings AIOSEO's set of robot settings for the post.
* @param string $aioseo_key The AIOSEO key that contains the robot setting we're working with.
* @param array $mapping The mapping of the setting we're working with.
*
* @return bool|null The value of Yoast's noindex setting for the post.
*/
public function post_general_robots_import( $aioseo_robots_settings, $aioseo_key, $mapping ) {
$mapping = $this->enhance_mapping( $mapping );
if ( $aioseo_robots_settings['robots_default'] ) {
// Let's first get the subtype's setting value and then transform it taking into consideration whether it defers to global defaults.
$subtype_setting = $this->robots_provider->get_subtype_robot_setting( $mapping );
return $this->robots_transformer->transform_robot_setting( $mapping['robot_type'], $subtype_setting, $mapping );
}
return $aioseo_robots_settings[ $aioseo_key ];
}
/**
* Enhances the mapping of the setting we're working with, with type and the option name, so that we can retrieve the settings for the object we're working with.
*
* @param array $mapping The mapping of the setting we're working with.
*
* @return array The enhanced mapping.
*/
public function enhance_mapping( $mapping = [] ) {
$mapping['type'] = 'postTypes';
$mapping['option_name'] = 'aioseo_options_dynamic';
return $mapping;
}
/**
* Imports the og and twitter image url.
*
* @param bool $aioseo_social_image_settings AIOSEO's set of social image settings for the post.
* @param string $aioseo_key The AIOSEO key that contains the robot setting we're working with.
* @param array $mapping The mapping of the setting we're working with.
* @param Indexable $indexable The Yoast indexable we're importing into.
*
* @return bool|null The url of the social image we're importing, null if there's none.
*/
public function social_image_url_import( $aioseo_social_image_settings, $aioseo_key, $mapping, $indexable ) {
if ( $mapping['social_setting_prefix_aioseo'] === 'twitter_' && $aioseo_social_image_settings['twitter_use_og'] ) {
$mapping['social_setting_prefix_aioseo'] = 'og_';
}
$social_setting = \rtrim( $mapping['social_setting_prefix_aioseo'], '_' );
$image_type = $aioseo_social_image_settings[ $mapping['social_setting_prefix_aioseo'] . 'image_type' ];
if ( $image_type === 'default' ) {
$image_type = $this->social_images_provider->get_default_social_image_source( $social_setting );
}
switch ( $image_type ) {
case 'attach':
$image_url = $this->social_images_provider->get_first_attached_image( $indexable->object_id );
break;
case 'auto':
if ( $this->social_images_provider->get_featured_image( $indexable->object_id ) ) {
// If there's a featured image, lets not import it, as our indexable calculation has already set that as active social image. That way we achieve dynamicality.
return null;
}
$image_url = $this->social_images_provider->get_auto_image( $indexable->object_id );
break;
case 'content':
$image_url = $this->social_images_provider->get_first_image_in_content( $indexable->object_id );
break;
case 'custom_image':
$image_url = $aioseo_social_image_settings[ $mapping['social_setting_prefix_aioseo'] . 'image_custom_url' ];
break;
case 'featured':
return null; // Our auto-calculation when the indexable was built/updated has taken care of it, so it's not needed to transfer any data now.
case 'author':
return null;
case 'custom':
return null;
case 'default':
$image_url = $this->social_images_provider->get_default_custom_social_image( $social_setting );
break;
default:
$image_url = $aioseo_social_image_settings[ $mapping['social_setting_prefix_aioseo'] . 'image_url' ];
break;
}
if ( empty( $image_url ) ) {
$image_url = $this->social_images_provider->get_default_custom_social_image( $social_setting );
}
if ( empty( $image_url ) ) {
return null;
}
return $this->sanitization->sanitize_url( $image_url, null );
}
}
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/crapa.org.br/web/wp-content/plugins/wordpress-seo/src/actions/importing/aioseo/aioseo-posts-importing-action.php:1) in /var/www/html/crapa.org.br/web/wp-includes/rest-api/class-wp-rest-server.php on line 1794
1.0CRA-PAhttps://crapa.org.brCRA-PA Newshttps://crapa.org.br/?author=31CRA-PA, SEBRAE/PA e o Sistema OCB Pará alinham ações para a COP 30 - CRA-PArich600338<blockquote class="wp-embedded-content" data-secret="rFeYupKKM8"><a href="https://crapa.org.br/?p=67451">CRA-PA, SEBRAE/PA e o Sistema OCB Pará alinham ações para a COP 30</a></blockquote><iframe sandbox="allow-scripts" security="restricted" src="https://crapa.org.br/?p=67451&embed=true#?secret=rFeYupKKM8" width="600" height="338" title="“CRA-PA, SEBRAE/PA e o Sistema OCB Pará alinham ações para a COP 30” — CRA-PA" data-secret="rFeYupKKM8" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" class="wp-embedded-content"></iframe><script>
/*! This file is auto-generated */
!function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);
</script>
https://crapa.org.br/wp-content/uploads/2024/02/reuniao-ocb-sebrae11.jpg1280720Com o principal objetivo de fortalecer o empreendedorismo, promovendo o crescimento econômico e social da região paraense, o CRA-PA, o SEBRAE/PA e o Sistema OCB/PA reuniram-se na última quarta-feira, 07, […]