/** * Replace %s with theme URL. * * @param string $url Formatted URL to parse. * @return string */ function monstroid2_render_theme_url( $url ) { $skin = get_theme_mod( 'skin_style', monstroid2_theme()->customizer->get_default( 'skin_style' ) ); $path = get_template_directory_uri(); if ( 'default' !== $skin ) { $path .= "/skins/{$skin}"; } return sprintf( '%s/%s', esc_url( $path ), ltrim( $url, '/' ) ); } /** * Get image ID by URL. * * @param string $image_src Image URL to search it in database. * @return int|bool false */ function monstroid2_get_image_id_by_url( $image_src ) { global $wpdb; $query = "SELECT ID FROM {$wpdb->posts} WHERE guid = %s"; $id = $wpdb->get_var( $wpdb->prepare( $query, esc_url( $image_src ) ) ); return $id; }
Se está creando el nuevo sitio WordPress y se publicará en breve