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
|
@@ 928-937 (lines=10) @@
|
| 925 |
|
* @access public |
| 926 |
|
* @return string |
| 927 |
|
*/ |
| 928 |
|
public static function get_page_for_posts() { |
| 929 |
|
$page_for_posts = get_option( 'page_for_posts' ); |
| 930 |
|
if ( ! $page_for_posts ) { |
| 931 |
|
return 'posts'; |
| 932 |
|
} |
| 933 |
|
/** @type WPDB $wpdb */ |
| 934 |
|
global $wpdb; |
| 935 |
|
$SQL = "SELECT post_name from $wpdb->posts WHERE post_type='posts' OR post_type='page' AND post_status='publish' AND ID=%d"; |
| 936 |
|
return $wpdb->get_var( $wpdb->prepare( $SQL, $page_for_posts ) ); |
| 937 |
|
} |
| 938 |
|
|
| 939 |
|
|
| 940 |
|
|