Bug #10262 » cpcp-newsletter-template.php
1 |
<?php
|
---|---|
2 |
|
3 |
global $wpdb; |
4 |
$site_id = 1109; |
5 |
|
6 |
switch_to_blog( $site_id ); |
7 |
|
8 |
$template_ids = $wpdb->get_col( "SELECT id FROM wp_1109_wpmlthemes" ); |
9 |
foreach ( $template_ids as $tid ) { |
10 |
$template = $wpdb->get_row( $wpdb->prepare( "SELECT * from wp_1109_wpmlthemes WHERE id = %d", $tid ) ); |
11 |
$img = '<img src="http://cpcp.commons.gc.cuny.edu/wp-content/plugins/wp-mailinglist/includes/themes/simplyelegant/images/hr-large.gif" width="560" height="27" alt="Hr">'; |
12 |
|
13 |
if ( false === strpos( $template->content, $img ) ) { |
14 |
continue; |
15 |
}
|
16 |
|
17 |
|
18 |
$content = $template->content; |
19 |
print_r( $template ); |
20 |
}
|
21 |
|
22 |
/*
|
23 |
$content = str_replace( '<img src="http://cpcp.commons.gc.cuny.edu/wp-content/plugins/wp-mailinglist/includes/themes/simplyelegant/images/hr-large.gif" width="560" height="27" alt="Hr">', '<hr />', $content );
|
24 |
|
25 |
$wpdb->query( $wpdb->prepare( "UPDATE wp_1109_wpmlthemes SET content = %s WHERE id = 6", $content ) );
|
26 |
*/
|
27 |
|
28 |
restore_current_blog(); |
- « Previous
- 1
- 2
- 3
- Next »