core/data_migration_scripts/4_3_0_stages/EE_DMS_4_3_0_critical_page_shortcode_tracking.dmsstage.php 1 location
|
@@ 99-107 (lines=9) @@
|
| 96 |
|
* @access private |
| 97 |
|
* @return string |
| 98 |
|
*/ |
| 99 |
|
private function _get_page_for_posts() { |
| 100 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
| 101 |
|
if ( ! $page_for_posts ) { |
| 102 |
|
return 'posts'; |
| 103 |
|
} |
| 104 |
|
global $wpdb; |
| 105 |
|
$SQL = 'SELECT post_name from ' . $wpdb->posts . ' WHERE post_type="posts" OR post_type="page" AND post_status="publish" AND ID=%s'; |
| 106 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts )); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
|
| 110 |
|
|
core/EE_Config.core.php 1 location
|
@@ 903-912 (lines=10) @@
|
| 900 |
|
* @access public |
| 901 |
|
* @return string |
| 902 |
|
*/ |
| 903 |
|
public static function get_page_for_posts() { |
| 904 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
| 905 |
|
if ( ! $page_for_posts ) { |
| 906 |
|
return 'posts'; |
| 907 |
|
} |
| 908 |
|
/** @type WPDB $wpdb */ |
| 909 |
|
global $wpdb; |
| 910 |
|
$SQL = "SELECT post_name from $wpdb->posts WHERE post_type='posts' OR post_type='page' AND post_status='publish' AND ID=%d"; |
| 911 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts ) ); |
| 912 |
|
} |
| 913 |
|
|
| 914 |
|
|
| 915 |
|
|