plugin's page. This free version is NOT limited and does not contain any ad. Check out the PRO version for more great features. Version: 2.1.2 Author: WP Darko Author URI: http://wpdarko.com License: GPL2 */ /* Recover old data if there is */ add_action( 'init', 'tmm_old_data' ); function tmm_old_data() { if(!get_option('tmm_is_updated_yn9090')){ global $post; $args = array( 'post_type' => 'tmm', 'posts_per_page' => 9999, ); $get_old = get_posts( $args ); foreach ( $get_old as $post ) : setup_postdata( $post ); $current_id = get_the_id(); $old_data_teams = get_post_meta( $current_id, 'tmm_head', false ); foreach ($old_data_teams as $key => $odata) { $test_man[$key]['_tmm_firstname'] = $odata['tmm_firstname']; $test_man[$key]['_tmm_lastname'] = $odata['tmm_lastname']; $test_man[$key]['_tmm_job'] = $odata['tmm_job']; $test_man[$key]['_tmm_photo'] = wp_get_attachment_url($odata['tmm_photo']); $test_man[$key]['_tmm_desc'] = $odata['tmm_desc']; $test_man[$key]['_tmm_sc_type1'] = $odata['tmm_sc_type1']; $test_man[$key]['_tmm_sc_title1'] = $odata['tmm_sc_title1']; $test_man[$key]['_tmm_sc_url1'] = $odata['tmm_sc_url1']; $test_man[$key]['_tmm_sc_type2'] = $odata['tmm_sc_type2']; $test_man[$key]['_tmm_sc_title2'] = $odata['tmm_sc_title2']; $test_man[$key]['_tmm_sc_url2'] = $odata['tmm_sc_url2']; $test_man[$key]['_tmm_sc_type3'] = $odata['tmm_sc_type3']; $test_man[$key]['_tmm_sc_title3'] = $odata['tmm_sc_title3']; $test_man[$key]['_tmm_sc_url3'] = $odata['tmm_sc_url3']; update_post_meta($current_id, '_tmm_head', $test_man); wp_reset_postdata(); } $test_man = ''; $old_data_settings = get_post_meta( $current_id, 'tmm_settings_head', false ); foreach ($old_data_settings as $key => $odata) { $var1 = $odata['tmm_columns']; $var2 = $odata['tmm_color']; update_post_meta($current_id, '_tmm_columns', $var1); update_post_meta($current_id, '_tmm_color', $var2); } endforeach; update_option('tmm_is_updated_yn9090', 'old_data_recovered'); } } /* Check for the PRO version */ function tmm_free_pro_check() { if (is_plugin_active('team-members-pro/tmm-pro.php')) { function my_admin_notice(){ echo '
PRO version is activated.
';
$output .= '';
} else {
$output .= '';
$output .= '
';
$output .= '';
}
}
if ($member['_tmm_sc_type2'] != 'nada') {
if ($member['_tmm_sc_type2'] == 'email') {
$output .= '';
$output .= '
';
$output .= '';
} else {
$output .= '';
$output .= '
';
$output .= '';
}
}
if ($member['_tmm_sc_type3'] != 'nada') {
if ($member['_tmm_sc_type3'] == 'email') {
$output .= '';
$output .= '
';
$output .= '';
} else {
$output .= '';
$output .= '
';
$output .= '';
}
}
$output .= '