Files
roi-theme/wp-content/plugins/sociallocker-next-premium/plugin/updates/040105.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

32 lines
1.3 KiB
PHP
Executable File

<?php
/**
* Re-creating the leads table, adding the fields table for leads, adds the option 'opanda_catch_leads' for lockers.
*
* @since 4.1.2
*/
class SocialLockerUpdate040105 extends Factory325_Update {
public function install() {
$lockers = get_posts(array(
'post_type' => OPANDA_POST_TYPE,
'meta_key' => 'opanda_item',
'meta_value' => 'social-locker',
'numberposts' => -1
));
foreach( $lockers as $locker ) {
$url = get_post_meta( $locker->ID, 'opanda_common_url', true );
if ( empty( $url ) ) continue;
$facebookUrl = get_post_meta( $locker->ID, 'opanda_facebook_like_url', true );
$twitterUrl = get_post_meta( $locker->ID, 'opanda_twitter_tweet_url', true );
$googleUrl = get_post_meta( $locker->ID, 'opanda_google_plus_url', true );
if ( empty( $facebookUrl ) ) update_post_meta( $locker->ID, 'opanda_facebook_like_url', $url );
if ( empty( $twitterUrl ) ) update_post_meta( $locker->ID, 'opanda_twitter_tweet_url', $url );
if ( empty( $googleUrl ) ) update_post_meta( $locker->ID, 'opanda_google_plus_url', $url );
}
}
}