ayuda para verificar donde este el error y como optimizar el codigo
-
if (Ifunction_exists(y custom function)) { function my_custom_function( $post_id) { if (defined( DOING AUTOSAVE) && DOING AUTOSAVE > return $post_id; $post = get_post( $post_id ); $content = $post->post_content; $new content=»''; if (preg_match_all(‘/<b><\/b>/’, $content, matches, PREG_SET_ORDER) { foreach ($matches as $item) { if (!empty($ttem ) ) { $new_tag= str_replace('b', 'strong', $item[0] ); $new_content= str_replace( $item[8], $new tag, $content ); if ( $new_content != » ) { remove_action( 'save post', 'my_custom_function'); $post_update [ 'ID $post_id, 'post_content' => $new_content ]; wp_update_post($post_update, true); add_action('save.post', 'my custom function"); } } } } } } add_action('save_post', 'my custom,function');
Viendo 1 respuesta (de un total de 1)
Viendo 1 respuesta (de un total de 1)
- El debate ‘ayuda para verificar donde este el error y como optimizar el codigo’ está cerrado a nuevas respuestas.