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
|
@@ 899-908 (lines=10) @@
|
896 |
|
* @access public |
897 |
|
* @return string |
898 |
|
*/ |
899 |
|
public static function get_page_for_posts() { |
900 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
901 |
|
if ( ! $page_for_posts ) { |
902 |
|
return 'posts'; |
903 |
|
} |
904 |
|
/** @type WPDB $wpdb */ |
905 |
|
global $wpdb; |
906 |
|
$SQL = "SELECT post_name from $wpdb->posts WHERE post_type='posts' OR post_type='page' AND post_status='publish' AND ID=%d"; |
907 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts ) ); |
908 |
|
} |
909 |
|
|
910 |
|
|
911 |
|
|